config

package
v0.0.0-...-a8e4d9d Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const InstanceDeadline = 2 * time.Hour

Variables

This section is empty.

Functions

This section is empty.

Types

type BraintreeConfig

type BraintreeConfig struct {
	Environment string
	MerchantId  string
	PublicKey   string
	PrivateKey  string
	CacheFile   string
}

func (*BraintreeConfig) NewClient

func (self *BraintreeConfig) NewClient() *braintree.Braintree

type Config

type Config struct {
	Root string
	// contains filtered or unexported fields
}

func GetConfig

func GetConfig() *Config

func (*Config) AmqpConnectionString

func (c *Config) AmqpConnectionString() string

func (*Config) AwsConfigFilePath

func (c *Config) AwsConfigFilePath() string

func (*Config) Braintree

func (c *Config) Braintree() *BraintreeConfig

func (*Config) DB

func (c *Config) DB() (*sqlx.DB, error)

func (*Config) Environment

func (c *Config) Environment() string

func (Config) FeaturesConfig

func (c Config) FeaturesConfig() Features

func (*Config) FilesystemConfig

func (c *Config) FilesystemConfig() FilesystemConfig

func (*Config) GetASService

func (c *Config) GetASService() *autoscaling.AutoScaling

func (*Config) GetAwsConfig

func (c *Config) GetAwsConfig() *aws.Config

func (*Config) GetCWService

func (c *Config) GetCWService() *cloudwatch.CloudWatch

func (*Config) GetEC2Service

func (c *Config) GetEC2Service() *ec2.EC2

func (*Config) GetSshConfig

func (self *Config) GetSshConfig() (*ssh.ClientConfig, error)

func (*Config) HttpConfig

func (c *Config) HttpConfig() HttpConfig

Returns the HTTP config, interface{} as the keys are a mix of strings and integers

func (*Config) InfluxDBConfig

func (c *Config) InfluxDBConfig() InfluxDBConfig

func (*Config) LimitsStoreConfig

func (c *Config) LimitsStoreConfig() LimitsStoreConfig

func (*Config) MailConfig

func (c *Config) MailConfig() MailConfig

func (Config) OAuthConfig

func (c Config) OAuthConfig() OAuthConfig

func (*Config) PgDataSourceName

func (c *Config) PgDataSourceName() (string, error)

func (*Config) RedisConfig

func (c *Config) RedisConfig() redisConfig

func (*Config) RedisConnOpts

func (c *Config) RedisConnOpts(dbNum int64) *redis.Options

func (*Config) URLConfig

func (c *Config) URLConfig() *URLConfig

type Features

type Features struct {
	OAuthGithubImportRepository bool `json:"oauth.github.import-repository"`
	OAuthGithubAuthentication   bool `json:"oauth.github.authentication"`
	TrialEnabled                bool `json:"trial-period.enabled"`
	LimitsEnabled               bool `json:"limits.enabled"`
	GuestAccountEnabled         bool `json:"guest-account.enabled"`
	PublicProjectsEnabled       bool `json:"public-projects.enabled"`
}

type FilesystemConfig

type FilesystemConfig struct {
	OpLogDir   string `json:"log_dir"`
	GitTempDir string `json:"git_temp_dir"`
}

type HttpConfig

type HttpConfig struct {
	Port                 int    `json:"port"`
	Bind                 string `json:"bind"`
	UserHmacSecret       string `json:"-"`
	WebSocketPort        int    `json:"websocketPort"`
	WebSocketBind        string `json:"websocketBind"`
	MaxSimultaneousConns int
}

func (HttpConfig) String

func (h HttpConfig) String() string

func (HttpConfig) WebSocket

func (h HttpConfig) WebSocket() string

type InfluxDBConfig

type InfluxDBConfig struct {
	Addr     string
	Username string
	Password string
	Database string
	Timeout  time.Duration
}

type LimitsStoreConfig

type LimitsStoreConfig struct {
	CachePath string
	Port      string
	Bind      string
	FailMode  string
	Enabled   bool
}

type MailConfig

type MailConfig struct {
	FromAddress string `json:"fromAddress"`
}

type OAuthConfig

type OAuthConfig struct {
	Providers map[string]OAuthProviderConfig
}

type OAuthProviderConfig

type OAuthProviderConfig struct {
	ClientId     string
	ClientSecret string
	ProviderUrl  string
	RedirectUri  string
	Scope        []string
}

type URLConfig

type URLConfig struct {
	Host string
}

func (*URLConfig) Base

func (self *URLConfig) Base() *url.URL

Jump to

Keyboard shortcuts

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