config

package
v0.0.0-...-cc4ef14 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AlibabaBlobstoreConfig

type AlibabaBlobstoreConfig struct {
	BucketName string `yaml:"bucket_name"`
	ApiKey     string `yaml:"access_key_id"`
	ApiSecret  string `yaml:"access_key_secret"`
	Endpoint   string
}

type AppStashConfig

type AppStashConfig struct {
	MinimumSize string `yaml:"minimum_size"`
	MaximumSize string `yaml:"maximum_size"`
}

func (*AppStashConfig) MaximumSizeBytes

func (config *AppStashConfig) MaximumSizeBytes() uint64

func (*AppStashConfig) MinimumSizeBytes

func (config *AppStashConfig) MinimumSizeBytes() uint64

type AzureBlobstoreConfig

type AzureBlobstoreConfig struct {
	ContainerName string `yaml:"container_name"`
	AccountName   string `yaml:"account_name"`
	AccountKey    string `yaml:"account_key"`
	Environment   string
}

func (*AzureBlobstoreConfig) EnvironmentName

func (c *AzureBlobstoreConfig) EnvironmentName() string

type BlobstoreConfig

type BlobstoreConfig struct {
	BlobstoreType     BlobstoreType             `yaml:"blobstore_type"`
	LocalConfig       *LocalBlobstoreConfig     `yaml:"local_config"`
	S3Config          *S3BlobstoreConfig        `yaml:"s3_config"`
	GCPConfig         *GCPBlobstoreConfig       `yaml:"gcp_config"`
	AzureConfig       *AzureBlobstoreConfig     `yaml:"azure_config"`
	OpenstackConfig   *OpenstackBlobstoreConfig `yaml:"openstack_config"`
	WebdavConfig      *WebdavBlobstoreConfig    `yaml:"webdav_config"`
	AlibabaConfig     *AlibabaBlobstoreConfig   `yaml:"alibaba_config"`
	MaxBodySize       string                    `yaml:"max_body_size"`
	GlobalMaxBodySize string                    // Not to be set by yaml
}

func (*BlobstoreConfig) MaxBodySizeBytes

func (config *BlobstoreConfig) MaxBodySizeBytes() uint64

type BlobstoreType

type BlobstoreType string
const (
	Local     BlobstoreType = "local"
	AWS       BlobstoreType = "aws"
	Google    BlobstoreType = "google"
	Azure     BlobstoreType = "azure"
	OpenStack BlobstoreType = "openstack"
	WebDAV    BlobstoreType = "webdav"
	Alibaba   BlobstoreType = "alibaba"
)

type CCUpdaterConfig

type CCUpdaterConfig struct {
	Endpoint       string
	Method         string
	ClientCertFile string `yaml:"client_cert_file"`
	ClientKeyFile  string `yaml:"client_key_file"`
	CACertFile     string `yaml:"ca_cert_file"`
}

type Config

type Config struct {
	Buildpacks BlobstoreConfig
	Droplets   BlobstoreConfig
	Packages   BlobstoreConfig
	AppStash   BlobstoreConfig `yaml:"app_stash"`

	RootFS BlobstoreConfig `yaml:"rootfs"`

	// BuildpackCache is a Pseudo blobstore, because in reality it is using the Droplets blobstore.
	// However, we want to be able to control its max_body_size.
	BuildpackCache BlobstoreConfig `yaml:"buildpack_cache"`

	Logging          LoggingConfig
	PublicEndpoint   string `yaml:"public_endpoint"`
	PrivateEndpoint  string `yaml:"private_endpoint"`
	RegistryEndpoint string `yaml:"registry_endpoint"`
	Secret           string
	SigningKeys      []struct {
		KeyID  string `yaml:"key_id"`
		Secret string
	} `yaml:"signing_keys"`
	ActiveKeyID  string `yaml:"active_key_id"`
	Port         int
	HttpEnabled  bool         `yaml:"enable_http"`
	HttpPort     int          `yaml:"http_port"`
	SigningUsers []Credential `yaml:"signing_users"`
	MaxBodySize  string       `yaml:"max_body_size"`
	CertFile     string       `yaml:"cert_file"`
	KeyFile      string       `yaml:"key_file"`

	CCUpdater *CCUpdaterConfig `yaml:"cc_updater"`

	AppStashConfig AppStashConfig `yaml:"app_stash_config"`

	EnableRegistry bool `yaml:"enable_registry"`

	ShouldProxyGetRequests bool `yaml:"proxy_get_requests"`
}

