config

package
v0.0.0-...-1753806 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Map = new(ConfMap)

Functions

func IsValidBucketName

func IsValidBucketName(bucketname string) bool

func Load

func Load(filename string) (err error)

Types

type ConfMap

type ConfMap struct {
	Debug     bool            `hcl:"debug"`
	Env       string          `hcl:"env"`
	Grpc      GrpcConfig      `hcl:"grpc,block"`
	HTTP      HTTPConfig      `hcl:"http,block"`
	S3        S3Config        `hcl:"s3,block"`
	Sentry    SentryConfig    `hcl:"sentry,block"`
	Recaptcha RecaptchaConfig `hcl:"recaptcha,block"`
}

type GrpcConfig

type GrpcConfig struct {
	Host string `hcl:"host"`
	Port int    `hcl:"port"`
}

type HTTPConfig

type HTTPConfig struct {
	Rules HTTPConfigRules `hcl:"rules,label"`
}

type HTTPConfigRules

type HTTPConfigRules struct {
	AccessControlAllowOrigin string `hcl:"access_control_allow_origin"`
}

type RecaptchaConfig

type RecaptchaConfig struct {
	Enabled bool   `hcl:"enabled"`
	Type    string `hcl:"type"`
	Secret  string `hcl:"secret"`
}

type S3Config

type S3Config struct {
	Endpoint           string `hcl:"endpoint"`
	AccessKey          string `hcl:"access_key"`
	SecretKey          string `hcl:"secret_key"`
	UseHTTPS           bool   `hcl:"use_https"`
	InsecureSkipVerify bool   `hcl:"insecure_skip_verify"`
}

type SentryConfig

type SentryConfig struct {
	Enabled bool   `hcl:"enabled"`
	Dsn     string `hcl:"dsn"`
}

Jump to

Keyboard shortcuts

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