configs

package
v1.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize() error

Initialize initializes the configs.

func SetConfiguration

func SetConfiguration(c *Configuration)

SetConfiguration ...

Types

type Configuration

type Configuration struct {
	Log       ConfigurationLog       `yaml:"log"`
	Database  ConfigurationDatabase  `yaml:"database"`
	Deploy    enums.Deploy           `yaml:"deploy"`
	Redis     ConfigurationRedis     `yaml:"redis"`
	Cache     ConfigurationCache     `yaml:"cache"`
	WorkQueue ConfigurationWorkQueue `yaml:"workqueue"`
	Locker    ConfigurationLocker    `yaml:"locker"`
	Namespace ConfigurationNamespace `yaml:"namespace"`
	HTTP      ConfigurationHTTP      `yaml:"http"`
	Storage   ConfigurationStorage   `yaml:"storage"`
	Proxy     ConfigurationProxy     `yaml:"proxy"`
	Daemon    ConfigurationDaemon    `yaml:"daemon"`
	Auth      ConfigurationAuth      `yaml:"auth"`
}

Configuration ...

func GetConfiguration

func GetConfiguration() *Configuration

GetConfiguration ...

type ConfigurationAuth

type ConfigurationAuth struct {
	Admin  ConfigurationAuthAdmin  `yaml:"admin"`
	Token  ConfigurationAuthToken  `yaml:"token"`
	Oauth2 ConfigurationAuthOauth2 `yaml:"oauth2"`
	Jwt    ConfigurationAuthJwt    `yaml:"jwt"`
}

ConfigurationAuth ...

type ConfigurationAuthAdmin

type ConfigurationAuthAdmin struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Email    string `yaml:"email"`
}

ConfigurationAuthAdmin ...

type ConfigurationAuthInternalUser

type ConfigurationAuthInternalUser struct {
	Username string `yaml:"username"`
}

ConfigurationAuthInternalUser ...

type ConfigurationAuthJwt

type ConfigurationAuthJwt struct {
	Ttl        time.Duration `yaml:"ttl"`
	RefreshTtl time.Duration `yaml:"refreshTtl"`
	PrivateKey string        `yaml:"privateKey"`
}

ConfigurationAuthJwt ...

type ConfigurationAuthOauth2

type ConfigurationAuthOauth2 struct {
	Github ConfigurationAuthOauth2Github `yaml:"github"`
	Gitlab ConfigurationAuthOauth2Github `yaml:"gitlab"`
	Gitea  ConfigurationAuthOauth2Github `yaml:"gitea"`
}

ConfigurationAuthOauth2 ...

type ConfigurationAuthOauth2Gitea

type ConfigurationAuthOauth2Gitea struct {
	ClientID     string `yaml:"clientId"`
	ClientSecret string `yaml:"clientSecret"`
}

ConfigurationAuthOauth2Gitea ...

type ConfigurationAuthOauth2Github

type ConfigurationAuthOauth2Github struct {
	ClientID     string `yaml:"clientId"`
	ClientSecret string `yaml:"clientSecret"`
}

ConfigurationAuthOauth2Github ...

type ConfigurationAuthOauth2Gitlab

type ConfigurationAuthOauth2Gitlab struct {
	ClientID     string `yaml:"clientId"`
	ClientSecret string `yaml:"clientSecret"`
}

ConfigurationAuthOauth2Gitlab ...

type ConfigurationAuthToken

type ConfigurationAuthToken struct {
	Realm   string `yaml:"realm"`
	Service string `yaml:"service"`
}

ConfigurationAuthToken ...

type ConfigurationBuilderDocker

type ConfigurationBuilderDocker struct {
}

type ConfigurationBuilderK8s

type ConfigurationBuilderK8s struct {
	Kubeconfig string `yaml:"kubeconfig"`
	Namespace  string `yaml:"namespace"`
}

type ConfigurationCache

type ConfigurationCache struct {
	Type     enums.CacherType           `yaml:"type"`
	Ttl      time.Duration              `yaml:"ttl"`
	Redis    ConfigurationCacheRedis    `yaml:"redis"`
	Inmemory ConfigurationCacheInmemory `yaml:"inmemory"`
	Database ConfigurationCacheDatabase `yaml:"database"`
}

