config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reload

func Reload() error

Types

type Config

type Config struct {
	MongoConnectionString string        `yaml:"mongo_connection_string" env:"MONGO_CONNECTION_STRING" env-default:"mongodb://localhost:27017"`
	MongoDatabase         string        `yaml:"mongo_database" env:"MONGO_DATABASE" env-default:"capgo"`
	S3BaseEndpoint        string        `yaml:"s3_base_endpoint" env:"S3_BASE_ENDPOINT"`
	S3Bucket              string        `yaml:"s3_bucket" env:"S3_BUCKET" env-required:"true"`
	ManagementAPITokens   []string      `yaml:"management_api_tokens" env:"MANAGEMENT_API_TOKENS" env-required:"true"`
	LimitRequestPerMinute int           `yaml:"limit_request_per_minute" env:"LIMIT_REQUEST_PER_MINUTE" env-default:"100"`
	TrustedProxies        []string      `yaml:"trusted_proxies" env:"TRUSTED_PROXIES"`
	CacheResultDuration   time.Duration `yaml:"cache_result_duration" env:"CACHE_RESULT_DURATION" env-default:"10m"`
	OAuthIssuer           string        `yaml:"oauth_issuer" env:"OAUTH_ISSUER"`
	OAuthClientID         string        `yaml:"oauth_client_id" env:"OAUTH_CLIENT_ID"`
	CapgoUserPort         int           `yaml:"capgo_user_port" env:"CAPGO_USER_PORT" env-default:"8000"`
	CapgoManagementPort   int           `yaml:"capgo_management_port" env:"CAPGO_MANAGEMENT_PORT" env-default:"8001"`
}

func Get

func Get() Config

Jump to

Keyboard shortcuts

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