-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: mapping column + readme for oss as source
- Loading branch information
1 parent
bc949c5
commit b95b3e9
Showing
4 changed files
with
46 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package config | ||
|
||
// SourceOSSConfig is a configuration for the source oss component. | ||
type SourceOSSConfig struct { | ||
ServiceAccount string `env:"OSS__SERVICE_ACCOUNT"` | ||
SourceBucketPath string `env:"OSS__SOURCE_BUCKET_PATH"` | ||
FileFormat string `env:"OSS__FILE_FORMAT" envDefault:"json"` | ||
CSVDelimiter rune `env:"OSS__CSV_DELIMITER" envDefault:","` | ||
ColumnMappingFilePath string `env:"OSS__COLUMN_MAPPING_FILE_PATH"` | ||
} | ||
|
||
// SourceOSS parses the environment variables and returns the source oss configuration. | ||
func SourceOSS(envs ...string) (*SourceOSSConfig, error) { | ||
return parse[SourceOSSConfig](envs...) | ||
} |