config

package
v0.0.0-...-f67de66 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2016 License: AGPL-3.0 Imports: 8 Imported by: 0

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 Config

type Config struct {
	// TODO(rog) rename this to MongoAddr - it's not a URL.
	MongoURL          string            `yaml:"mongo-url"`
	AuditLogFile      string            `yaml:"audit-log-file"`
	AuditLogMaxSize   int               `yaml:"audit-log-max-size"`
	AuditLogMaxAge    int               `yaml:"audit-log-max-age"`
	APIAddr           string            `yaml:"api-addr"`
	AuthUsername      string            `yaml:"auth-username"`
	AuthPassword      string            `yaml:"auth-password"`
	ESAddr            string            `yaml:"elasticsearch-addr"` // elasticsearch is optional
	IdentityPublicKey *bakery.PublicKey `yaml:"identity-public-key"`
	IdentityLocation  string            `yaml:"identity-location"`
	TermsPublicKey    *bakery.PublicKey `yaml:"terms-public-key"`
	TermsLocation     string            `yaml:"terms-location"`
	// The identity API is optional
	IdentityAPIURL    string          `yaml:"identity-api-url"`
	AgentUsername     string          `yaml:"agent-username"`
	AgentKey          *bakery.KeyPair `yaml:"agent-key"`
	MaxMgoSessions    int             `yaml:"max-mgo-sessions"`
	RequestTimeout    DurationString  `yaml:"request-timeout"`
	StatsCacheMaxAge  DurationString  `yaml:"stats-cache-max-age"`
	SearchCacheMaxAge DurationString  `yaml:"search-cache-max-age"`
}

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

Jump to

Keyboard shortcuts

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