ConfigurationCache ...

type ConfigurationCacheDatabase

type ConfigurationCacheDatabase struct {
	Size      int64   `yaml:"size"`
	Threshold float64 `yaml:"threshold"`
}

ConfigurationCacheDatabase ...

type ConfigurationCacheInmemory

type ConfigurationCacheInmemory struct {
	Size int `yaml:"size"`
}

ConfigurationCacheInmemory ...

type ConfigurationCacheRedis

type ConfigurationCacheRedis struct {
}

ConfigurationCacheRedis ...

type ConfigurationDaemon

type ConfigurationDaemon struct {
	Builder ConfigurationDaemonBuilder `yaml:"builder"`
}

ConfigurationDaemon ...

type ConfigurationDaemonBuilder

type ConfigurationDaemonBuilder struct {
	Enabled    bool                          `yaml:"enabled"`
	Type       enums.BuilderType             `yaml:"type"`
	Image      string                        `yaml:"image"`
	Docker     ConfigurationDaemonDocker     `yaml:"docker"`
	Kubernetes ConfigurationDaemonKubernetes `yaml:"kubernetes"`
	Podman     ConfigurationDaemonPodman     `yaml:"podman"`
}

ConfigurationDaemonBuilder ...

type ConfigurationDaemonDocker

type ConfigurationDaemonDocker struct {
	Sock    *string `yaml:"sock"`
	Network string  `yaml:"network"`
}

ConfigurationDaemonDocker ...

type ConfigurationDaemonGc

type ConfigurationDaemonGc struct {
	Retention time.Duration `yaml:"retention"`
	Cron      string        `yaml:"cron"`
}

ConfigurationDaemonGc ...

type ConfigurationDaemonKubernetes

type ConfigurationDaemonKubernetes struct {
	Kubeconfig *string `yaml:"kubeconfig"`
	Namespace  string  `yaml:"namespace"`
}

ConfigurationDaemonKubernetes ...

type ConfigurationDaemonPodman added in v1.2.0

type ConfigurationDaemonPodman struct {
	URI string `yaml:"uri"`
}

ConfigurationDaemonPodman ...

type ConfigurationDatabase

type ConfigurationDatabase struct {
	Type       enums.Database                  `yaml:"type"`
	Sqlite3    ConfigurationDatabaseSqlite3    `yaml:"sqlite3"`
	Mysql      ConfigurationDatabaseMysql      `yaml:"mysql"`
	Postgresql ConfigurationDatabasePostgresql `yaml:"postgresql"`
}

ConfigurationDatabase ...

type ConfigurationDatabaseMysql

type ConfigurationDatabaseMysql struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	DBName   string `yaml:"dbname"`
}

ConfigurationDatabaseMysql ...

type ConfigurationDatabasePostgresql

type ConfigurationDatabasePostgresql struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	DBName   string `yaml:"dbname"`
	SslMode  string `yaml:"sslmode"`
}

ConfigurationDatabase ...

type ConfigurationDatabaseSqlite3

type ConfigurationDatabaseSqlite3 struct {
	Path string `yaml:"path"`
}

ConfigurationDatabaseSqlite3 ...

type ConfigurationHTTP

type ConfigurationHTTP struct {
	Endpoint                     string               `yaml:"endpoint"`
	InternalEndpoint             string               `yaml:"internalEndpoint"`
	InternalDistributionEndpoint string               `yaml:"internalDistributionEndpoint"`
	TLS                          ConfigurationHttpTLS `yaml:"tls"`
}

ConfigurationHTTP ...

type ConfigurationHttpTLS

type ConfigurationHttpTLS struct {
	Enabled     bool   `yaml:"enabled"`
	Certificate string `yaml:"certificate"`
	Key         string `yaml:"key"`
}

ConfigurationHttpTLS ...

type ConfigurationLocker

type ConfigurationLocker struct {
	Type enums.LockerType `yaml:"type"`
}

