config

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvDevelopment = "development"
	EnvProduction  = "production"
)

Variables

View Source
var BuildId string

This is set at build time.

Functions

This section is empty.

Types

type Client

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

type Server

type Server struct {
	*Client
	GoogleOAuth2Config *oauth2.Config `json:"googleOAuth2Config"`
	Host               string         `json:"host" validate:"required,ip"`
	Port               string         `json:"port" validate:"required,gte=0"`
	SessionSecret      string         `json:"sessionSecret" validate:"required"`
	DatabaseUrl        string         `json:"databaseUrl" validate:"required"`
	SmtpHost           string         `json:"smtpHost" validate:"required"`
	SmtpUsername       string         `json:"smtpUsername" validate:"required"`
	SmtpPassword       string         `json:"smtpPassword" validate:"required"`
	S3BucketName       string         `json:"s3BucketName"`
	S3Endpoint         string         `json:"s3Endpoint"`
	S3DefaultRegion    string         `json:"s3DefaultRegion"`
	AwsAccessKeyId     string         `json:"awsAccessKeyId"`
	AwsAccessKeySecret string         `json:"awsAccessKeySecret"`
	GoogleClientId     string         `json:"googleClientId"`
	GoogleClientSecret string         `json:"googleClientSecret"`
	AllowedOrigins     []string       `json:"allowedOrigins" validate:"required"`
	ShutdownTimeout    time.Duration  `json:"shutdownTimeout" validate:"required"`
	RateLimitPerMinute int            `json:"rateLimitPerMinute" validate:"required"`
	SmtpPort           int            `json:"smtpPort" validate:"required"`
}

func Load

func Load() (*Server, error)

Jump to

Keyboard shortcuts

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