options

package
v0.0.0-...-8c14554 Latest Latest
Warning

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

Go to latest
Published: May 17, 2017 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

View Source
const (
	EnvGoogleAuthJSON = "GOOGLE_AUTH_JSON"

	EnvGoogleApplicationCredentials = "GOOGLE_APPLICATION_CREDENTIALS"
	EnvAccount                      = "RESIZER_ACCOUNT"
	EnvBucket                       = "RESIZER_BUCKET"
	EnvConnections                  = "RESIZER_CONNECTIONS"
	EnvDSN                          = "RESIZER_DSN"
	EnvHost                         = "RESIZER_HOST"
	EnvPort                         = "RESIZER_PORT"
	EnvPrefix                       = "RESIZER_PREFIX"
	EnvVerbose                      = "RESIZER_VERBOSE"

	FlagAccount     = "account"
	FlagBucket      = "bucket"
	FlagConnections = "connections"
	FlagDSN         = "dsn"
	FlagHost        = "host"
	FlagPort        = "port"
	FlagPrefix      = "prefix"
	FlagVerbose     = "verbose"
)

Variables

Functions

This section is empty.

Types

type Hosts

type Hosts []string

func (Hosts) Contains

func (hs Hosts) Contains(host string) bool

func (*Hosts) Set

func (hs *Hosts) Set(host string) error

func (*Hosts) String

func (hs *Hosts) String() string

type Options

type Options struct {
	ServiceAccount     ServiceAccount
	Bucket             string
	MaxHTTPConnections int
	DataSourceName     string
	AllowedHosts       Hosts
	Port               int
	ObjectPrefix       string
	Verbose            bool
}

func (*Options) Parse

func (o *Options) Parse(args []string) error

type ServiceAccount

type ServiceAccount struct {
	Path        string `json:"-"`
	ClientEmail string `json:"client_email"`
	PrivateKey  string `json:"private_key"`
	ProjectID   string `json:"project_id"`
}

func (*ServiceAccount) Set

func (a *ServiceAccount) Set(path string) error

func (*ServiceAccount) String

func (a *ServiceAccount) String() string

func (*ServiceAccount) UnmarshalJSON

func (a *ServiceAccount) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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