ConfigurationLocker ...

type ConfigurationLog

type ConfigurationLog struct {
	Level      enums.LogLevel `yaml:"level"`
	ProxyLevel enums.LogLevel `yaml:"proxyLevel"`
}

ConfigurationLog ...

type ConfigurationNamespace

type ConfigurationNamespace struct {
	AutoCreate bool             `yaml:"autoCreate"`
	Visibility enums.Visibility `yaml:"visibility"`
}

ConfigurationNamespace ...

type ConfigurationProxy

type ConfigurationProxy struct {
	Enabled   bool   `yaml:"enabled"`
	Endpoint  string `yaml:"endpoint"`
	TlsVerify bool   `yaml:"tlsVerify"`
	Username  string `yaml:"username"`
	Password  string `yaml:"password"`
	Token     string `yaml:"token"`
}

ConfigurationProxy ...

type ConfigurationRedis

type ConfigurationRedis struct {
	Type enums.RedisType `yaml:"type"`
	Url  string          `yaml:"url"`
}

ConfigurationRedis ...

type ConfigurationStorage

type ConfigurationStorage struct {
	RootDirectory string                         `yaml:"rootDirectory"`
	Redirect      bool                           `yaml:"redirect"`
	Type          enums.StorageType              `yaml:"type"`
	Filesystem    ConfigurationStorageFilesystem `yaml:"filesystem"`
	S3            ConfigurationStorageS3         `yaml:"s3"`
	Cos           ConfigurationStorageCos        `yaml:"cos"`
	Oss           ConfigurationStorageOss        `yaml:"oss"`
}

ConfigurationStorage ...

type ConfigurationStorageCos

type ConfigurationStorageCos struct {
	Ak             string `yaml:"ak"`
	Sk             string `yaml:"sk"`
	Endpoint       string `yaml:"endpoint"`
	ForcePathStyle bool   `yaml:"forcePathStyle"`
}

ConfigurationStorageCos ...

type ConfigurationStorageFilesystem

type ConfigurationStorageFilesystem struct {
	Path string `yaml:"path"`
}

ConfigurationStorageFilesystem ...

type ConfigurationStorageOss added in v1.2.0

type ConfigurationStorageOss struct {
	Ak             string `yaml:"ak"`
	Sk             string `yaml:"sk"`
	Bucket         string `yaml:"bucket"`
	Endpoint       string `yaml:"endpoint"`
	ForcePathStyle bool   `yaml:"forcePathStyle"`
}

ConfigurationStorageOss ...

type ConfigurationStorageQiniu

type ConfigurationStorageQiniu struct {
	Ak       string `yaml:"ak"`
	Sk       string `yaml:"sk"`
	Bucket   string `yaml:"bucket"`
	Region   string `yaml:"region"`
	UseHTTPS bool   `yaml:"useHttps"`
}

ConfigurationStorageQiniu ...

type ConfigurationStorageS3

type ConfigurationStorageS3 struct {
	Ak             string `yaml:"ak"`
	Sk             string `yaml:"sk"`
	Endpoint       string `yaml:"endpoint"`
	Region         string `yaml:"region"`
	Bucket         string `yaml:"bucket"`
	ForcePathStyle bool   `yaml:"forcePathStyle"`
}

ConfigurationStorageS3 ...

type ConfigurationWorkQueue

type ConfigurationWorkQueue struct {
	Type     enums.WorkQueueType            `yaml:"type"`
	Redis    ConfigurationWorkQueueRedis    `yaml:"redis"`
	Database ConfigurationWorkQueueDatabase `yaml:"database"`
	Kafka    ConfigurationWorkQueueKafka    `yaml:"kafka"`
}

ConfigurationWorkQueue ...

type ConfigurationWorkQueueDatabase

type ConfigurationWorkQueueDatabase struct {
}

type ConfigurationWorkQueueKafka

type ConfigurationWorkQueueKafka struct {
}

type ConfigurationWorkQueueRedis

type ConfigurationWorkQueueRedis struct {
	Concurrency int `yaml:"concurrency"`
}

Jump to

Keyboard shortcuts

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