Documentation ¶
Index ¶
- Variables
- func ApiRequest(method, endpoint string, response interface{}, data ...string)
- func AsUser(userContext UserContext, actions func())
- func InitiateUserContext(userContext UserContext) (originalCfHomeDir, currentCfHomeDir string)
- func RestoreUserContext(_ UserContext, originalCfHomeDir, currentCfHomeDir string)
- func TargetSpace(userContext UserContext)
- type GenericResource
- type QueryResponse
- type UserContext
Constants ¶
This section is empty.
Variables ¶
View Source
var CF_API_TIMEOUT = 10 * time.Second
View Source
var Cf = func(args ...string) *Session { return runner.Run("cf", args...) }
Functions ¶
func ApiRequest ¶
func AsUser ¶
func AsUser(userContext UserContext, actions func())
func InitiateUserContext ¶
func InitiateUserContext(userContext UserContext) (originalCfHomeDir, currentCfHomeDir string)
func RestoreUserContext ¶
func RestoreUserContext(_ UserContext, originalCfHomeDir, currentCfHomeDir string)
func TargetSpace ¶
func TargetSpace(userContext UserContext)
Types ¶
type GenericResource ¶
type GenericResource struct { Metadata struct { Guid string `json:"guid"` } `json:"metadata"` }
type QueryResponse ¶
type QueryResponse struct {
Resources []GenericResource `struct:"resources"`
}
type UserContext ¶
type UserContext struct { ApiUrl string Username string Password string Org string Space string SkipSSLValidation bool }
func NewUserContext ¶
func NewUserContext(apiUrl, username, password, org, space string, skipSSLValidation bool) UserContext
Click to show internal directories.
Click to hide internal directories.