Documentation
¶
Index ¶
- Constants
- type AuthConfig
- type AuthProviderConfig
- type Config
- type DatastoreConfig
- type EventstoreConfig
- type MySQLConfig
- type PostgresConfig
- type SQLiteConfig
- type WarrantConfig
- func (warrantConfig WarrantConfig) GetAuthentication() *AuthConfig
- func (warrantConfig WarrantConfig) GetAutoMigrate() bool
- func (warrantConfig WarrantConfig) GetDatastore() *DatastoreConfig
- func (warrantConfig WarrantConfig) GetEnableAccessLog() bool
- func (warrantConfig WarrantConfig) GetEventstore() *EventstoreConfig
- func (warrantConfig WarrantConfig) GetLogLevel() int8
- func (warrantConfig WarrantConfig) GetPort() int
Constants ¶
View Source
const ( DefaultMySQLDatastoreMigrationSource = "github://warrant-dev/warrant/migrations/datastore/mysql" DefaultMySQLEventstoreMigrationSource = "github://warrant-dev/warrant/migrations/eventstore/mysql" DefaultPostgresDatastoreMigrationSource = "github://warrant-dev/warrant/migrations/datastore/postgres" DefaultPostgresEventstoreMigrationSource = "github://warrant-dev/warrant/migrations/eventstore/postgres" DefaultSQLiteDatastoreMigrationSource = "github://warrant-dev/warrant/migrations/datastore/sqlite" DefaultSQLiteEventstoreMigrationSource = "github://warrant-dev/warrant/migrations/eventstore/sqlite" DefaultAuthenticationUserIdClaim = "sub" PrefixWarrant = "warrant" ConfigFileName = "warrant.yaml" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶ added in v0.7.0
type AuthConfig struct {
ApiKey string `mapstructure:"apiKey"`
Provider *AuthProviderConfig `mapstructure:"providers"`
}
type AuthProviderConfig ¶ added in v0.13.0
type Config ¶
type Config interface {
GetPort() int
GetLogLevel() int8
GetEnableAccessLog() bool
GetAutoMigrate() bool
GetDatastore() *DatastoreConfig
GetEventstore() *EventstoreConfig
}
type DatastoreConfig ¶
type DatastoreConfig struct {
MySQL *MySQLConfig `mapstructure:"mysql"`
Postgres *PostgresConfig `mapstructure:"postgres"`
SQLite *SQLiteConfig `mapstructure:"sqlite"`
}
type EventstoreConfig ¶ added in v0.6.0
type EventstoreConfig struct {
MySQL *MySQLConfig `mapstructure:"mysql"`
Postgres *PostgresConfig `mapstructure:"postgres"`
SQLite *SQLiteConfig `mapstructure:"sqlite"`
SynchronizeEvents bool `mapstructure:"synchronizeEvents"`
}
type MySQLConfig ¶
type MySQLConfig struct {
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Hostname string `mapstructure:"hostname"`
Database string `mapstructure:"database"`
MigrationSource string `mapstructure:"migrationSource"`
MaxIdleConnections int `mapstructure:"maxIdleConnections"`
MaxOpenConnections int `mapstructure:"maxOpenConnections"`
ReaderHostname string `mapstructure:"readerHostname"`
ReaderMaxIdleConnections int `mapstructure:"readerMaxIdleConnections"`
ReaderMaxOpenConnections int `mapstructure:"readerMaxOpenConnections"`
}
type PostgresConfig ¶ added in v0.4.0
type PostgresConfig struct {
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Hostname string `mapstructure:"hostname"`
Database string `mapstructure:"database"`
SSLMode string `mapstructure:"sslmode"`
MigrationSource string `mapstructure:"migrationSource"`
MaxIdleConnections int `mapstructure:"maxIdleConnections"`
MaxOpenConnections int `mapstructure:"maxOpenConnections"`
ReaderHostname string `mapstructure:"readerHostname"`
ReaderMaxIdleConnections int `mapstructure:"readerMaxIdleConnections"`
ReaderMaxOpenConnections int `mapstructure:"readerMaxOpenConnections"`
}
type SQLiteConfig ¶ added in v0.11.0
type WarrantConfig ¶ added in v0.13.0
type WarrantConfig struct {
Port int `mapstructure:"port"`
LogLevel int8 `mapstructure:"logLevel"`
EnableAccessLog bool `mapstructure:"enableAccessLog"`
AutoMigrate bool `mapstructure:"autoMigrate"`
Datastore *DatastoreConfig `mapstructure:"datastore"`
Eventstore *EventstoreConfig `mapstructure:"eventstore"`
Authentication *AuthConfig `mapstructure:"authentication"`
EnableWarrantTokens bool `mapstructure:"enableWarrantTokens"`
}
func NewConfig ¶
func NewConfig() WarrantConfig
func (WarrantConfig) GetAuthentication ¶ added in v0.13.0
func (warrantConfig WarrantConfig) GetAuthentication() *AuthConfig
func (WarrantConfig) GetAutoMigrate ¶ added in v0.13.0
func (warrantConfig WarrantConfig) GetAutoMigrate() bool
func (WarrantConfig) GetDatastore ¶ added in v0.13.0
func (warrantConfig WarrantConfig) GetDatastore() *DatastoreConfig
func (WarrantConfig) GetEnableAccessLog ¶ added in v0.13.0
func (warrantConfig WarrantConfig) GetEnableAccessLog() bool
func (WarrantConfig) GetEventstore ¶ added in v0.13.0
func (warrantConfig WarrantConfig) GetEventstore() *EventstoreConfig
func (WarrantConfig) GetLogLevel ¶ added in v0.13.0
func (warrantConfig WarrantConfig) GetLogLevel() int8
func (WarrantConfig) GetPort ¶ added in v0.13.0
func (warrantConfig WarrantConfig) GetPort() int
Click to show internal directories.
Click to hide internal directories.