Documentation ¶
Index ¶
- Constants
- func CheckUserScope(jwtToken, scope string) (bool, error)
- func CreateBackupJSON(backupModel models.BackupModel) (string, error)
- func FreakOut(err error)
- func GetFeatureFlags(ccAPI cCApi) (*[]*models.FeatureFlagModel, error)
- func GetOrgQuotaDefinitions(ccAPI cCApi) (interface{}, error)
- func GetOrgsResourcesRecurively(ccAPI cCApi) ([]*models.ResourceModel, error)
- func GetResources(cliConnection plugin.CliConnection, url string, relationsDepth int) []*models.ResourceModel
- func GetSecurityGroups(ccAPI cCApi) (interface{}, error)
- func GetSharedDomains(ccAPI cCApi) (interface{}, error)
- func GetSpaceQuotaDefinitions(ccAPI cCApi) (interface{}, error)
- func ReadBackupJSON(jsonBytes []byte) (*models.BackupModel, error)
- func RestoreFlagsResourceModels(flagResources interface{}) *[]*models.FeatureFlagModel
- func RestoreOrgResourceModels(orgResources interface{}) *[]*models.ResourceModel
- func RestoreQuotaResourceModels(quotaResources interface{}) *[]*models.ResourceModel
- func RestoreSpaceQuotaResourceModels(spaceQuotaResources interface{}) *[]*models.ResourceModel
- type CCResources
- func CreateFeatureFlagsCCResources(ccAPI cCApi) *CCResources
- func CreateOrgCCResources(ccAPI cCApi) *CCResources
- func CreateQuotaCCResources(ccAPI cCApi) *CCResources
- func CreateSecurityGroupsCCResources(ccAPI cCApi) *CCResources
- func CreateSharedDomainsCCResources(ccAPI cCApi) *CCResources
- func CreateSpaceQuotaCCResources(ccAPI cCApi) *CCResources
- func (ccResources *CCResources) GetResource(url string, relationsDepth int) *models.ResourceModel
- func (ccResources *CCResources) GetResources(url string, relationsDepth int) []*models.ResourceModel
- func (ccResources *CCResources) TransformToResourceModels(resources interface{}) *[]*models.ResourceModel
- type CFDroplet
- type CFFileReader
- type CFFileWriter
- type CFPackager
- type CliConnectionCCApi
- type Droplet
- type FileReader
- type FileWriter
- type Packager
Constants ¶
const OrgsURL = "/v2/organizations"
OrgsURL represents the organizations url path
Variables ¶
This section is empty.
Functions ¶
func CheckUserScope ¶
CheckUserScope takes a jwt token and checks for a given uaa scope
func CreateBackupJSON ¶
func CreateBackupJSON(backupModel models.BackupModel) (string, error)
CreateBackupJSON creates backup json
func GetFeatureFlags ¶
func GetFeatureFlags(ccAPI cCApi) (*[]*models.FeatureFlagModel, error)
GetFeatureFlags returns feature flags
func GetOrgQuotaDefinitions ¶
func GetOrgQuotaDefinitions(ccAPI cCApi) (interface{}, error)
GetOrgQuotaDefinitions returns the Organization Quota definitions
func GetOrgsResourcesRecurively ¶
func GetOrgsResourcesRecurively(ccAPI cCApi) ([]*models.ResourceModel, error)
GetOrgsResourcesRecurively returns all orgs
func GetResources ¶
func GetResources(cliConnection plugin.CliConnection, url string, relationsDepth int) []*models.ResourceModel
GetResources retrieves resources for a given url
func GetSecurityGroups ¶
func GetSecurityGroups(ccAPI cCApi) (interface{}, error)
GetSecurityGroups return security groups
func GetSharedDomains ¶
func GetSharedDomains(ccAPI cCApi) (interface{}, error)
GetSharedDomains returns shared domains
func GetSpaceQuotaDefinitions ¶
func GetSpaceQuotaDefinitions(ccAPI cCApi) (interface{}, error)
GetSpaceQuotaDefinitions returns the Spaces Quota definitions
func ReadBackupJSON ¶
func ReadBackupJSON(jsonBytes []byte) (*models.BackupModel, error)
ReadBackupJSON reads backup json
func RestoreFlagsResourceModels ¶
func RestoreFlagsResourceModels(flagResources interface{}) *[]*models.FeatureFlagModel
RestoreFlagsResourceModels gets flags as resource models
func RestoreOrgResourceModels ¶
func RestoreOrgResourceModels(orgResources interface{}) *[]*models.ResourceModel
RestoreOrgResourceModels gets orgs as resource models
func RestoreQuotaResourceModels ¶
func RestoreQuotaResourceModels(quotaResources interface{}) *[]*models.ResourceModel
RestoreQuotaResourceModels gets quotas as resource models
func RestoreSpaceQuotaResourceModels ¶
func RestoreSpaceQuotaResourceModels(spaceQuotaResources interface{}) *[]*models.ResourceModel
RestoreSpaceQuotaResourceModels gets space quotas as resource models
Types ¶
type CCResources ¶
type CCResources struct {
// contains filtered or unexported fields
}
CCResources represents cc resources
func CreateFeatureFlagsCCResources ¶
func CreateFeatureFlagsCCResources(ccAPI cCApi) *CCResources
CreateFeatureFlagsCCResources creates feature flags resources
func CreateOrgCCResources ¶
func CreateOrgCCResources(ccAPI cCApi) *CCResources
CreateOrgCCResources creates org resource
func CreateQuotaCCResources ¶
func CreateQuotaCCResources(ccAPI cCApi) *CCResources
CreateQuotaCCResources creates quota org resources
func CreateSecurityGroupsCCResources ¶
func CreateSecurityGroupsCCResources(ccAPI cCApi) *CCResources
CreateSecurityGroupsCCResources creates security groups resources
func CreateSharedDomainsCCResources ¶
func CreateSharedDomainsCCResources(ccAPI cCApi) *CCResources
CreateSharedDomainsCCResources creates shared domains resources
func CreateSpaceQuotaCCResources ¶
func CreateSpaceQuotaCCResources(ccAPI cCApi) *CCResources
CreateSpaceQuotaCCResources creates space quota org resources
func (*CCResources) GetResource ¶
func (ccResources *CCResources) GetResource(url string, relationsDepth int) *models.ResourceModel
GetResource gets a resource
func (*CCResources) GetResources ¶
func (ccResources *CCResources) GetResources(url string, relationsDepth int) []*models.ResourceModel
GetResources gets resources
func (*CCResources) TransformToResourceModels ¶
func (ccResources *CCResources) TransformToResourceModels(resources interface{}) *[]*models.ResourceModel
TransformToResourceModels transforms interface to resource models
type CFDroplet ¶
type CFDroplet struct { Cli plugin.CliConnection Packager Packager HTTPClient *http.Client }
CFDroplet utility for saving and whatnot.
func NewCFDroplet ¶
func NewCFDroplet(cli plugin.CliConnection, packager Packager) *CFDroplet
NewCFDroplet builds a new CF droplet
func (*CFDroplet) GetPackager ¶
GetPackager attached to this dropplet.
func (*CFDroplet) SaveDroplet ¶
SaveDroplet to the local filesystem.
func (*CFDroplet) UploadDroplet ¶
UploadDroplet uploads an apps droplet
type CFPackager ¶
type CFPackager struct { Cli plugin.CliConnection Writer FileWriter Reader FileReader }
CFPackager real implementation to download droplets.
func (*CFPackager) GetDroplet ¶
func (packager *CFPackager) GetDroplet(guid string) ([]byte, error)
GetDroplet from CF
func (*CFPackager) SaveDropletToFile ¶
func (packager *CFPackager) SaveDropletToFile(filePath string, data []byte) error
SaveDropletToFile writes a downloaded droplet to file
func (*CFPackager) UploadDroplet ¶
func (packager *CFPackager) UploadDroplet(guid, path string) error
UploadDroplet uploads an apps droplet
type CliConnectionCCApi ¶
type CliConnectionCCApi struct {
CliConnection plugin.CliConnection
}
CliConnectionCCApi represents the cf cli connection
type Droplet ¶
type Droplet interface { SaveDroplet(name string, path string) error GetPackager() *Packager UploadDroplet(name, path string) error }
Droplet interface
type FileReader ¶
FileReader test shim for reading a file.
type FileWriter ¶
FileWriter test shim for writing to a file.