config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagEncryptionContextKey        string = "tagEncryptionKey"
	AssignmentEncryptionContextKey string = "assignmentEncryptionKey"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Env                      string
	HTTP_SERVER_PORT         string   `envconfig:"HTTP_SERVER_PORT" default:"3000"`
	GIN_MODE                 string   `envconfig:"GIN_MODE" default:"release"`
	MYSQL_CONNECTION_STRING  string   `envconfig:"MYSQL_CONNECTION_STRING"`
	FIREBASE_CONFIG_FILE     string   `envconfig:"FIREBASE_CONFIG_FILE" default:"firebase-credential.json"`
	ALLOW_ORIGINS            []string `envconfig:"ALLOW_ORIGINS" default:"*"`
	ALLOW_METHODS            []string `envconfig:"ALLOW_METHODS" default:"*"`
	ALLOW_HEADERS            []string `envconfig:"ALLOW_HEADERS" default:"*"`
	EXPOSE_HEADERS           []string `envconfig:"EXPOSE_HEADERS" default:"*"`
	ALLOW_CREDENTIALS        bool     `envconfig:"ALLOW_CREDENTIALS" default:"true"`
	MAX_AGE                  int      `envconfig:"MAX_AGE" default:"12"`
	REDIS_CONNECTION_STRING  string   `envconfig:"REDIS_CONNECTION_STRING"`
	REDIS_PASSWORD           string   `envconfig:"REDIS_PASSWORD"`
	RATE_LIMIT_STRING        string   `envconfig:"RATE_LIMIT_STRING" default:"5-S"`
	REDIS_DB                 int      `envconfig:"REDIS_DB" default:"0"`
	HIBP_API_KEY             string   `envconfig:"HIBP_API_KEY"`
	TAG_TABLE_AES_KEY        string   `envconfig:"TAG_TABLE_AES_KEY"`
	ASSIGNMENT_TABLE_AES_KEY string   `envconfig:"ASSIGNMENT_TABLE_AES_KEY"`
	ACCOUNT_TABLE_AES_KEY    string   `envconfig:"ACCOUNT_TABLE_AES_KEY"`
}

func Load

func Load() Config

Jump to

Keyboard shortcuts

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