Documentation
¶
Overview ¶
Package config provides configuration management
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶ added in v0.0.4
func DefaultConfig()
DefaultConfig sets the default values for the configuration
func GetDbURI ¶ added in v0.0.4
func GetDbURI() string
GetDbURI returns a database connection string
func GetServerAddress ¶ added in v0.0.4
func GetServerAddress() string
GetServerAddress returns the address string to bind the service to
func InitConfig ¶ added in v0.0.4
func InitConfig(path string)
InitConfig initializes the configuration
Types ¶
type K ¶ added in v0.0.4
type K string
K is a type alias for string
const ( // ServiceHost is the host to bind the service to ServiceHost K = `service.host` // ServicePort is the port to bind the service to ServicePort K = `service.port` // ServiceApiPrefix is the prefix to use for the API set to "" for / ServiceApiPrefix K = `service.api_prefix` // ServiceJWTSigningMethod is the signing method to use for JWT ServiceJWTSigningMethod K = `service.jwt.signing_method` // ServiceJWTSigningSecret is the secret to use for JWT (only for HS256) ServiceJWTSigningSecret K = `service.jwt.signing_secret` // ServiceJWTSigningKey is the key to use for JWT (only for RS256) ServiceJWTSigningKey K = `service.jwt.signing_key` // ServiceJWTPublicKey is the public key to use for JWT (only for RS256) ServiceJWTPublicKey K = `service.jwt.public_key` // ServiceJWTRefreshSigningSecret is the secret to use for JWT refresh token (only for HS256) ServiceJWTRefreshSigningSecret K = `service.jwt.refresh_signing_secret` // ServiceJWTRefreshSigningKey is the key to use for JWT refresh token (only for RS256) ServiceJWTRefreshSigningKey K = `service.jwt.refresh_signing_key` // ServiceJWTRefreshPublicKey is the public key to use for JWT refresh token (only for RS256) ServiceJWTRefreshPublicKey K = `service.jwt.refresh_public_key` // DatabaseHost is the host to connect to the database DatabaseHost K = `database.host` // DatabasePort is the port to connect to the database DatabasePort K = `database.port` // DatabaseUsername is the username to connect to the database DatabaseUsername K = `database.username` // DatabasePassword is the password to connect to the database DatabasePassword K = `database.password` // DatabaseName is the name of the database to connect to DatabaseName K = `database.name` // DatabaseAutoMigration is whether to automatically apply the migrations to the database DatabaseAutoMigration K = `database.auto_migration` // RedisHost is the host to connect to the redis RedisHost K = `redis.host` // RedisPort is the port to connect to the redis RedisPort K = `redis.port` // RedisPassword is the password to connect to the redis RedisPassword K = `redis.password` // RedisDatabase is the database to connect to the redis RedisDatabase K = `redis.database` )
Click to show internal directories.
Click to hide internal directories.