v2

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppNotFound = errors.New("application not found")
)

Functions

This section is empty.

Types

type AppResourcesEntity

type AppResourcesEntity struct {
	Metadata Metadata `json:"metadata"`
	Entity   Entity   `json:"entity"`
}

type DomainResponse

type DomainResponse struct {
	Pagination struct {
		TotalResults int    `json:"total_results"`
		TotalPages   int    `json:"total_pages"`
		NextUrl      string `json:"next_url"`
		PrevUrl      string `json:"prev_url"`
	} `json:"pagination"`
	Resources []struct {
		Metadata struct {
			GUID string `json:"guid"`
			Url  string `json:"url"`
		} `json:"metadata"`
		Entity struct {
			Name     string `json:"name"`
			Internal bool   `json:"internal"`
		} `json:"entity"`
	} `json:"resources"`
}

DomainResponse reponse while loading domains

type Entity

type Entity struct {
	Name                  string `json:"name"`
	Production            bool   `json:"production"`
	SpaceGUID             string `json:"space_guid"`
	StackGUID             string `json:"stack_guid"`
	Buildpack             string `json:"buildpack"`
	DetectedBuildpack     string `json:"detected_buildpack"`
	DetectedBuildpackGUID string `json:"detected_buildpack_guid"`
	EnvironmentJSON       struct {
		APPLICATIONNAME string `json:"APPLICATION_NAME"`
		OPTIMIZEMEMORY  string `json:"OPTIMIZE_MEMORY"`
	} `json:"environment_json"`
	Memory                   int         `json:"memory"`
	Instances                int         `json:"instances"`
	DiskQuota                int         `json:"disk_quota"`
	State                    string      `json:"state"`
	Version                  string      `json:"version"`
	Command                  string      `json:"command"`
	Console                  bool        `json:"console"`
	Debug                    interface{} `json:"debug"`
	StagingTaskID            string      `json:"staging_task_id"`
	PackageState             string      `json:"package_state"`
	HealthCheckType          string      `json:"health_check_type"`
	HealthCheckTimeout       int         `json:"health_check_timeout"`
	HealthCheckHTTPEndpoint  string      `json:"health_check_http_endpoint"`
	StagingFailedReason      interface{} `json:"staging_failed_reason"`
	StagingFailedDescription interface{} `json:"staging_failed_description"`
	Diego                    bool        `json:"diego"`
	DockerImage              interface{} `json:"docker_image"`
	DockerCredentials        struct {
		Username interface{} `json:"username"`
		Password interface{} `json:"password"`
	} `json:"docker_credentials"`
	PackageUpdatedAt     time.Time `json:"package_updated_at"`
	DetectedStartCommand string    `json:"detected_start_command"`
	EnableSSH            bool      `json:"enable_ssh"`
	Ports                []int     `json:"ports"`
	SpaceURL             string    `json:"space_url"`
	StackURL             string    `json:"stack_url"`
	RoutesURL            string    `json:"routes_url"`
	EventsURL            string    `json:"events_url"`
	ServiceBindingsURL   string    `json:"service_bindings_url"`
	RouteMappingsURL     string    `json:"route_mappings_url"`
}

type LegacyResourcesData

type LegacyResourcesData struct {
	Executor cli.CfExecutor
	Cli      cli.Calls
}

ResourcesData internal struct with connection an tracing options etc

func NewV2LegacyPush

func NewV2LegacyPush(conn plugin.CliConnection, traceLogging bool) *LegacyResourcesData

NewV2LegacyPush constructor

func (*LegacyResourcesData) GetDomain

func (resource *LegacyResourcesData) GetDomain(domains []map[string]string) (*[]Routes, error)

func (*LegacyResourcesData) MapRoute

func (resource *LegacyResourcesData) MapRoute(appName string, host string, domain string, path string) (err error)

MapRoute map route to application

func (*LegacyResourcesData) PushApplication

func (resource *LegacyResourcesData) PushApplication(parsedArguments *arguments.ParserArguments) error

func (*LegacyResourcesData) SwitchRoutesOnly

func (resource *LegacyResourcesData) SwitchRoutesOnly(venAppName string, venAppExists bool, appName string, routes []map[string]string) (err error)

SwitchRoutes switch route interface method to provide switch routes only option

func (*LegacyResourcesData) UnMapRoute

func (resource *LegacyResourcesData) UnMapRoute(appName string, host string, domain string, path string) (err error)

UnMapRoute remove route from application

type MetaDataEntity

type MetaDataEntity struct {
	TotalResults       int                  `json:"total_results"`
	TotalPages         int                  `json:"total_pages"`
	PrevURL            interface{}          `json:"prev_url"`
	NextURL            interface{}          `json:"next_url"`
	AppResourcesEntity []AppResourcesEntity `json:"resources"`
}

type Metadata

type Metadata struct {
	GUID      string    `json:"guid"`
	URL       string    `json:"url"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Push

type Push interface {
	PushApplication(parsedArguments *arguments.ParserArguments) error
	SwitchRoutesOnly(venAppName string, venAppExists bool, appName string, routes []map[string]string) error
}

Push interface with all v3 actions

type Resources

type Resources interface {
	GetAppMetadata(appName string) (*AppResourcesEntity, error)
	RenameApplication(oldName string, newName string) (err error)
	StopApplication(appName string) (err error)
	StartApplication(appName string) (err error)
	DeleteApplication(appName string) (err error)
	ShowCrashLogs(appName string) (err error)
	ListApplications() (err error)
}

type ResourcesData

type ResourcesData struct {
	// contains filtered or unexported fields
}

ResourcesData internal struct with connection an tracing options etc

func NewV2Resources

func NewV2Resources(conn plugin.CliConnection, traceLogging bool) *ResourcesData

NewV2Resources constructor

func (*ResourcesData) DeleteApplication

func (resource *ResourcesData) DeleteApplication(appName string) error

func (*ResourcesData) GetAppMetadata

func (resource *ResourcesData) GetAppMetadata(appName string) (*AppResourcesEntity, error)

GetAppMetadata

func (*ResourcesData) ListApplications

func (resource *ResourcesData) ListApplications() error

func (*ResourcesData) RenameApplication

func (resource *ResourcesData) RenameApplication(oldName, newName string) error

func (*ResourcesData) ShowCrashLogs

func (resource *ResourcesData) ShowCrashLogs(appName string) error

func (*ResourcesData) StartApplication

func (resource *ResourcesData) StartApplication(appName string) error

func (*ResourcesData) StopApplication

func (resource *ResourcesData) StopApplication(appName string) error

type Routes

type Routes struct {
	Host   string
	Domain string
	Path   string
}

Routes that contains all informations

Jump to

Keyboard shortcuts

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