Documentation ¶
Index ¶
- Constants
- func LoadConfig(p string) error
- type AuthConfiguration
- type AuthProvider
- type Basic
- type Configuration
- type DatabaseConfiguration
- type QueueConfiguration
- type QueueProvider
- type SignatureConfiguration
- type SignatureHeaderProvider
- type StrategyConfiguration
- type StrategyProvider
- type UIAuthConfiguration
Constants ¶
View Source
const ( NoAuthProvider AuthProvider = "none" BasicAuthProvider AuthProvider = "basic" RedisQueueProvider QueueProvider = "redis" DefaultStrategyProvider StrategyProvider = "default" DefaultSignatureHeader SignatureHeaderProvider = "X-Convoy-Signature" )
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
Types ¶
type AuthConfiguration ¶
type AuthConfiguration struct { Type AuthProvider `json:"type"` Basic Basic `json:"basic"` }
type AuthProvider ¶
type AuthProvider string
type Configuration ¶
type Configuration struct { Auth AuthConfiguration `json:"auth"` UIAuth UIAuthConfiguration `json:"ui"` UIAuthorizedUsers map[string]string Database DatabaseConfiguration `json:"database"` Queue QueueConfiguration `json:"queue"` Server struct { HTTP struct { Port int `json:"port"` } `json:"http"` } Strategy StrategyConfiguration `json:"strategy"` Signature SignatureConfiguration `json:"signature"` }
func Get ¶
func Get() (Configuration, error)
Get fetches the application configuration. LoadConfig must have been called previously for this to work. Use this when you need to get access to the config object at runtime
type DatabaseConfiguration ¶
type DatabaseConfiguration struct {
Dsn string `json:"dsn"`
}
type QueueConfiguration ¶
type QueueConfiguration struct { Type QueueProvider `json:"type"` Redis struct { DSN string `json:"dsn"` } `json:"redis"` }
type QueueProvider ¶
type QueueProvider string
type SignatureConfiguration ¶
type SignatureConfiguration struct { Header SignatureHeaderProvider `json:"header"` Hash string `json:"hash"` }
type SignatureHeaderProvider ¶
type SignatureHeaderProvider string
type StrategyConfiguration ¶
type StrategyConfiguration struct { Type StrategyProvider `json:"type"` Default struct { IntervalSeconds uint64 `json:"intervalSeconds"` RetryLimit uint64 `json:"retryLimit"` } `json:"default"` }
type StrategyProvider ¶
type StrategyProvider string
type UIAuthConfiguration ¶ added in v0.1.2
type UIAuthConfiguration struct { Type AuthProvider `json:"type"` Basic []Basic `json:"basic"` JwtKey string `json:"jwtKey"` JwtTokenExpirySeconds time.Duration `json:"jwtTokenExpirySeconds"` }
Click to show internal directories.
Click to hide internal directories.