config

package
v0.0.0-...-90e5bb7 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildInfo string

This is set at build time. Rest are set at run time.

Functions

This section is empty.

Types

type Client

type Client struct {
	Env string `json:"env" validate:"required,oneof=development production"`
}

type Server

type Server struct {
	GoogleOAuth2Config    *oauth2.Config
	GitHubOAuth2Config    *oauth2.Config
	BuildInfo             string `validate:"required"`
	Host                  string `validate:"required,ip"`
	Port                  string `validate:"required,gte=0"`
	SessionSecret         string `validate:"required"`
	Env                   string `validate:"required,oneof=development production"`
	DatabaseUrl           string `validate:"required"`
	SmtpHost              string `validate:"required"`
	SmtpUsername          string `validate:"required"`
	SmtpPassword          string `validate:"required"`
	S3BucketName          string
	S3Endpoint            string
	S3DefaultRegion       string
	AwsAccessKeyId        string
	AwsAccessKeySecret    string
	GoogleClientId        string
	GoogleClientSecret    string
	AccessTokenExpiresIn  time.Duration `validate:"required"`
	RefreshTokenExpiresIn time.Duration `validate:"required"`
	ShutdownTimeout       time.Duration `validate:"required"`
	RateLimitPerMinute    int           `validate:"required"`
	SmtpPort              int           `validate:"required"`
	IsDev                 bool
}

func Load

func Load(envFilePath string) (*Server, error)

Jump to

Keyboard shortcuts

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