func LoadConfig

func LoadConfig(filename string) (config Config, err error)

func (*Config) PrivateEndpointUrl

func (config *Config) PrivateEndpointUrl() *url.URL

func (*Config) PublicEndpointUrl

func (config *Config) PublicEndpointUrl() *url.URL

func (*Config) RegistryEndpointUrl

func (config *Config) RegistryEndpointUrl() *url.URL

func (*Config) SigningKeysMap

func (config *Config) SigningKeysMap() map[string]string

type Credential

type Credential struct {
	Username string
	Password string
}

type GCPBlobstoreConfig

type GCPBlobstoreConfig struct {
	Bucket              string
	PrivateKeyID        string `yaml:"private_key_id"`
	PrivateKey          string `yaml:"private_key"`
	Email               string
	TokenURL            string `yaml:"token_url"`
	RetryTimeoutSeconds int    `yaml:"retry_timeout_seconds"`
}

type LocalBlobstoreConfig

type LocalBlobstoreConfig struct {
	PathPrefix string `yaml:"path_prefix"`
}

type LoggingConfig

type LoggingConfig struct {
	Level string
}

type OpenstackBlobstoreConfig

type OpenstackBlobstoreConfig struct {
	ContainerName  string `yaml:"container_name"`
	DomainName     string `yaml:"domain_name"`
	DomainId       string `yaml:"domain_id"`
	Username       string
	ApiKey         string `yaml:"api_key"`
	AuthURL        string `yaml:"auth_url"`
	Region         string
	AuthVersion    int    `yaml:"auth_version"`
	Internal       bool   // Set this to true to use the the internal / service network
	Tenant         string // Name of the tenant (v2,v3 auth only)
	TenantId       string `yaml:"tenant_id"`        // Id of the tenant (v2,v3 auth only)
	EndpointType   string `yaml:"endpoint_type"`    // Endpoint type (v2,v3 auth only) (default is public URL unless Internal is set)
	TenantDomain   string `yaml:"tenant_domain"`    // Name of the tenant's domain (v3 auth only), only needed if it differs from the user domain
	TenantDomainId string `yaml:"tenant_domain_id"` // Id of the tenant's domain (v3 auth only), only needed if it differs the from user domain
	TrustId        string `yaml:"trust_id"`         // Id of the trust (v3 auth only)

	AccountMetaTempURLKey string `yaml:"account_meta_temp_url_key"` // used as secret for signed URLs
}

type S3BlobstoreConfig

type S3BlobstoreConfig struct {
	Bucket               string
	AccessKeyID          string `yaml:"access_key_id"`
	SecretAccessKey      string `yaml:"secret_access_key"`
	Region               string
	Host                 string `yaml:",omitempty"`
	S3DebugLogLevel      string `yaml:"s3_debug_log_level"`
	ServerSideEncryption string `yaml:"server_side_encryption"`
	SSEKMSKeyID          string `yaml:"server_side_encryption_aws_kms_key_id"`
	UseIAMProfile        bool   `yaml:"use_iam_profile"`
	SignatureVersion     int    `yaml:"signature_version"`
}

type WebdavBlobstoreConfig

type WebdavBlobstoreConfig struct {
	DirectoryKey    string `yaml:"directory_key"`
	PrivateEndpoint string `yaml:"private_endpoint"`
	PublicEndpoint  string `yaml:"public_endpoint"`
	CACertPath      string `yaml:"ca_cert_path"`
	SkipCertVerify  bool   `yaml:"skip_cert_verify"`
	Username        string
	Password        string
}

func (WebdavBlobstoreConfig) CACert

func (config WebdavBlobstoreConfig) CACert() string

Jump to

Keyboard shortcuts

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