config

package
Version: v0.21.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPropertyID

func BuildPropertyID() string

BuildPropertyID returns the Build Property Identifier that is used up in Artifactory ideally we'd just settle on "git" and not differentiate between gitlab and github but we could also split on the type and perform more specific operations

Types

type ArtifactoryConfig

type ArtifactoryConfig = artifactory.Config

type Config

type Config struct {
	LogConfig
	ArtifactoryConfig
	GitLabConfig
	GitHubConfig
	Identity               IdentityValidatorConfig
	LocalDev               bool          `envconfig:"LOCAL_DEV" default:"false"`
	ApiQUrl                string        `envconfig:"API_Q_URL" required:"true"`
	SourceControlProvider  string        `envconfig:"SCM_PROVIDER" default:"gitlab"`
	ApiQWaitTimeSecond     int64         `envconfig:"API_Q_WAIT_TIME_SECOND" default:"20"`
	ApiQVisibilityTimeout  int64         `envconfig:"API_Q_VISIBILITY_TIMEOUT" default:"3600"`
	ApiQMaxNumberOfMessage int64         `envconfig:"API_Q_MAX_NUMBER_OF_MESSAGE" default:"10"`
	ApiQWorkerTimeout      time.Duration `envconfig:"API_Q_WORKER_TIMEOUT" default:"60s"`
	CronTimeout            time.Duration `envconfig:"CRON_TIMEOUT" default:"120s"`
	HttpCallbackTimeout    time.Duration `envconfig:"HTTP_CALLBACK_TIMEOUT" default:"8s"`
	S3Bucket               string        `envconfig:"S3_BUCKET" required:"true"`
	AWSRegion              string        `envconfig:"AWS_REGION" required:"true"`
	Port                   int           `envconfig:"PORT" default:"8080"`
	MetricsPort            int           `envconfig:"METRICS_PORT" default:"3001"`
	ServiceName            string        `envconfig:"SERVICE_NAME" default:"eve"`
	AdminToken             string        `envconfig:"ADMIN_TOKEN" required:"true"`
}

func GetConfig

func GetConfig() Config

type DBConfig

type DBConfig struct {
	DBHost              string        `envconfig:"DB_HOST" default:"localhost"`
	DBPort              int           `envconfig:"DB_PORT" default:"5432"`
	DBUsername          string        `envconfig:"DB_USERNAME" default:"postgres"`
	DBPassword          string        `envconfig:"DB_PASSWORD" default:"postgres"`
	DBName              string        `envconfig:"DB_NAME" default:"postgres"`
	DBConnectionTimeout time.Duration `envconfig:"DB_CONNECTION_TIMEOUT" default:"10s"`
	LogLevel            string        `envconfig:"LOG_LEVEL" default:"info"`
}

func GetDBConfig

func GetDBConfig() DBConfig

func (DBConfig) DbConnectionString

func (c DBConfig) DbConnectionString() string

func (DBConfig) MigrationConnectionString

func (c DBConfig) MigrationConnectionString() string

type FlagConfig

type FlagConfig struct {
	MigrateFlag bool `envconfig:"MIGRATE_FLAG" default:"false"`
	ServerFlag  bool `envconfig:"SERVER_FLAG" default:"true"`
}

func GetFlagsConfig

func GetFlagsConfig() FlagConfig

type GitHubConfig

type GitHubConfig = github.Config

type GitLabConfig

type GitLabConfig = gitlab.Config

type IdentityValidatorConfig

type IdentityValidatorConfig = identity.ValidatorConfig

type LogConfig

type LogConfig = log.Config

Source Files

Jump to

Keyboard shortcuts

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