resources

package
v6.41.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const UnlimitedAppInstances int = -1
View Source
const UnlimitedReservedRoutePorts string = "-1"
View Source
const UnlimitedRoutes string = "-1"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppFileResource

type AppFileResource struct {
	Sha1 string `json:"sha1"`
	Size int64  `json:"size"`
	Path string `json:"fn"`
	Mode string `json:"mode"`
}

func (AppFileResource) ToIntegrityFields

func (resource AppFileResource) ToIntegrityFields() IntegrityFields

type AppRouteEntity

type AppRouteEntity struct {
	Host   string
	Domain struct {
		Resource
		Entity struct {
			Name string
		}
	}
}

type AppRouteResource

type AppRouteResource struct {
	Resource
	Entity AppRouteEntity
}

func (AppRouteResource) ToFields

func (resource AppRouteResource) ToFields() (route models.RouteSummary)

func (AppRouteResource) ToModel

func (resource AppRouteResource) ToModel() (route models.RouteSummary)

type ApplicationEntity

type ApplicationEntity struct {
	Name                    *string                 `json:"name,omitempty"`
	Command                 *string                 `json:"command,omitempty"`
	DetectedStartCommand    *string                 `json:"detected_start_command,omitempty"`
	State                   *string                 `json:"state,omitempty"`
	SpaceGUID               *string                 `json:"space_guid,omitempty"`
	Instances               *int                    `json:"instances,omitempty"`
	Memory                  *int64                  `json:"memory,omitempty"`
	DiskQuota               *int64                  `json:"disk_quota,omitempty"`
	StackGUID               *string                 `json:"stack_guid,omitempty"`
	Stack                   *StackResource          `json:"stack,omitempty"`
	Routes                  *[]AppRouteResource     `json:"routes,omitempty"`
	Buildpack               *string                 `json:"buildpack,omitempty"`
	DetectedBuildpack       *string                 `json:"detected_buildpack,omitempty"`
	EnvironmentJSON         *map[string]interface{} `json:"environment_json,omitempty"`
	HealthCheckType         *string                 `json:"health_check_type,omitempty"`
	HealthCheckHTTPEndpoint *string                 `json:"health_check_http_endpoint,omitempty"`
	HealthCheckTimeout      *int                    `json:"health_check_timeout,omitempty"`
	PackageState            *string                 `json:"package_state,omitempty"`
	StagingFailedReason     *string                 `json:"staging_failed_reason,omitempty"`
	DockerImage             *string                 `json:"docker_image,omitempty"`
	DockerCredentials       *DockerCredentials      `json:"docker_credentials,omitempty"`
	EnableSSH               *bool                   `json:"enable_ssh,omitempty"`
	PackageUpdatedAt        *time.Time              `json:"package_updated_at,omitempty"`
}

func NewApplicationEntityFromAppParams

func NewApplicationEntityFromAppParams(app models.AppParams) ApplicationEntity

type ApplicationResource

type ApplicationResource struct {
	Resource
	Entity ApplicationEntity
}

func (ApplicationResource) ToFields

func (resource ApplicationResource) ToFields() (app models.ApplicationFields)

func (ApplicationResource) ToModel

func (resource ApplicationResource) ToModel() (app models.Application)

type AuthTokenEntity

type AuthTokenEntity struct {
	Label    string
	Provider string
}

type AuthTokenResource

type AuthTokenResource struct {
	Resource
	Entity AuthTokenEntity
}

func (AuthTokenResource) ToFields

func (resource AuthTokenResource) ToFields() (authToken models.ServiceAuthTokenFields)

type BuildpackEntity

type BuildpackEntity struct {
	Name     string `json:"name"`
	Stack    string `json:"stack,omitempty"`
	Position *int   `json:"position,omitempty"`
	Enabled  *bool  `json:"enabled,omitempty"`
	Key      string `json:"key,omitempty"`
	Filename string `json:"filename,omitempty"`
	Locked   *bool  `json:"locked,omitempty"`
}

type BuildpackResource

type BuildpackResource struct {
	Resource
	Entity BuildpackEntity
}

