config

package
v5.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: AGPL-3.0 Imports: 12 Imported by: 2

Documentation

Overview

The config package defines configuration parameters for the charm store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobStoreType

type BlobStoreType string
const (
	MongoDBBlobStore BlobStoreType = "mongodb"
	SwiftBlobStore   BlobStoreType = "swift"
)

type Config

type Config struct {
	// TODO(rog) rename this to MongoAddr - it's not a URL.
	MongoURL                       string            `yaml:"mongo-url,omitempty"`
	AuditLogFile                   string            `yaml:"audit-log-file,omitempty"`
	AuditLogMaxSize                int               `yaml:"audit-log-max-size,omitempty"`
	AuditLogMaxAge                 int               `yaml:"audit-log-max-age,omitempty"`
	APIAddr                        string            `yaml:"api-addr,omitempty"`
	AuthUsername                   string            `yaml:"auth-username,omitempty"`
	AuthPassword                   string            `yaml:"auth-password,omitempty"`
	ESAddr                         string            `yaml:"elasticsearch-addr,omitempty"` // elasticsearch is optional
	IdentityPublicKey              *bakery.PublicKey `yaml:"identity-public-key,omitempty"`
	IdentityLocation               string            `yaml:"identity-location"`
	TermsPublicKey                 *bakery.PublicKey `yaml:"terms-public-key,omitempty"`
	TermsLocation                  string            `yaml:"terms-location,omitempty"`
	AgentUsername                  string            `yaml:"agent-username,omitempty"`
	AgentKey                       *bakery.KeyPair   `yaml:"agent-key,omitempty"`
	MaxMgoSessions                 int               `yaml:"max-mgo-sessions,omitempty"`
	RequestTimeout                 DurationString    `yaml:"request-timeout,omitempty"`
	StatsCacheMaxAge               DurationString    `yaml:"stats-cache-max-age,omitempty"`
	SearchCacheMaxAge              DurationString    `yaml:"search-cache-max-age,omitempty"`
	Database                       string            `yaml:"database,omitempty"`
	AccessLog                      string            `yaml:"access-log"`
	MinUploadPartSize              int64             `yaml:"min-upload-part-size"`
	MaxUploadPartSize              int64             `yaml:"max-upload-part-size"`
	MaxUploadParts                 int               `yaml:"max-upload-parts"`
	BlobStore                      BlobStoreType     `yaml:"blobstore"`
	SwiftAuthURL                   string            `yaml:"swift-auth-url"`
	SwiftEndpointURL               string            `yaml:"swift-endpoint-url"`
	SwiftUsername                  string            `yaml:"swift-username"`
	SwiftSecret                    string            `yaml:"swift-secret"`
	SwiftBucket                    string            `yaml:"swift-bucket"`
	SwiftRegion                    string            `yaml:"swift-region"`
	SwiftTenant                    string            `yaml:"swift-tenant"`
	SwiftAuthMode                  *SwiftAuthMode    `yaml:"swift-authmode"`
	LoggingConfig                  string            `yaml:"logging-config"`
	DockerRegistryAddress          string            `yaml:"docker-registry-address"`
	DockerRegistryAuthCertificates X509Certificates  `yaml:"docker-registry-auth-certs"`
	DockerRegistryAuthKey          X509PrivateKey    `yaml:"docker-registry-auth-key"`
	DockerRegistryTokenDuration    DurationString    `yaml:"docker-registry-token-duration"`
	TempDir                        string            `yaml:"tempdir"`
}

func Read

func Read(path string) (*Config, error)

Read reads a charm store configuration file from the given path.

type DurationString

type DurationString struct {
	time.Duration
}

DurationString holds a duration that marshals and unmarshals as a friendly string.

func (*DurationString) UnmarshalText

func (dp *DurationString) UnmarshalText(data []byte) error

type SwiftAuthMode

type SwiftAuthMode struct {
	Mode identity.AuthMode
}

SwiftAuthMode implements unmarshaling for an identity.AuthMode.

func (*SwiftAuthMode) UnmarshalText

func (m *SwiftAuthMode) UnmarshalText(data []byte) error

type X509Certificates

type X509Certificates struct {
	Certificates []*x509.Certificate
}

func (*X509Certificates) UnmarshalText

func (c *X509Certificates) UnmarshalText(data []byte) error

type X509PrivateKey

type X509PrivateKey struct {
	Key crypto.Signer
}

func (*X509PrivateKey) UnmarshalText

func (k *X509PrivateKey) UnmarshalText(data []byte) error

Jump to

Keyboard shortcuts

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