Documentation ¶
Overview ¶
Package cbtrc encapsulates common code for reading .cbtrc files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Project, Instance string // required
Creds string // optional
AdminEndpoint string // optional
DataEndpoint string // optional
}
Config represents a configuration.
func (*Config) CheckFlags ¶
func (c *Config) CheckFlags(required RequiredFlags) error
CheckFlags checks that the required config values are set.
func (*Config) RegisterFlags ¶
func (c *Config) RegisterFlags()
RegisterFlags registers a set of standard flags for this config. It should be called before flag.Parse.
type RequiredFlags ¶
type RequiredFlags uint
const ( ProjectRequired RequiredFlags = 1 << iota InstanceRequired )
const NoneRequired RequiredFlags = 0
const ProjectAndInstanceRequired RequiredFlags = ProjectRequired & InstanceRequired
Click to show internal directories.
Click to hide internal directories.