Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *eclcloud.ServiceClient, id string) pagination.Pager
List members returns list of members for specifed image id.
Types ¶
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a Create operation. Call its Extract method to interpret it as a Member.
func Create ¶
func Create(client *eclcloud.ServiceClient, id string, member string) (r CreateResult)
type DeleteResult ¶
DeleteResult represents the result of a Delete operation. Call its ExtractErr method to determine if the request succeeded or failed.
func Delete ¶
func Delete(client *eclcloud.ServiceClient, imageID string, memberID string) (r DeleteResult)
Delete membership for given image. Callee should be image owner.
type DetailsResult ¶
type DetailsResult struct {
// contains filtered or unexported fields
}
DetailsResult represents the result of a Get operation. Call its Extract method to interpret it as a Member.
func Get ¶
func Get(client *eclcloud.ServiceClient, imageID string, memberID string) (r DetailsResult)
Get image member details.
type Member ¶
type Member struct { CreatedAt time.Time `json:"created_at"` ImageID string `json:"image_id"` MemberID string `json:"member_id"` Schema string `json:"schema"` Status string `json:"status"` UpdatedAt time.Time `json:"updated_at"` }
Member represents a member of an Image.
func ExtractMembers ¶
func ExtractMembers(r pagination.Page) ([]Member, error)
ExtractMembers returns a slice of Members contained in a single page of results.
type MemberPage ¶
type MemberPage struct {
pagination.SinglePageBase
}
MemberPage is a single page of Members results.
func (MemberPage) IsEmpty ¶
func (r MemberPage) IsEmpty() (bool, error)
IsEmpty determines whether or not a MemberPage contains any results.
type UpdateOpts ¶
type UpdateOpts struct {
Status string `json:"status,omitempty" required:"true1"`
}
UpdateOpts represents options to an Update request.
func (UpdateOpts) ToImageMemberUpdateMap ¶
func (opts UpdateOpts) ToImageMemberUpdateMap() (map[string]interface{}, error)
ToMemberUpdateMap formats an UpdateOpts structure into a request body.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional attributes to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult represents the result of an Update operation. Call its Extract method to interpret it as a Member.
func Update ¶
func Update(client *eclcloud.ServiceClient, imageID string, memberID string, opts UpdateOptsBuilder) (r UpdateResult)
Update function updates member.