config

package
v0.0.0-...-b608779 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize() error

Types

type AsyncConfig

type AsyncConfig struct {
	Eager bool `mapstructure:"eager"`
}

type Config

type Config struct {
	Database DatabaseConfig `mapstructure:"database"`
	JWT      JWTConfig      `mapstructure:"jwt"`
	Async    AsyncConfig    `mapstructure:"async"`
	Email    EmailConfig    `mapstructure:"email"`
	Redis    RedisConfig    `mapstructure:"redis"`
	S3       S3Config       `mapstructure:"s3"`
	Logging  LoggingConfig  `mapstructure:"logging"`
}

func Get

func Get() Config

type DatabaseConfig

type DatabaseConfig struct {
	Host     string `mapstructure:"host"`
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
	Name     string `mapstructure:"name"`
	Port     string `mapstructure:"port"`
}

type EmailConfig

type EmailConfig struct {
	SESRegion        string `mapstructure:"ses_region"`
	From             string `mapstructure:"from"`
	VerificationURL  string `mapstructure:"verification_url"`
	RenewPasswordURL string `mapstructure:"renew_password_url"`
}

type JWTConfig

type JWTConfig struct {
	LoginSecret             string        `mapstructure:"login_secret"`
	LoginExpireTime         time.Duration `mapstructure:"login_expire_time"`
	VerificationSecret      string        `mapstructure:"verification_secret"`
	VerificationExpireTime  time.Duration `mapstructure:"verification_expire_time"`
	RenewPasswordSecret     string        `mapstructure:"renew_password_secret"`
	RenewPasswordExpireTime time.Duration `mapstructure:"renew_password_expire_time"`
}

type LoggingConfig

type LoggingConfig struct {
	OutputFile string `mapstructure:"output_file"`
	Level      string `mapstrucutre:"level"`
}

type RedisConfig

type RedisConfig struct {
	Address string `mapstructure:"address"`
}

type S3Config

type S3Config struct {
	SubmissionsBucketName string `mapstructure:"submissions_bucket_name"`
	Region                string `mapstructure:"region"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL