conf

package
v0.0.0-...-ebbb693 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(env string, level zapcore.Level, serviceName string) *zap.SugaredLogger

func NewLogger

func NewLogger(env *Env) *zap.SugaredLogger

func NewStatsd

func NewStatsd(env *Env) (statsd.ClientInterface, error)

Types

type AuthConfig

type AuthConfig struct {
	WellKnown     string
	Audience      string
	AudienceAuth0 string
	Issuer        string
	IssuerAuth0   string
	Middleware    string
}

type ConfigurationManager

type ConfigurationManager struct {
	Datalayer *StorageConfig

	State          State
	TokenProviders *security.TokenProviders
	// contains filtered or unexported fields
}

func NewConfigurationManager

func NewConfigurationManager(lc fx.Lifecycle, env *Env, providers *security.TokenProviders) *ConfigurationManager

func (*ConfigurationManager) Init

func (conf *ConfigurationManager) Init()

func (*ConfigurationManager) Run

func (conf *ConfigurationManager) Run()

type CsvConfig

type CsvConfig struct {
	Header         bool     `json:"header"`
	Encoding       string   `json:"encoding"`
	Separator      string   `json:"separator"`
	Order          []string `json:"order"`
	SkipRows       int      `json:"skiprows"`
	ValidateFields bool     `json:"validatefields"`
}

type DecodeConfig

type DecodeConfig struct {
	Namespaces       map[string]string   `json:"namespaces"`
	PropertyPrefixes map[string]string   `json:"propertyPrefixes"`
	Refs             []string            `json:"refs"`
	IdProperty       string              `json:"idProperty"`
	DefaultNamespace string              `json:"defaultNamespace"`
	IgnoreColumns    []string            `json:"ignoreColumns"`
	ColumnMappings   map[string]string   `json:"columnMappings"`
	ColumnTypes      map[string]string   `json:"columnTypes"`
	ListValueColumns map[string]string   `json:"listValueColumns"`
	Defaults         map[string]string   `json:"defaults"`
	ConcatColumns    map[string][]string `json:"columnConcats"`
}

type Env

type Env struct {
	Logger             *zap.SugaredLogger
	Env                string
	Port               string
	ConfigLocation     string
	RefreshInterval    string
	ServiceName        string
	FullsyncChunkSize  int64
	FullsyncTempFolder string
	Auth               *AuthConfig
}

func NewEnv

func NewEnv() *Env

type FlatFileConfig

type FlatFileConfig struct {
	Fields               map[string]FlatFileField `json:"fields"`
	FieldOrder           []string                 `json:"fieldOrder"`
	ContinueOnParseError bool                     `json:"continueOnParseError"`
}

type FlatFileField

type FlatFileField struct {
	Substring  [][]int `json:"substring"`
	Type       string  `json:"type"`
	Decimals   int     `json:"decimals"`
	DateLayout string  `json:"dateLayout"`
}

type LocalFileConfig

type LocalFileConfig struct {
	RootFolder string `json:"rootfolder"`
	FileSuffix string `json:"filesuffix"`
}

type ParquetConfig

type ParquetConfig struct {
	SchemaDefinition string   `json:"schema"`
	FlushThreshold   int64    `json:"flushThreshold"`
	Partitioning     []string `json:"partitioning"`
}

type PropertiesMapping

type PropertiesMapping struct {
	Bucket             *string `json:"bucket,omitempty"`
	Region             *string `json:"region,omitempty"`
	AuthType           *string `json:"authType,omitempty"`
	ResourceName       *string `json:"resourceName,omitempty"`
	CustomResourcePath *bool   `json:"customResourcePath,omitempty"`
	RootFolder         *string `json:"rootFolder,omitempty"`
	FolderStructure    *string `json:"folderStructure,omitempty"`
	FilePrefix         *string `json:"filePrefix,omitempty"`
	Endpoint           string  `json:"endpoint"`
	Key                *string `json:"key,omitempty"`
	Secret             *string `json:"secret,omitempty"` //Note, need to be called secret to be injected in injectSecrets in manager.go
}

type State

type State struct {
	Timestamp int64
	Digest    [16]byte
}

type StorageBackend

type StorageBackend struct {
	Dataset          string            `json:"dataset"`
	StorageType      string            `json:"storageType"`
	StripProps       bool              `json:"stripProps"`
	ResolveNamespace bool              `json:"resolveNamespace"`
	StoreDeleted     bool              `json:"storeDeleted"`
	AthenaCompatible bool              `json:"athenaCompatible"`
	CsvConfig        *CsvConfig        `json:"csv"`
	FlatFileConfig   *FlatFileConfig   `json:"flatFile"`
	ParquetConfig    *ParquetConfig    `json:"parquet"`
	Properties       PropertiesMapping `json:"props"`
	DecodeConfig     *DecodeConfig     `json:"decode"`
	LocalFileConfig  *LocalFileConfig  `json:"localfileconfig"`
	Timezone         string            `json:"timezone"`
}

type StorageConfig

type StorageConfig struct {
	Id              string                    `json:"id"`
	StorageBackends []StorageBackend          `json:"storageBackends"`
	StorageMapping  map[string]StorageBackend `json:"-"` //ignore field  when marshaling/unmarshaling
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL