conf

package
v0.0.0-...-a11c28b Latest Latest
Warning

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

Go to latest
Published: Oct 22, 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 ColumnMapping

type ColumnMapping struct {
	FieldName         string           `json:"fieldName"`
	PropertyName      string           `json:"propertyName"`
	IsIdColumn        bool             `json:"isIdColumn"`
	IsReference       bool             `json:"isReference"`
	IsEntity          bool             `json:"isEntity"`
	ReferenceTemplate string           `json:"referenceTemplate"`
	IgnoreColumn      bool             `json:"ignoreColumn"`
	IdTemplate        string           `json:"idTemplate"`
	ColumnMappings    []*ColumnMapping `json:"columnMappings"`
}

type ConfigurationManager

type ConfigurationManager struct {
	Datalayer *Datalayer

	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 Datalayer

type Datalayer struct {
	Id             string          `json:"id"`
	DatabaseServer string          `json:"databaseServer"`
	BaseUri        string          `json:"baseUri"`
	Database       string          `json:"database"`
	Port           int             `json:"port"`
	Schema         string          `json:"schema"`
	BaseNameSpace  string          `json:"baseNameSpace"`
	User           string          `json:"user"`
	Password       string          `json:"password"`
	Service        string          `json:"serviceName"`
	TableMappings  []*TableMapping `json:"tableMappings"`
	PostMappings   []*PostMapping  `json:"postMappings"`
}

func (*Datalayer) GetPostUrl

func (layer *Datalayer) GetPostUrl(mapping *PostMapping) string

func (*Datalayer) GetUrl

func (layer *Datalayer) GetUrl(table *TableMapping) string

type Env

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

func NewEnv

func NewEnv() *Env

type FieldMapping

type FieldMapping struct {
	FieldName string `json:"fieldName"`
	SortOrder int    `json:"order"`
	Type      string `json:"type"`
}

type PostMapping

type PostMapping struct {
	DatasetName   string          `json:"datasetName"`
	TableName     string          `json:"tableName"`
	Query         string          `json:"query"`
	Config        *TableConfig    `json:"config"`
	IdColumn      string          `json:"idColumn"`
	FieldMappings []*FieldMapping `json:"fieldMappings"`
}

type State

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

type TableConfig

type TableConfig struct {
	DatabaseServer *string         `json:"databaseServer"`
	Database       *string         `json:"database"`
	Port           *int            `json:"port"`
	Schema         *string         `json:"schema"`
	User           *VariableGetter `json:"user"`
	Password       *VariableGetter `json:"password"`
	Service        *string         `json:"service"`
}

type TableMapping

type TableMapping struct {
	TableName           string           `json:"tableName"`
	NameSpace           string           `json:"nameSpace"`
	CustomQuery         string           `json:"query"`
	EntityIdConstructor string           `json:"entityIdConstructor"`
	SinceColumn         string           `json:"sinceColumn"`
	Types               []string         `json:"types"`
	ColumnMappings      []*ColumnMapping `json:"columnMappings"`
	Config              *TableConfig     `json:"config"`
	Columns             map[string]*ColumnMapping
}

type User

type User struct {
	UserName string
	Password string
}

type VariableGetter

type VariableGetter struct {
	Type string `json:"type"`
	Key  string `json:"key"`
}

func (*VariableGetter) GetValue

func (v *VariableGetter) GetValue() string

Jump to

Keyboard shortcuts

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