Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access struct { NoTokenMethods string `yaml:"no_token_methods,omitempty"` PublicMethods string `yaml:"public_methods,omitempty"` WriteMethods string `yaml:"write_methods,omitempty"` }
Access holds service access configuration data
type Application ¶
type Application struct {
MinPasswordStrength int `yaml:"min_password_strength,omitempty"`
}
Application represents application specific configuration
type Configuration ¶
type Configuration struct { Server Server `yaml:"server,omitempty"` RefreshToken RefreshToken `yaml:"refreshtoken,omitempty"` DB DatabaseEnv `yaml:"database,omitempty"` Access Access `yaml:"access,omitempty"` App Application `yaml:"application,omitempty"` OpenAPI OpenAPI `yaml:"openapi,omitempty"` Storage Storage `yaml:"storage,omitempty"` }
Configuration holds application configuration data
func Load ¶
func Load(path string) (*Configuration, error)
Load loads the configuration file from the given path
type Database ¶
type Database struct { PSN string `yaml:"psn,omitempty"` LogQueries bool `yaml:"log_queries,omitempty"` TimeoutSeconds int `yaml:"timeout_seconds,omitempty"` }
Database holds data necessery for database configuration
type DatabaseEnv ¶
type DatabaseEnv struct { Dev Database `yaml:"dev,omitempty"` Test Database `yaml:"test,omitempty"` }
DatabaseEnv holds dev and test database data
type OpenAPI ¶
type OpenAPI struct { Username string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` }
OpenAPI holds username password for viewing api docs
type RefreshToken ¶
type RefreshToken struct {
Lifetime int `yaml:"lifetime_seconds,omitempty"`
}
type Server ¶
type Server struct { CertName string `yaml:"cert_name,omitempty"` ReadTimeoutSeconds int `yaml:"read_timeout_seconds,omitempty"` WriteTimeoutSeconds int `yaml:"write_timeout_seconds,omitempty"` }
Server holds data necessery for server configuration
type Storage ¶
type Storage struct { AccountId string `yaml:"account_id,omitempty"` Key string `yaml:"key,omitempty"` AuthEndpoint string `yaml:"auth_endpoint,omitempty"` FileEndpoint string `yaml:"file_endpoint,omitempty"` UploadEndpoint string `yaml:"upload_endpoint,omitempty"` BucketId string `yaml:"bucket_id,omitempty"` Timeout time.Duration `yaml:"timeout,omitempty"` }
Storage holds data necessary for backblaze configuration in track-server-api
Click to show internal directories.
Click to hide internal directories.