gophercloud: Index | Files

package members

import ""


Package Files

fixtures.go requests.go results.go urls.go

func ExtractMembers Uses

func ExtractMembers(page pagination.Page) ([]ImageMember, error)

ExtractMembers returns a slice of Members contained in a single page of results.

func HandleCreateImageMemberConflict Uses

func HandleCreateImageMemberConflict(t *testing.T)

HandleCreateImageMemberConflict setup for case when member is already image member

func HandleCreateImageMemberInvalidVisibility Uses

func HandleCreateImageMemberInvalidVisibility(t *testing.T)

HandleCreateImageMemberInvalidVisibility setup for case when visibility=public

func HandleCreateImageMemberSuccessfully Uses

func HandleCreateImageMemberSuccessfully(t *testing.T)

HandleCreateImageMemberSuccessfully setup

func HandleImageMemberDetails Uses

func HandleImageMemberDetails(t *testing.T)

HandleImageMemberDetails setup

func HandleImageMemberEmptyList Uses

func HandleImageMemberEmptyList(t *testing.T)

HandleImageMemberEmptyList happy path setup

func HandleImageMemberList Uses

func HandleImageMemberList(t *testing.T)

HandleImageMemberList happy path setup

func List Uses

func List(client *gophercloud.ServiceClient, id string) pagination.Pager

List members returns list of members for specifed image id More details:

type CallsCounter Uses

type CallsCounter struct {
    Counter int

CallsCounter for checking if request handler was called at all

func HandleImageMemberDeleteByNonOwner Uses

func HandleImageMemberDeleteByNonOwner(t *testing.T) *CallsCounter

HandleImageMemberDeleteByNonOwner setup

func HandleImageMemberDeleteSuccessfully Uses

func HandleImageMemberDeleteSuccessfully(t *testing.T) *CallsCounter

HandleImageMemberDeleteSuccessfully setup

func HandleImageMemberUpdate Uses

func HandleImageMemberUpdate(t *testing.T) *CallsCounter

HandleImageMemberUpdate setup

type CreateMemberResult Uses

type CreateMemberResult struct {

CreateMemberResult result model

func Create Uses

func Create(client *gophercloud.ServiceClient, id string, member string) CreateMemberResult

Create member for specific image


The specified images must exist.
You can only add a new member to an image which 'visibility' attribute is private.
You must be the owner of the specified image.

Synchronous Postconditions

With correct permissions, you can see the member status of the image as pending through API calls.

More details here:

func (CreateMemberResult) Extract Uses

func (cm CreateMemberResult) Extract() (*ImageMember, error)

Extract ImageMember model from request if possible

type ImageMember Uses

type ImageMember struct {
    CreatedAt time.Time `mapstructure:"-"`
    ImageID   string    `mapstructure:"image_id"`
    MemberID  string    `mapstructure:"member_id"`
    Schema    string
    // Status could be one of pending, accepted, reject
    Status    string
    UpdatedAt time.Time `mapstructure:"-"`

ImageMember model

type ListMembersResult Uses

type ListMembersResult struct {

ListMembersResult model

func (ListMembersResult) Extract Uses

func (lm ListMembersResult) Extract() ([]ImageMember, error)

Extract returns list of image members

type MemberDeleteResult Uses

type MemberDeleteResult struct {

MemberDeleteResult model

func Delete Uses

func Delete(client *gophercloud.ServiceClient, imageID string, memberID string) MemberDeleteResult

Delete membership for given image. Callee should be image owner More details:

type MemberDetailsResult Uses

type MemberDetailsResult struct {

MemberDetailsResult model

func Get Uses

func Get(client *gophercloud.ServiceClient, imageID string, memberID string) MemberDetailsResult

Get image member details. More details:

type MemberPage Uses

type MemberPage struct {

MemberPage is a single page of Members results.

func (MemberPage) IsEmpty Uses

func (page MemberPage) IsEmpty() (bool, error)

IsEmpty determines whether or not a page of Members contains any results.

type MemberUpdateResult Uses

type MemberUpdateResult struct {

MemberUpdateResult model

func Update Uses

func Update(client *gophercloud.ServiceClient, imageID string, memberID string, opts UpdateOptsBuilder) MemberUpdateResult

Update function updates member More details:

type UpdateOpts Uses

type UpdateOpts struct {
    Status string

UpdateOpts implements UpdateOptsBuilder

func (UpdateOpts) ToMemberUpdateMap Uses

func (opts UpdateOpts) ToMemberUpdateMap() map[string]interface{}

ToMemberUpdateMap formats an UpdateOpts structure into a request body.

type UpdateOptsBuilder Uses

type UpdateOptsBuilder interface {
    ToMemberUpdateMap() map[string]interface{}

UpdateOptsBuilder allows extensions to add additional attributes to the Update request.

Package members imports 9 packages (graph). Updated 2016-07-21. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).