func (BuildpackResource) ToFields

func (resource BuildpackResource) ToFields() models.Buildpack

type DockerCredentials

type DockerCredentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type DomainEntity

type DomainEntity struct {
	Name                   string `json:"name"`
	OwningOrganizationGUID string `json:"owning_organization_guid,omitempty"`
	SharedOrganizationsURL string `json:"shared_organizations_url,omitempty"`
	RouterGroupGUID        string `json:"router_group_guid,omitempty"`
	RouterGroupType        string `json:"router_group_type,omitempty"`
	Wildcard               bool   `json:"wildcard"`
}

type DomainResource

type DomainResource struct {
	Resource
	Entity DomainEntity
}

func (DomainResource) ToFields

func (resource DomainResource) ToFields() models.DomainFields

type EventResource

type EventResource interface {
	ToFields() models.EventFields
}

type EventResourceNewV2

type EventResourceNewV2 struct {
	Resource
	Entity struct {
		Timestamp time.Time
		Type      string
		Actor     string `json:"actor"`
		ActorName string `json:"actor_name"`
		Metadata  map[string]interface{}
	}
}

func (EventResourceNewV2) ToFields

func (resource EventResourceNewV2) ToFields() models.EventFields

type EventResourceOldV2

type EventResourceOldV2 struct {
	Resource
	Entity struct {
		Timestamp       time.Time
		ExitDescription string `json:"exit_description"`
		ExitStatus      int    `json:"exit_status"`
		InstanceIndex   int    `json:"instance_index"`
	}
}

func (EventResourceOldV2) ToFields

func (resource EventResourceOldV2) ToFields() models.EventFields

type FeatureFlagResource

type FeatureFlagResource struct {
	Entity models.FeatureFlag
}

func (FeatureFlagResource) ToFields

func (resource FeatureFlagResource) ToFields() (flag models.FeatureFlag)

type IntegrityFields

type IntegrityFields struct {
	Sha1 string `json:"sha1"`
	Size int64  `json:"size"`
}

type LastOperation

