Documentation
¶
Index ¶
- Variables
- func GetConfigDirectory() string
- func GetConfigName() string
- func LoadConfig(filename, path string) (*viper.Viper, error)
- func RootDir() string
- type AuthConfig
- type CadenceConfig
- type Config
- type FileInformation
- type GraphqlServerConfig
- type GrpcServerConfig
- type HealthCheckServerConfig
- type JaegerServerConfig
- type LoggerConfig
- type MetricsConfig
- type PostgresConfig
- type RestServerConfig
- type VCSSConfig
Constants ¶
This section is empty.
Variables ¶
ProviderFx ConfigProviderFx : Provider of GetConfig
Functions ¶
func GetConfigDirectory ¶
func GetConfigDirectory() string
func LoadConfig ¶
LoadConfig config file from given path
Types ¶
type AuthConfig ¶
type AuthConfig struct {
Auth0ClientID string `mapstructure:"AUTH0_CLIENT_ID"`
Auth0Domain string `mapstructure:"AUTH0_DOMAIN"`
Auth0ClientSecret string `mapstructure:"AUTH0_CLIENT_SECRET"`
Auth0CallBackURL string `mapstructure:"AUTH0_CALL_BACK_URL"`
}
AuthConfig Authentication config: details provided by Auth0
type CadenceConfig ¶
type Config ¶
type Config struct {
Grpc GrpcServerConfig `mapstructure:"GRPC"`
Graphql GraphqlServerConfig `mapstructure:"GRAPHQL"`
Rest RestServerConfig `mapstructure:"REST"`
HealthCheck HealthCheckServerConfig `mapstructure:"HEALTH_CHECK"`
Logger LoggerConfig `mapstructure:"LOGGER"`
Postgres PostgresConfig `mapstructure:"POSTGRES"`
Metrics MetricsConfig `mapstructure:"METRICS"`
Jaeger JaegerServerConfig `mapstructure:"JAEGER"`
Auth AuthConfig `mapstructure:"AUTH"`
GithubVCSConfig VCSSConfig `mapstructure:"GITHUB_VCS_CONFIG"`
CadenceConfig CadenceConfig `mapstructure:"CADENCE_CONFIG"`
SupportedVcsConfig []string
}
Config : including all the configuration
type FileInformation ¶
type GraphqlServerConfig ¶
type GraphqlServerConfig struct {
Port string `mapstructure:"PORT"`
Host string `mapstructure:"HOST"`
RequestTimeout int `mapstructure:"REQUEST_TIMEOUT"`
}
GraphqlServerConfig GraphqlServerConfig: Graphql server configuration
type GrpcServerConfig ¶
type GrpcServerConfig struct {
Port string `mapstructure:"PORT"`
Host string `mapstructure:"HOST"`
RequestTimeout int `mapstructure:"REQUEST_TIMEOUT"`
}
GrpcServerConfig GrpcServerConfig: gRPC server configuration Timeout is the request timeout: any client request take longer then the given timeout will automatically cancelled.
type HealthCheckServerConfig ¶
type HealthCheckServerConfig struct {
Port string `mapstructure:"PORT"`
Host string `mapstructure:"HOST"`
}
HealthCheckServerConfig HealthCheckServerConfig: Configuration about health check
type JaegerServerConfig ¶
type JaegerServerConfig struct {
Host string `mapstructure:"HOST"`
Port string `mapstructure:"PORT"`
ServiceName string `mapstructure:"SERVICE_NAME"`
LogSpans string `mapstructure:"LOG_SPANS"`
}
JaegerServerConfig : detail config about the Jaeger
type LoggerConfig ¶
type LoggerConfig struct {
LogLevel string `mapstructure:"LOG_LEVEL"`
}
LoggerConfig LoggerConfig: Zapier log level
type MetricsConfig ¶
type MetricsConfig struct {
URL string `mapstructure:"URL"`
ServiceName string `mapstructure:"SERVICE_NAME"`
}
MetricsConfig : detail config about the Metrics
type PostgresConfig ¶
type PostgresConfig struct {
Host string `mapstructure:"HOST"`
Port string `mapstructure:"PORT"`
User string `mapstructure:"USER"`
Password string `mapstructure:"PASSWORD"`
DbName string `mapstructure:"DB_NAME"`
SslMode string `mapstructure:"SSL_MODE"`
Driver string `mapstructure:"PG_DRIVER"`
}
PostgresConfig PostgresConfig: detail config about the postgres database
type RestServerConfig ¶
type RestServerConfig struct {
Port string `mapstructure:"PORT"`
Host string `mapstructure:"HOST"`
RequestTimeout int `mapstructure:"REQUEST_TIMEOUT"`
}
RestServerConfig RestServerConfig: Rest Implementation config
type VCSSConfig ¶
type VCSSConfig struct {
IType int `mapstructure:"ITYPE"`
Provider string `mapstructure:"PROVIDER"`
URLTemplate string `mapstructure:"URL_TEMPLATE"`
ClientID string `mapstructure:"CLIENT_ID"`
RedirectURI string `mapstructure:"REDIRECT_URI"`
State string `mapstructure:"STATE"`
Scope string `mapstructure:"SCOPE"`
ResponseType string `mapstructure:"RESPONSE_TYPE"`
ClientSecret string `mapstructure:"CLIENT_SECRET"`
Name string `mapstructure:"NAME"`
}
VCSSConfig like github,gitlab,bitbucket config
func GetVcsConfig ¶
func GetVcsConfig(name string, vcsConfig []VCSSConfig) *VCSSConfig
GetVcsConfig : will give the particular vcs config