Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( //ConvertTypeOrg indicates that the output returned represents an org ConvertTypeOrg = "org" //ConvertTypeSpace indicates that the output returned represents a space ConvertTypeSpace = "space" //ConvertTypeApp indicates that the output returned represents an app ConvertTypeApp = "app" )
Functions ¶
This section is empty.
Types ¶
type ConvertInput ¶ added in v1.1.0
type ConvertInput struct { //GUID is the GUID of the object to get the name of GUID string //OrgName is the name of the org to get the GUID of, or the org in which the // space or app you're fetching information for resides OrgName string //SpaceName is the name of the space to get the GUID of, or the space in which // the app you're fetching information for resides. If this is provided, // OrgName must also be provided. SpaceName string //AppName is the name of the app to get the GUID of. If this is provided, // SpaceName and OrgName must also be provided. AppName string }
ConvertInput is all of the information required for a call to Convert. If converting from Name to GUID, you must provide all names down to the level you are requesting information for. i.e: For Org name to GUID, you only need to provide org name For Space name to GUID, you need to provide org name and space name For App name to GUID, provide all three names. For converting from GUID to name, you only need to give the GUID because GUIDs are... globally unique (go figure). The function will search for what type of thing it belongs to.
func (ConvertInput) Validate ¶ added in v1.1.0
func (c ConvertInput) Validate() (err error)
Validate returns true if the values given in the ConvertInput struct are a combination valid to make a request.
type ConvertOutput ¶ added in v1.1.0
type ConvertOutput struct { //OrgGUID is the GUID of the org requested OrgGUID string `yaml:"org_guid" json:"org_guid"` //SpaceGUID is the GUID of the space requested, given back if space or app was // requested. SpaceGUID string `yaml:"space_guid,omitempty" json:"space_guid,omitempty"` //AppGUID is the GUID of the app requested, given back only if app info // was requested AppGUID string `yaml:"app_guid,omitempty" json:"app_guid,omitempty"` //OrgName is the name of the org requested OrgName string `yaml:"org_name" json:"org_name"` //SpaceName is the name of the space requested, given back only if space or // app info was requested SpaceName string `yaml:"space_name,omitempty" json:"space_name,omitempty"` //AppName is the name of the app requested, given back only if app info was // requested AppName string `yaml:"app_name,omitempty" json:"app_name,omitempty"` //Type of resource returned. One of `app`, `space`, or `org` Type string `yaml:"type" json:"type"` }
ConvertOutput is a struct representing the information returned from a call to convert.
func Convert ¶ added in v1.1.0
func Convert(s *seeker.Seeker, in ConvertInput) (out *ConvertOutput, err error)
Convert takes the input of the names of spaces, orgs, and/or apps and gives you the GUIDs associated with each. Alternatively, give it a GUID, and it gives you the names of the org/space/app which the GUID represents, and the names/GUIDs of the resources above it with their GUIDs and names
func (*ConvertOutput) ReceiveJSON ¶ added in v1.1.0
func (c *ConvertOutput) ReceiveJSON(j []byte) (err error)
ReceiveJSON allows this to implement SeekerOutput
type FindInput ¶
FindInput contains the information required to perform the find command Either should be the org, space, and app names, or just the app GUID
type FindInstance ¶
type FindInstance struct { InstanceNumber int `yaml:"number" json:"number"` VMName string `yaml:"vm_name,omitempty" json:"vm_name,omitempty"` Deployment string `yaml:"deployment,omitempty" json:"deployment,omitempty"` Host string `yaml:"host" json:"host"` Port int `yaml:"port" json:"port"` }
FindInstance represents information about one instance of an app
type FindOutput ¶
type FindOutput struct { AppGUID string `yaml:"guid" json:"guid"` AppName string `yaml:"name" json:"name"` Instances []FindInstance `yaml:"instances" json:"instances"` Count int `yaml:"count" json:"count"` }
FindOutput contains the return values from a call to Find()
func Find ¶
func Find(s *seeker.Seeker, in FindInput) (output *FindOutput, err error)
Find determines the location of the app you requests
func (*FindOutput) ReceiveJSON ¶ added in v1.1.0
func (f *FindOutput) ReceiveJSON(j []byte) (err error)
ReceiveJSON makes FindOutput an implementation of SeekerOutput
type InputError ¶
type InputError struct {
// contains filtered or unexported fields
}
InputError represents there having been a problem with the arguments given as the input of the command
func (InputError) Error ¶
func (e InputError) Error() string