cloudfoundry

package
v1.45.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(options LoginOptions) error

Login logs user in to Cloud Foundry via cf cli. Checks if user is logged in first, if not perform 'cf login' command with appropriate parameters

func LoginCheck

func LoginCheck(options LoginOptions) (bool, error)

LoginCheck checks if user is logged in to Cloud Foundry. If user is not logged in 'cf api' command will return string that contains 'User is not logged in' only if user is not logged in. If the returned string doesn't contain the substring 'User is not logged in' we know he is logged in.

func Logout

func Logout() error

Logout logs User out of Cloud Foundry Logout can be perforned via 'cf logout' command regardless if user is logged in or not

Types

type AbapBinding

type AbapBinding struct {
	Env     string `json:"env"`
	ID      string `json:"id"`
	Type    string `json:"type"`
	Version string `json:"version"`
}

AbapBinding contains information about service binding in Cloud Foundry

type AbapConnection

type AbapConnection struct {
	CommunicationArrangementID string `json:"communication_arrangement_id"`
	CommunicationScenarioID    string `json:"communication_scenario_id"`
	CommunicationSystemID      string `json:"communication_system_id"`
	Password                   string `json:"password"`
	Username                   string `json:"username"`
}

AbapConnection contains information about the ABAP connection for the ABAP endpoint

type LoginOptions

type LoginOptions struct {
	CfAPIEndpoint string
	CfOrg         string
	CfSpace       string
	Username      string
	Password      string
}

LoginOptions for logging in to CF

type Manifest added in v1.45.0

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

Manifest ...

func ReadManifest added in v1.45.0

func ReadManifest(name string) (Manifest, error)

ReadManifest Reads the manifest denoted by 'name'

func (Manifest) ApplicationHasProperty added in v1.45.0

func (m Manifest) ApplicationHasProperty(index int, name string) (bool, error)

ApplicationHasProperty Checks if the application denoted by 'index' has the property 'name'

func (Manifest) GetAppName added in v1.45.0

func (m Manifest) GetAppName(index int) (string, error)

GetAppName Gets the name of the app at 'index'

func (Manifest) GetApplicationProperty added in v1.45.0

func (m Manifest) GetApplicationProperty(index int, name string) (interface{}, error)

GetApplicationProperty ...

func (Manifest) GetApplications added in v1.45.0

func (m Manifest) GetApplications() ([]map[string]interface{}, error)

GetApplications Returns all applications denoted in the manifest file. The applications are returned as a slice of maps. Each app is represented by a map.

func (Manifest) GetName added in v1.45.0

func (m Manifest) GetName() string

GetName Returns the file name of the manifest.

func (Manifest) IsModified added in v1.45.0

func (m Manifest) IsModified() bool

IsModified ...

func (*Manifest) Transform added in v1.45.0

func (m *Manifest) Transform() error

Transform For each app in the manifest the first entry in the build packs list gets moved to the top level under the key 'buildpack'. The 'buildpacks' list is deleted.

func (*Manifest) WriteManifest added in v1.45.0

func (m *Manifest) WriteManifest() error

WriteManifest Writes the manifest to the file denoted by the name property (GetName()). The modified flag is resetted after the write operation.

type ServiceKey

type ServiceKey struct {
	Abap     AbapConnection `json:"abap"`
	Binding  AbapBinding    `json:"binding"`
	Systemid string         `json:"systemid"`
	URL      string         `json:"url"`
}

ServiceKey struct to parse CF Service Key

func ReadServiceKeyAbapEnvironment

func ReadServiceKeyAbapEnvironment(options ServiceKeyOptions, cfLogoutOption bool) (ServiceKey, error)

ReadServiceKeyAbapEnvironment from Cloud Foundry and returns it. Depending on user/developer requirements if he wants to perform further Cloud Foundry actions the cfLogoutOption parameters gives the option to logout after reading ABAP communication arrangement or not.

type ServiceKeyOptions

type ServiceKeyOptions struct {
	CfAPIEndpoint     string
	CfOrg             string
	CfSpace           string
	CfServiceInstance string
	CfServiceKey      string
	Username          string
	Password          string
}

ServiceKeyOptions for reading CF Service Key

Jump to

Keyboard shortcuts

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