Documentation
¶
Index ¶
Constants ¶
View Source
const ( SuperusersCollection = "_superusers" EnvConfigPath = "PBCTL_CONFIG" EnvProfile = "PBCTL_PROFILE" EnvReadOnly = "PBCTL_READ_ONLY" EnvURL = "PBCTL_URL" EnvToken = "PBCTL_TOKEN" EnvIdentity = "PBCTL_IDENTITY" EnvPassword = "PBCTL_PASSWORD" EnvProfileName = "(environment)" )
Variables ¶
View Source
var PolicyPath = "/etc/pbctl/policy.json"
Functions ¶
Types ¶
type File ¶
type Policy ¶
type Policy struct {
ReadOnly bool `json:"read_only"`
ReadOnlyHosts []string `json:"read_only_hosts"`
}
func LoadPolicy ¶
func (*Policy) ForcesReadOnly ¶
type Profile ¶
type Profile struct {
URL string `json:"url"`
AuthCollection string `json:"auth_collection,omitempty"`
Identity string `json:"identity,omitempty"`
Password string `json:"password,omitempty"`
PasswordEnv string `json:"password_env,omitempty"`
Token string `json:"token,omitempty"`
TokenEnv string `json:"token_env,omitempty"`
Gateway bool `json:"gateway,omitempty"`
GatewayKey string `json:"gateway_key,omitempty"`
ReadOnly bool `json:"read_only"`
ConfirmWrites bool `json:"confirm_writes,omitempty"`
}
func (*Profile) Collection ¶
func (*Profile) HasCredentials ¶
func (*Profile) ResolvedPassword ¶
func (*Profile) ResolvedToken ¶
Click to show internal directories.
Click to hide internal directories.