Documentation
¶
Overview ¶
Package config provides utilities for reading and writing cf-mgmt's configuration.
Index ¶
- Variables
- func DeleteDirectory(path string) error
- func FileOrDirectoryExists(path string) bool
- func FindFiles(configDir, pattern string) ([]string, error)
- func LoadFile(configFile string, dataType interface{}) error
- func LoadFileBytes(path string) ([]byte, error)
- func WriteFile(configFile string, dataType interface{}) error
- func WriteFileBytes(configFile string, data []byte) error
- type ASGConfig
- type GlobalConfig
- type Manager
- type OrgConfig
- type Orgs
- type Reader
- type SpaceConfig
- type Spaces
- type Updater
- type UserMgmt
Constants ¶
This section is empty.
Variables ¶
var DefaultProtectedOrgs = []string{
"system",
"p-spring-cloud-services",
"splunk-nozzle-org",
"redis-test-ORG*",
}
DefaultProtectedOrgs lists the organizations that are considered protected and should never be deleted by cf-mgmt.
Functions ¶
func DeleteDirectory ¶ added in v0.0.68
DeleteDirectory - deletes a directory
func FileOrDirectoryExists ¶ added in v0.0.68
FileOrDirectoryExists - checks if file exists
func LoadFileBytes ¶ added in v0.0.68
LoadFileBytes - Load a file and return the bytes
func WriteFileBytes ¶ added in v0.0.68
WriteFileBytes -
Types ¶
type GlobalConfig ¶ added in v0.0.68
type GlobalConfig struct {
EnableDeleteIsolationSegments bool `yaml:"enable-delete-isolation-segments"`
}
GlobalConfig configuration for global settings
type Manager ¶
Manager can read and write the cf-mgmt configuration.
func NewManager ¶
NewManager creates a Manager that is backed by a set of YAML files in the specified configuration directory.
type OrgConfig ¶ added in v0.0.48
type OrgConfig struct {
Org string `yaml:"org"`
BillingManagerGroup string `yaml:"org-billingmanager-group,omitempty"`
ManagerGroup string `yaml:"org-manager-group,omitempty"`
AuditorGroup string `yaml:"org-auditor-group,omitempty"`
BillingManager UserMgmt `yaml:"org-billingmanager"`
Manager UserMgmt `yaml:"org-manager"`
Auditor UserMgmt `yaml:"org-auditor"`
PrivateDomains []string `yaml:"private-domains"`
RemovePrivateDomains bool `yaml:"enable-remove-private-domains"`
EnableOrgQuota bool `yaml:"enable-org-quota"`
MemoryLimit int `yaml:"memory-limit"`
InstanceMemoryLimit int `yaml:"instance-memory-limit"`
TotalRoutes int `yaml:"total-routes"`
TotalServices int `yaml:"total-services"`
PaidServicePlansAllowed bool `yaml:"paid-service-plans-allowed"`
RemoveUsers bool `yaml:"enable-remove-users"`
TotalPrivateDomains int `yaml:"total_private_domains"`
TotalReservedRoutePorts int `yaml:"total_reserved_route_ports"`
TotalServiceKeys int `yaml:"total_service_keys"`
AppInstanceLimit int `yaml:"app_instance_limit"`
DefaultIsoSegment string `yaml:"default_isolation_segment"`
}
OrgConfig describes configuration for an org.
func (*OrgConfig) GetAuditorGroups ¶ added in v0.0.68
func (*OrgConfig) GetBillingManagerGroups ¶ added in v0.0.68
func (*OrgConfig) GetManagerGroups ¶ added in v0.0.68
type Orgs ¶ added in v0.0.68
type Orgs struct {
Orgs []string `yaml:"orgs"`
EnableDeleteOrgs bool `yaml:"enable-delete-orgs"`
ProtectedOrgs []string `yaml:"protected_orgs"`
}
Orgs contains cf-mgmt configuration for all orgs.
type Reader ¶ added in v0.0.68
type Reader interface {
Orgs() (*Orgs, error)
OrgSpaces(orgName string) (*Spaces, error)
Spaces() ([]Spaces, error)
GetOrgConfigs() ([]OrgConfig, error)
GetSpaceConfigs() ([]SpaceConfig, error)
GetASGConfigs() ([]ASGConfig, error)
GetGlobalConfig() (GlobalConfig, error)
GetSpaceDefaults() (*SpaceConfig, error)
GetOrgConfig(orgName string) (*OrgConfig, error)
GetSpaceConfig(orgName, spaceName string) (*SpaceConfig, error)
}
Reader is used to read the cf-mgmt configuration.
type SpaceConfig ¶ added in v0.0.48
type SpaceConfig struct {
Org string `yaml:"org"`
Space string `yaml:"space"`
Developer UserMgmt `yaml:"space-developer"`
Manager UserMgmt `yaml:"space-manager"`
Auditor UserMgmt `yaml:"space-auditor"`
DeveloperGroup string `yaml:"space-developer-group,omitempty"`
ManagerGroup string `yaml:"space-manager-group,omitempty"`
AuditorGroup string `yaml:"space-auditor-group,omitempty"`
AllowSSH bool `yaml:"allow-ssh"`
EnableSpaceQuota bool `yaml:"enable-space-quota"`
MemoryLimit int `yaml:"memory-limit"`
InstanceMemoryLimit int `yaml:"instance-memory-limit"`
TotalRoutes int `yaml:"total-routes"`
TotalServices int `yaml:"total-services"`
PaidServicePlansAllowed bool `yaml:"paid-service-plans-allowed"`
EnableSecurityGroup bool `yaml:"enable-security-group"`
SecurityGroupContents string `yaml:"security-group-contents,omitempty"`
RemoveUsers bool `yaml:"enable-remove-users"`
TotalPrivateDomains int `yaml:"total_private_domains"`
TotalReservedRoutePorts int `yaml:"total_reserved_route_ports"`
TotalServiceKeys int `yaml:"total_service_keys"`
AppInstanceLimit int `yaml:"app_instance_limit"`
IsoSegment string `yaml:"isolation_segment"`
ASGs []string `yaml:"named-security-groups"`
}
SpaceConfig describes attributes for a space.
func (*SpaceConfig) GetAuditorGroups ¶ added in v0.0.68
func (i *SpaceConfig) GetAuditorGroups() []string
func (*SpaceConfig) GetDeveloperGroups ¶ added in v0.0.68
func (i *SpaceConfig) GetDeveloperGroups() []string
func (*SpaceConfig) GetManagerGroups ¶ added in v0.0.68
func (i *SpaceConfig) GetManagerGroups() []string
type Spaces ¶ added in v0.0.68
type Spaces struct {
Org string `yaml:"org"`
Spaces []string `yaml:"spaces"`
EnableDeleteSpaces bool `yaml:"enable-delete-spaces"`
}
Spaces describes cf-mgmt config for all spaces.
type Updater ¶ added in v0.0.68
type Updater interface {
AddOrgToConfig(orgConfig *OrgConfig) error
AddSpaceToConfig(spaceConfig *SpaceConfig) error
AddSecurityGroupToSpace(orgName, spaceName string, securityGroupDefinition []byte) error
AddSecurityGroup(securityGroupName string, securityGroupDefinition []byte) error
CreateConfigIfNotExists(uaaOrigin string) error
DeleteConfigIfExists() error
SaveOrgSpaces(spaces *Spaces) error
SaveSpaceConfig(spaceConfig *SpaceConfig) error
SaveOrgConfig(orgConfig *OrgConfig) error
DeleteOrgConfig(orgName string) error
DeleteSpaceConfig(orgName, spaceName string) error
SaveOrgs(*Orgs) error
}
Updater is used to update the cf-mgmt configuration.
type UserMgmt ¶ added in v0.0.68
type UserMgmt struct {
LDAPUsers []string `yaml:"ldap_users"`
Users []string `yaml:"users"`
SamlUsers []string `yaml:"saml_users"`
LDAPGroup string `yaml:"ldap_group,omitempty"`
LDAPGroups []string `yaml:"ldap_groups"`
}
UserMgmt specifies users and groups that can be associated to a particular org or space.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
This file was generated by counterfeiter
|
This file was generated by counterfeiter |