Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶ added in v0.3.2
type AuthConfig struct {
// for creating access and refresh tokens
Secret string `mapstructure:"AUTH_TOKEN_SECRET"`
// access token time to live
AccessTokenExpDur time.Duration `mapstructure:"AUTH_ACCESS_TOKEN_EXPIRE_DURATION"`
// refresh token time to live
RefreshTokenExpDur time.Duration `mapstructure:"AUTH_REFRESH_TOKEN_EXPIRE_DURATION"`
// verification token time to live
VerifyTokenExpDur time.Duration `mapstructure:"AUTH_VERIFY_TOKEN_EXPIRE_DURATION"`
// verification token request cooldown before new request
VerifyTokenCooldown time.Duration `mapstructure:"AUTH_VERIFY_TOKEN_COOLDOWN"`
// reset token time to live
ResetTokenExpDur time.Duration `mapstructure:"AUTH_RESET_TOKEN_EXPIRE_DURATION"`
// reset token request cooldown tiem before new request
ResetTokenCooldown time.Duration `mapstructure:"AUTH_RESET_TOKEN_COOLDOWN"`
// account deletion token time to live
DeleteTokenExpDur time.Duration `mapstructure:"AUTH_DELETE_TOKEN_EXPIRE_DURATION"`
// account deletion token request cooldown before new request
DeleteTokenCooldown time.Duration `mapstructure:"AUTH_DELETE_TOKEN_COOLDOWN"`
}
type Config ¶
type Config struct {
// StartTime is the timestamp when the application started.
StartTime time.Time
// ServiceName is the name of the service
ServiceName string `mapstructure:"SERVICE_NAME"`
// ServerName is the name of the server, could be the hostname, or container's hostname.
ServerName string `mapstructure:"SERVER_NAME"`
// Host is the hostname for the REST server.
Host string `mapstructure:"HOST"`
// Port is the port number for the REST server.
Port int `mapstructure:"PORT"`
// RestPort is the port number for the REST server.
RestPort int `mapstructure:"REST_PORT"`
// gRPC Port is the port number for the gRPC server.
GrpcPort int `mapstructure:"GRPC_PORT"`
MaxRequestTimeout time.Duration `mapstructure:"MAX_REQUEST_TIMEOUT"`
Database db.Config
Mail mail.Config
Logger logger.Config
Auth AuthConfig
}
Config represents the application configuration.
Click to show internal directories.
Click to hide internal directories.