Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractRegionsAccessInto ¶
func ExtractRegionsAccessInto(r pagination.Page, v interface{}) error
func List ¶
func List(c *gcorecloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
Types ¶
type CreateOpts ¶
type CreateOpts struct { AccessAllEdgeRegions bool `json:"access_all_edge_regions"` RegionIDs []int `json:"region_ids"` ClientID *int `json:"client_id"` ResellerID *int `json:"reseller_id"` }
CreateOpts set parameters for Create operation
func (CreateOpts) ToRegionAccessCreateMap ¶
func (opts CreateOpts) ToRegionAccessCreateMap() (map[string]interface{}, error)
ToRegionAccessCreateMap builds a request body form CreateOpts
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create requets.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of an update operation. Call its Extract method to interpret it as a RegionAccess.
func Create ¶
func Create(c *gcorecloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*RegionAccess, error)
Extract is a function that accepts a result and extracts a region resource.
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
type DeleteResult ¶
type DeleteResult struct {
gcorecloud.ErrResult
}
DeleteResult represent a result of a deletion operation.
func Delete ¶
func Delete(c *gcorecloud.ServiceClient, resellerID int) (r DeleteResult)
type ListOpts ¶
ListOpts allows the filtering and sorting of paginated collections through the API.
func (ListOpts) ToRegionAccessListQuery ¶
ToRegionAccessListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type RegionAccess ¶
type RegionAccess struct { ID int `json:"id"` AccessAllEdgeRegions bool `json:"access_all_edge_regions"` ClientID *int `json:"client_id"` RegionIDs []int `json:"region_ids"` ResellerID *int `json:"reseller_id"` }
func ExtractRegionsAccess ¶
func ExtractRegionsAccess(r pagination.Page) ([]RegionAccess, error)
ExtractRegionsAccess accepts a Page struct, specifically a RegionAccessPage struct, and extracts the elements into a slice of RegionAccess structs. In other words, a generic collection is mapped into a relevant slice.
func ListAll ¶
func ListAll(c *gcorecloud.ServiceClient, opts ListOptsBuilder) ([]RegionAccess, error)
type RegionAccessPage ¶
type RegionAccessPage struct {
pagination.LinkedPageBase
}
RegionAccessPage is the page returned by a pager when traversing over a collection of regions access.
func (RegionAccessPage) IsEmpty ¶
func (r RegionAccessPage) IsEmpty() (bool, error)
IsEmpty checks whether a RegionPage struct is empty.
func (RegionAccessPage) NextPageURL ¶
func (r RegionAccessPage) NextPageURL() (string, error)
NextPageURL is invoked when a paginated collection of regions has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.