config

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmailTypeNoEmail = ""
	EmailTypeMailjet = "mailjet"
	EmailTypeSMTP    = "smtp"
)

Variables

This section is empty.

Functions

func LogLevelDecodeFunc

func LogLevelDecodeFunc() mapstructure.DecodeHookFuncType

Types

type Auth

type Auth struct {
	JWT AuthJWT `mapstructure:"jwt"`
}

type AuthJWT

type AuthJWT struct {
	Secret             string `mapstructure:"secret"`
	CertificateFile    string `mapstructure:"certificate_file"`
	CertificateKeyFile string `mapstructure:"certificate_key_file"`
}

type Client

type Client struct {
	Postgres ClientPostgres `mapstructure:"postgres"`
	Mongo    ClientMongo    `mapstructure:"mongo"`
	Minio    ClientMinio    `mapstructure:"minio"`
	Docker   ClientDocker   `mapstructure:"docker"`
	Mailjet  ClientMailjet  `mapstructure:"mailjet"`
	SMTP     ClientSMTP     `mapstructure:"smtp"`
}

type ClientDocker

type ClientDocker struct {
	Host string `mapstructure:"host"`
}

type ClientMailjet

type ClientMailjet struct {
	From      string `mapstructure:"from"`
	APIKey    string `mapstructure:"api_key"`
	SecretKey string `mapstructure:"secret_key"`
}

type ClientMinio

type ClientMinio struct {
	AccessKeyID     string `mapstructure:"access_key_id"`
	SecretAccessKey string `mapstructure:"secret_access_key"`
	Host            string `mapstructure:"host"`
	Secure          bool   `mapstructure:"secure"`
}

type ClientMongo

type ClientMongo struct {
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
	Host     string `mapstructure:"host"`
}

type ClientPostgres

type ClientPostgres struct {
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
	Host     string `mapstructure:"host"`
}

type ClientSMTP

type ClientSMTP struct {
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
}

type Cluster

type Cluster struct {
	Type ClusterType `mapstructure:"type"`
}

type ClusterType

type ClusterType string
const (
	ClusterTypeDocker     ClusterType = "docker"
	ClusterTypeKubernetes ClusterType = "k8s"
)

type Config

type Config struct {
	Port       int        `mapstructure:"port"`
	PublicURL  string     `mapstructure:"public_url"`
	Telemetry  Telemetry  `mapstructure:"telemetry"`
	Auth       Auth       `mapstructure:"auth"`
	Client     Client     `mapstructure:"client"`
	Repository Repository `mapstructure:"repository"`
	OAuth      OAuth      `mapstructure:"oauth"`
	Cluster    Cluster    `mapstructure:"cluster"`
	Email      Email      `mapstructure:"email"`
	Registry   Registry   `mapstructure:"registry"`
}

func New

func New(filePath string) (Config, error)

type Email

type Email struct {
	From string `mapstructure:"from"`
	Type string `mapstructure:"type"`
}

type EmailType

type EmailType string

type OAuth

type OAuth struct {
	Google   OAuthClientCredentials `mapstructure:"google"`
	Github   OAuthClientCredentials `mapstructure:"github"`
	Facebook OAuthClientCredentials `mapstructure:"facebook"`
}

type OAuthClientCredentials

type OAuthClientCredentials struct {
	ClientID     string `mapstructure:"client_id"`
	ClientSecret string `mapstructure:"client_secret"`
}

type Registry

type Registry struct {
	Enabled  bool          `mapstructure:"enabled"`
	Port     int           `mapstructure:"port"`
	LogLevel zapcore.Level `mapstructure:"log_level"`
}

type Repository

type Repository struct {
	Storage          RepositoryStore       `mapstructure:"storage"`
	Capsule          RepositoryStore       `mapstructure:"capsule"`
	Database         RepositoryStore       `mapstructure:"database"`
	ServiceAccount   RepositoryStore       `mapstructure:"service_account"`
	Group            RepositoryStore       `mapstructure:"group"`
	Project          RepositoryStore       `mapstructure:"project"`
	Secret           RepositoryStoreSecret `mapstructure:"secret"`
	Session          RepositoryStore       `mapstructure:"session"`
	User             RepositoryStore       `mapstructure:"user"`
	VerificationCode RepositoryStore       `mapstructure:"verification_code"`
}

type RepositoryStore

type RepositoryStore struct {
	Store string `mapstructure:"store"`
}

type RepositoryStoreSecret

type RepositoryStoreSecret struct {
	Store   string                       `mapstructure:"store"`
	MongoDB RepositoryStoreSecretMongoDB `mapstructure:"mongodb"`
}

type RepositoryStoreSecretMongoDB

type RepositoryStoreSecretMongoDB struct {
	Key string `mapstructure:"key"`
}

type Telemetry added in v1.1.0

type Telemetry struct {
	Enabled bool `mapstructure:"enabled"`
}

Jump to

Keyboard shortcuts

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