type LastOperation struct {
	Type        string `json:"type"`
	State       string `json:"state"`
	Description string `json:"description"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
}

type Metadata

type Metadata struct {
	GUID string `json:"guid"`
	URL  string `json:"url,omitempty"`
}

type OrganizationEntity

type OrganizationEntity struct {
	Name            string        `json:"name"`
	QuotaDefinition QuotaResource `json:"quota_definition"`
	Spaces          []SpaceResource
	Domains         []DomainResource
	SpaceQuotas     []SpaceQuotaResource `json:"space_quota_definitions"`
}

type OrganizationResource

type OrganizationResource struct {
	Resource
	Entity OrganizationEntity
}

func (OrganizationResource) ToFields

func (resource OrganizationResource) ToFields() (fields models.OrganizationFields)

func (OrganizationResource) ToModel

func (resource OrganizationResource) ToModel() (org models.Organization)

type PaginatedApplicationResources

type PaginatedApplicationResources struct {
	Resources []ApplicationResource
}

type PaginatedAuthTokenResources

type PaginatedAuthTokenResources struct {
	Resources []AuthTokenResource
}

type PaginatedQuotaResources

type PaginatedQuotaResources struct {
	Resources []QuotaResource
}

type PaginatedSecurityGroupResources

type PaginatedSecurityGroupResources struct {
	Resources []SecurityGroupResource
}

type PaginatedServiceInstanceResources

type PaginatedServiceInstanceResources struct {
	TotalResults int `json:"total_results"`
	Resources    []ServiceInstanceResource
}

type PaginatedServiceOfferingResources

type PaginatedServiceOfferingResources struct {
	Resources []ServiceOfferingResource
}

type PaginatedSpaceQuotaResources

type PaginatedSpaceQuotaResources struct {
	Resources []SpaceQuotaResource
}

type PaginatedStackResources

type PaginatedStackResources struct {
	Resources []StackResource
}

type QuotaResource

type QuotaResource struct {
	Resource
	Entity models.QuotaResponse
}

func (QuotaResource) ToFields

func (resource QuotaResource) ToFields() models.QuotaFields

type Resource

type Resource struct {
	Metadata Metadata
}

type RouteEntity

type RouteEntity struct {
	Host            string                  `json:"host"`
	Domain          DomainResource          `json:"domain"`
	Path            string                  `json:"path"`
	Port            int                     `json:"port"`
	Space           SpaceResource           `json:"space"`
	Apps            []ApplicationResource   `json:"apps"`
	ServiceInstance ServiceInstanceResource `json:"service_instance"`
}

type RouteResource

type RouteResource struct {
	Resource
	Entity RouteEntity
}

func (RouteResource) ToFields

func (resource RouteResource) ToFields() (fields models.Route)

func (RouteResource) ToModel

func (resource RouteResource) ToModel() (route models.Route)

type SecurityGroup

type SecurityGroup struct {
	models.SecurityGroupFields
	Spaces []SpaceResource
}

type SecurityGroupResource

type SecurityGroupResource struct {
	Resource
	Entity SecurityGroup
}

func (SecurityGroupResource) ToFields

func (resource SecurityGroupResource) ToFields() (fields models.SecurityGroupFields)

func (SecurityGroupResource) ToModel

func (resource SecurityGroupResource) ToModel() (asg models.SecurityGroup)

type ServiceBindingEntity

type ServiceBindingEntity struct {
	AppGUID string `json:"app_guid"`
}

type ServiceBindingResource

type ServiceBindingResource struct {
	Resource
	Entity ServiceBindingEntity
}

func (ServiceBindingResource) ToFields

type ServiceBrokerEntity

type ServiceBrokerEntity struct {
	GUID     string
	Name     string
	Password string `json:"auth_password"`
	Username string `json:"auth_username"`
	URL      string `json:"broker_url"`
}

type ServiceBrokerResource

type ServiceBrokerResource struct {
	Resource
	Entity ServiceBrokerEntity
}

func (ServiceBrokerResource) ToFields

func (resource ServiceBrokerResource) ToFields() (fields models.ServiceBroker)

type ServiceInstanceEntity

type ServiceInstanceEntity struct {
	Name            string                   `json:"name"`
	DashboardURL    string                   `json:"dashboard_url"`
	Tags            []string                 `json:"tags"`
	ServiceBindings []ServiceBindingResource `json:"service_bindings"`
	ServiceKeys     []ServiceKeyResource     `json:"service_keys"`
	ServicePlan     ServicePlanResource      `json:"service_plan"`
	LastOperation   LastOperation            `json:"last_operation"`
}

type ServiceInstanceResource

type ServiceInstanceResource struct {
	Resource
	Entity ServiceInstanceEntity
}

func (ServiceInstanceResource) ToFields

func (ServiceInstanceResource) ToModel

func (resource ServiceInstanceResource) ToModel() (instance models.ServiceInstance)

type ServiceKeyEntity

type ServiceKeyEntity struct {
	Name                string                 `json:"name"`
	ServiceInstanceGUID string                 `json:"service_instance_guid"`
	ServiceInstanceURL  string                 `json:"service_instance_url"`
	Credentials         map[string]interface{} `json:"credentials"`
}

type ServiceKeyResource

type ServiceKeyResource struct {
	Resource
	Entity ServiceKeyEntity
}

func (ServiceKeyResource) ToFields

func (resource ServiceKeyResource) ToFields() models.ServiceKeyFields

func (ServiceKeyResource) ToModel

func (resource ServiceKeyResource) ToModel() models.ServiceKey

type ServiceMigrateV1ToV2Response

type ServiceMigrateV1ToV2Response struct {
	ChangedCount int `json:"changed_count"`
}

type ServiceOfferingEntity

type ServiceOfferingEntity struct {
	Label        string                `json:"label"`
	Version      string                `json:"version"`
	Description  string                `json:"description"`
	Provider     string                `json:"provider"`
	BrokerGUID   string                `json:"service_broker_guid"`
	Requires     []string              `json:"requires"`
	ServicePlans []ServicePlanResource `json:"service_plans"`
	Extra        ServiceOfferingExtra
}

type ServiceOfferingExtra

type ServiceOfferingExtra struct {
	DocumentationURL string `json:"documentationURL"`
}

func (*ServiceOfferingExtra) UnmarshalJSON

func (resource *ServiceOfferingExtra) UnmarshalJSON(rawData []byte) error

type ServiceOfferingResource

type ServiceOfferingResource struct {
	Resource
	Entity ServiceOfferingEntity
}

func (ServiceOfferingResource) ToFields

func (ServiceOfferingResource) ToModel

func (resource ServiceOfferingResource) ToModel() models.ServiceOffering

type ServicePlanDescription

type ServicePlanDescription struct {
	ServiceLabel    string
	ServicePlanName string
	ServiceProvider string
}

func (ServicePlanDescription) String

func (planDesc ServicePlanDescription) String() string

type ServicePlanEntity

type ServicePlanEntity struct {
	Name                string
	Free                bool
	Public              bool
	Active              bool
	Description         string                  `json:"description"`
	ServiceOfferingGUID string                  `json:"service_guid"`
	ServiceOffering     ServiceOfferingResource `json:"service"`
}

type ServicePlanResource

type ServicePlanResource struct {
	Resource
	Entity ServicePlanEntity
}

func (ServicePlanResource) ToFields

func (resource ServicePlanResource) ToFields() (fields models.ServicePlanFields)

type ServicePlanVisibilityResource

type ServicePlanVisibilityResource struct {
	Resource
	Entity models.ServicePlanVisibilityFields
}

func (ServicePlanVisibilityResource) ToFields

type SpaceEntity

type SpaceEntity struct {
	Name             string
	Organization     OrganizationResource
	Applications     []ApplicationResource `json:"apps"`
	Domains          []DomainResource
	ServiceInstances []ServiceInstanceResource `json:"service_instances"`
	SecurityGroups   []SecurityGroupResource   `json:"security_groups"`
	SpaceQuotaGUID   string                    `json:"space_quota_definition_guid"`
	AllowSSH         bool                      `json:"allow_ssh"`
}

type SpaceQuotaResource

type SpaceQuotaResource struct {
	Resource
	Entity models.SpaceQuotaResponse
}

func (SpaceQuotaResource) ToModel

func (resource SpaceQuotaResource) ToModel() models.SpaceQuota

type SpaceResource

type SpaceResource struct {
	Resource
	Entity SpaceEntity
}

func (SpaceResource) ToFields

func (resource SpaceResource) ToFields() (fields models.SpaceFields)

func (SpaceResource) ToModel

func (resource SpaceResource) ToModel() (space models.Space)

type StackEntity

type StackEntity struct {
	Name        string
	Description string
}

type StackResource

type StackResource struct {
	Resource
	Entity StackEntity
}

func (StackResource) ToFields

func (resource StackResource) ToFields() *models.Stack

type UAAUserFields

type UAAUserFields struct {
	ID string
}

type UAAUserResource

type UAAUserResource struct {
	Username string                 `json:"userName"`
	Emails   []UAAUserResourceEmail `json:"emails"`
	Password string                 `json:"password"`
	Name     UAAUserResourceName    `json:"name"`
}

func NewUAAUserResource

func NewUAAUserResource(username, password string) UAAUserResource

type UAAUserResourceEmail

type UAAUserResourceEmail struct {
	Value string `json:"value"`
}

type UAAUserResourceName

type UAAUserResourceName struct {
	GivenName  string `json:"givenName"`
	FamilyName string `json:"familyName"`
}

type UAAUserResources

type UAAUserResources struct {
	Resources []struct {
		ID       string
		Username string
	}
}

type UserEntity

type UserEntity struct {
	Name  string `json:"username,omitempty"`
	Admin bool
}

type UserResource

type UserResource struct {
	Resource
	Entity UserEntity
}

func (UserResource) ToFields

func (resource UserResource) ToFields() models.UserFields

Jump to

Keyboard shortcuts

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