Documentation ¶
Index ¶
- Constants
- func NewLoadYaml(r io.Reader, v any) error
- func NewLoadYamlWithFile(filename string, v any) error
- type AccessTokenAuth
- type Auth
- type AuthType
- type BasicAuth
- type CSRFToken
- type Cache
- type CacheType
- type Config
- type ConfigLoader
- type Gateway
- type Grpc
- type Logging
- type Raft
- type SetupLogger
- type Tracking
Constants ¶
View Source
const ( BasicAuthType = "basic" AccessTokenType = "accessToken" )
View Source
const ( CacheInMemory = CacheType("inmemory") CacheRedis = CacheType("redis") )
Variables ¶
This section is empty.
Functions ¶
func NewLoadYamlWithFile ¶
Types ¶
type AccessTokenAuth ¶
type AccessTokenAuth struct {
AccessToken string `yaml:"accessToken"`
}
func (*AccessTokenAuth) Token ¶
func (c *AccessTokenAuth) Token() string
func (*AccessTokenAuth) Validate ¶
func (c *AccessTokenAuth) Validate() error
type Auth ¶
type Auth struct { Type AuthType `yaml:"authType"` BasicAuth *BasicAuth `yaml:"basicAuth"` AccessTokenAuth *AccessTokenAuth `yaml:"accessToken"` }
type Cache ¶
type Cache struct { Type CacheType `yaml:"type" default:"inmemory"` Redis *Redis `yaml:"redis"` InMemory *InMemory `yaml:"inmemory"` }
type Config ¶
type Config struct { AppEnv string `yaml:"appEnv" default:"stg"` Retrievers []retriever.Retriever `yaml:"retrievers"` PollingInterval time.Duration `yaml:"pollingInterval" default:"1m"` Gateway *Gateway `yaml:"gateway"` Grpc Grpc `yaml:"grpc,alias"` Raft *Raft `yaml:"raft"` Tracking Tracking `yaml:"tracking"` Logging Logging `yaml:"logging"` CSRF CSRFToken `yaml:"csrf"` }
func DefaultConfig ¶
func DefaultConfig() *Config
func (Config) IsProduction ¶
func (*Config) IsRaftCluster ¶
type ConfigLoader ¶
type Gateway ¶
func (*Gateway) GrpcCredentials ¶
func (c *Gateway) GrpcCredentials() credentials.TransportCredentials
type Grpc ¶
type Grpc struct { Host string `yaml:"endpoint"` Port int `yaml:"port"` Credentials *TLS `yaml:"tls"` Auth *Auth `yaml:"auth"` }
func (*Grpc) GrpcCredentials ¶
func (c *Grpc) GrpcCredentials() credentials.TransportCredentials
type Logging ¶
type Logging struct { Level slog.Level `yaml:"level"` Handler interface{} `yaml:"handler" default:"text"` Sentry *logging.SentryConfig `yaml:"sentry"` Rollbar *logging.RollbarConfig `yaml:"rollbar"` // contains filtered or unexported fields }
func (*Logging) UnmarshalYAML ¶
type SetupLogger ¶
type SetupLogger interface {
SetupLog()
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.