Documentation ¶
Index ¶
- Constants
- func LoadConfig(p string) error
- type APIKeyAuth
- type AuthConfiguration
- type AuthProvider
- type Basic
- type BasicAuth
- type Configuration
- type DatabaseConfiguration
- type FileRealmOption
- type GroupConfig
- type QueueConfiguration
- type QueueProvider
- type Role
- type SMTPConfiguration
- type SentryConfiguration
- type ServerConfiguration
- type SignatureConfiguration
- type SignatureHeaderProvider
- type StrategyConfiguration
- type StrategyProvider
Constants ¶
View Source
const ( NoAuthProvider AuthProvider = "none" BasicAuthProvider AuthProvider = "basic" RedisQueueProvider QueueProvider = "redis" DefaultStrategyProvider StrategyProvider = "default" DefaultSignatureHeader SignatureHeaderProvider = "X-Convoy-Signature" )
View Source
const (
DevelopmentEnvironment string = "development"
)
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
Types ¶
type APIKeyAuth ¶
type AuthConfiguration ¶
type AuthConfiguration struct { RequireAuth bool `json:"require_auth"` Type AuthProvider `json:"type"` Basic Basic File FileRealmOption `json:"file"` }
type AuthProvider ¶
type AuthProvider string
type Configuration ¶
type Configuration struct { Auth AuthConfiguration `json:"auth,omitempty"` UIAuthorizedUsers map[string]string `json:"-"` Database DatabaseConfiguration `json:"database"` Sentry SentryConfiguration `json:"sentry"` Queue QueueConfiguration `json:"queue"` Server ServerConfiguration `json:"server"` GroupConfig GroupConfig `json:"group"` SMTP SMTPConfiguration `json:"smtp"` Environment string `json:"env"` MultipleTenants bool `json:"multiple_tenants"` }
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 FileRealmOption ¶
type FileRealmOption struct { Basic []BasicAuth `json:"basic"` APIKey []APIKeyAuth `json:"api_key"` }
type GroupConfig ¶
type GroupConfig struct { Strategy StrategyConfiguration `json:"strategy"` Signature SignatureConfiguration `json:"signature"` DisableEndpoint bool `json:"disable_endpoint"` }
type QueueConfiguration ¶
type QueueConfiguration struct { Type QueueProvider `json:"type"` Redis struct { DSN string `json:"dsn"` } `json:"redis"` }
type QueueProvider ¶
type QueueProvider string
type SMTPConfiguration ¶
type SentryConfiguration ¶
type SentryConfiguration struct {
Dsn string `json:"dsn"`
}
type ServerConfiguration ¶
type SignatureConfiguration ¶
type SignatureConfiguration struct { Header SignatureHeaderProvider `json:"header"` Hash string `json:"hash"` }
type SignatureHeaderProvider ¶
type SignatureHeaderProvider string
func (SignatureHeaderProvider) String ¶
func (s SignatureHeaderProvider) String() 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
Click to show internal directories.
Click to hide internal directories.