Documentation
¶
Index ¶
- Variables
- func QueriesToQueryString(queries []ccv3.Query) string
- type Client
- func (c *Client) AddSecGroupRelationShips(secGroup *SecurityGroup) error
- func (c *Client) BindRunningSecGroupToSpace(secGroupGUID, spaceGUID string, endpoint string) error
- func (c *Client) BindSecurityGroup(secGroupGUID, spaceGUID string, endpoint string) error
- func (c *Client) BindStagingSecGroupToSpace(secGroupGUID, spaceGUID string, endpoint string) error
- func (c *Client) BindUnbindSecurityGroup(secGroupGUID, spaceGUID, method, endpoint string) error
- func (c *Client) CurrentUserIsAdmin() (bool, error)
- func (c *Client) GetAccessToken() *string
- func (c *Client) GetApiUrl() string
- func (c *Client) GetEndpoint() string
- func (c *Client) GetOrgManagers(orgGuid string, page int) (User, error)
- func (c *Client) GetSecGroupByName(name string) (SecurityGroup, error)
- func (c *Client) GetSecGroupSpaces(secGroup *SecurityGroup) (Spaces, error)
- func (c *Client) GetSecGroups(queries []ccv3.Query, page int) (SecurityGroups, error)
- func (c *Client) GetSpaceByGuid(guid string) (Space, error)
- func (c *Client) GetSpacesWithOrg(queries []ccv3.Query, page int) (Spaces, error)
- func (c *Client) ListAllSecGroups(req *http.Request) ([]byte, error)
- func (c *Client) SetAccessToken(accessToken string)
- func (c *Client) UnBindRunningSecGroupToSpace(secGroupGUID, spaceGUID string, endpoint string) error
- func (c *Client) UnBindSecurityGroup(secGroupGUID, spaceGUID string, endpoint string) error
- func (c *Client) UnBindStagingSecGroupToSpace(secGroupGUID, spaceGUID string, endpoint string) error
- type CloudFoundryError
- type CloudFoundryErrorV3
- type CloudFoundryErrorsV3
- type CloudFoundryHTTPError
- type CustomTransport
- type Data
- type NotFoundError
- type Organization
- type Organizations
- type Paginated
- type Rule
- type SecurityGroup
- type SecurityGroups
- type Space
- type Spaces
- type User
- type UserRoles
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func QueriesToQueryString ¶ added in v0.53.1
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddSecGroupRelationShips ¶ added in v0.31.0
func (c *Client) AddSecGroupRelationShips(secGroup *SecurityGroup) error
func (*Client) BindRunningSecGroupToSpace ¶
func (*Client) BindSecurityGroup ¶
func (*Client) BindStagingSecGroupToSpace ¶
func (*Client) BindUnbindSecurityGroup ¶ added in v0.87.0
func (*Client) CurrentUserIsAdmin ¶
func (*Client) GetAccessToken ¶
func (*Client) GetEndpoint ¶
func (*Client) GetOrgManagers ¶ added in v0.31.0
func (*Client) GetSecGroupByName ¶
func (c *Client) GetSecGroupByName(name string) (SecurityGroup, error)
func (*Client) GetSecGroupSpaces ¶ added in v0.29.0
func (c *Client) GetSecGroupSpaces(secGroup *SecurityGroup) (Spaces, error)
func (*Client) GetSecGroups ¶ added in v0.31.0
func (*Client) GetSpacesWithOrg ¶ added in v0.31.0
func (*Client) ListAllSecGroups ¶ added in v0.87.0
func (*Client) SetAccessToken ¶
func (*Client) UnBindRunningSecGroupToSpace ¶
func (*Client) UnBindSecurityGroup ¶
type CloudFoundryError ¶
type CloudFoundryError struct {
Code int `json:"code"`
ErrorCode string `json:"error_code"`
Description string `json:"description"`
}
func (CloudFoundryError) Error ¶
func (cfErr CloudFoundryError) Error() string
type CloudFoundryErrorV3 ¶
type CloudFoundryErrorV3 struct {
Code int `json:"code"`
Title string `json:"title"`
Detail string `json:"detail"`
}
func NewCloudFoundryErrorFromV3Errors ¶
func NewCloudFoundryErrorFromV3Errors(cfErrorsV3 CloudFoundryErrorsV3) CloudFoundryErrorV3
CF APIs v3 can return multiple errors, we take the first one and convert it into a V2 model
func (CloudFoundryErrorV3) Error ¶
func (cfErrV3 CloudFoundryErrorV3) Error() string
type CloudFoundryErrorsV3 ¶
type CloudFoundryErrorsV3 struct {
Errors []CloudFoundryErrorV3 `json:"errors"`
}
type CloudFoundryHTTPError ¶
func (CloudFoundryHTTPError) Error ¶
func (e CloudFoundryHTTPError) Error() string
type CustomTransport ¶ added in v0.87.0
type CustomTransport struct {
// contains filtered or unexported fields
}
type NotFoundError ¶ added in v0.68.0
type NotFoundError error
type Organization ¶
type Organization struct {
resources.Organization
}
type Organizations ¶ added in v0.37.0
type Organizations struct {
Paginated
Resources []Organization `jsonry:"resources"`
}
type Paginated ¶ added in v0.31.0
type Paginated struct {
Pagination struct {
Next struct {
HREF string `jsonry:"href"`
} `jsonry:"next"`
} `jsonry:"pagination"`
}
type SecurityGroup ¶
type SecurityGroup struct {
Name string `jsonry:"name,omitempty"`
GUID string `jsonry:"guid,omitempty"`
Rules []Rule `jsonry:"rules,omitempty"`
StagingGloballyEnabled *bool `jsonry:"globally_enabled.staging,omitempty"`
RunningGloballyEnabled *bool `jsonry:"globally_enabled.running,omitempty"`
Relationships struct {
Running_Spaces struct {
Data []Data `jsonry:"data"`
} `jsonry:"running_spaces"`
Staging_Spaces struct {
Data []Data `jsonry:"data"`
} `jsonry:"staging_spaces"`
} `jsonry:"relationships,omitempty"`
}
type SecurityGroups ¶
type SecurityGroups struct {
Paginated
Resources []SecurityGroup `jsonry:"resources,omitempty"`
}
type Spaces ¶
type Spaces struct {
Paginated
Resources []Space `jsonry:"resources"`
Included ccv3.IncludedResources `jsonry:"included"`
}
type UserRoles ¶
type UserRoles struct {
Paginated
Resources []struct {
GUID string `jsonry:"guid,omitempty"`
CreatedAt string `jsonry:"created_at"`
UpdatedAt string `jsonry:"updated_at"`
Type string `jsonry:"type,omitempty"`
Relationships struct {
User struct {
Data struct {
GUID string `jsonry:"guid"`
} `jsonry:"data"`
} `jsonry:"user"`
Space struct {
Data struct {
GUID string `jsonry:"guid"`
} `jsonry:"data"`
} `jsonry:"space"`
Organization struct {
Data struct {
GUID string `jsonry:"guid"`
} `jsonry:"data"`
} `jsonry:"organization"`
} `jsonry:"relationships"`
} `jsonry:"resources"`
}
Click to show internal directories.
Click to hide internal directories.