iamuumv1

package
v0.0.0-...-9e96525 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 7

Documentation

Index

Constants

View Source
const (
	AccessGroupMemberUser    = "user"
	AccessGroupMemberService = "service"
)
View Source
const ErrCodeAPICreation = "APICreationError"

ErrCodeAPICreation ...

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessGroupMemberRepository

type AccessGroupMemberRepository interface {
	List(groupID string) ([]models.AccessGroupMember, error)
	Add(groupID string, request AddGroupMemberRequest) (AddGroupMemberResponse, error)
	Remove(groupID string, memberID string) error
}

func NewAccessGroupMemberRepository

func NewAccessGroupMemberRepository(c *client.Client) AccessGroupMemberRepository

type AccessGroupRepository

type AccessGroupRepository interface {
	List(accountID string) ([]models.AccessGroup, error)
	Create(group models.AccessGroup, accountID string) (*models.AccessGroup, error)
	FindByName(name string, accountID string) ([]models.AccessGroup, error)
	Delete(accessGroupID string, recursive bool) error
	Update(accessGroupID string, group AccessGroupUpdateRequest, revision string) (models.AccessGroup, error)
	Get(accessGroupID string) (group *models.AccessGroup, revision string, err error)
}

func NewAccessGroupRepository

func NewAccessGroupRepository(c *client.Client) AccessGroupRepository

type AccessGroupUpdateRequest

type AccessGroupUpdateRequest struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

type AddGroupMemberRequest

type AddGroupMemberRequest struct {
	Members []models.AccessGroupMember `json:"members"`
}

type AddGroupMemberResponse

type AddGroupMemberResponse struct {
	Members []AddedGroupMember `json:"members"`
}

type AddedGroupMember

type AddedGroupMember struct {
	ID string `json:"id"`

	Msg string `json:"msg,omitempty"`

	Type string `json:"type"`

	OK bool `json:"ok,omitempty"`
}

type GroupMembers

type GroupMembers struct {
	PaginationFields
	Members []models.AccessGroupMember `json:"members"`
}

func (*GroupMembers) Resources

func (gm *GroupMembers) Resources() []interface{}

type Groups

type Groups struct {
	PaginationFields
	Groups []models.AccessGroup `json:"groups"`
}

func (*Groups) Resources

func (g *Groups) Resources() []interface{}

type IAMUUMServiceAPI

type IAMUUMServiceAPI interface {
	AccessGroup() AccessGroupRepository
	AccessGroupMember() AccessGroupMemberRepository
}

IAMUUMServiceAPI is the resource client ...

func New

func New(sess *session.Session) (IAMUUMServiceAPI, error)

New ...

type PaginatedResources

type PaginatedResources interface {
	NextPath() (string, error)
	Resources() []interface{}
}

type PaginatedResourcesHandler

type PaginatedResourcesHandler struct {
	// contains filtered or unexported fields
}

func NewPaginatedResourcesHandler

func NewPaginatedResourcesHandler(resources PaginatedResources) PaginatedResourcesHandler

func (PaginatedResourcesHandler) Resources

func (pr PaginatedResourcesHandler) Resources(bytes []byte, curPath string) ([]interface{}, string, error)

type PaginationFields

type PaginationFields struct {
	First    PaginationHref `json:"first"`
	Last     PaginationHref `json:"last"`
	Next     PaginationHref `json:"next"`
	Previous PaginationHref `json:"previous"`

	Offset     int `json:"offset"`
	Limit      int `json:"limit"`
	TotalCount int `json:"total_count"`
}

func (*PaginationFields) NextPath

func (p *PaginationFields) NextPath() (string, error)

type PaginationHref

type PaginationHref struct {
	Href string `json:"href"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL