custom_user_role

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name Identifier = iota
	Id

	ExtendedRoleUser        ExtendedRole = "user"
	ExtendedRoleObserver    ExtendedRole = "observer"
	ExtendedRoleStakeholder ExtendedRole = "stakeholder"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(config *client.Config) (*Client, error)

func (*Client) Create

func (c *Client) Create(context context.Context, request *CreateRequest) (*CreateResult, error)

func (*Client) Delete

func (c *Client) Delete(context context.Context, request *DeleteRequest) (*DeleteResult, error)

func (*Client) Get

func (c *Client) Get(context context.Context, request *GetRequest) (*GetResult, error)

func (*Client) List

func (c *Client) List(context context.Context, request *ListRequest) (*ListResult, error)

func (*Client) Update

func (c *Client) Update(context context.Context, request *UpdateRequest) (*UpdateResult, error)

type CreateRequest

type CreateRequest struct {
	client.BaseRequest
	Name             string       `json:"name"`
	ExtendedRole     ExtendedRole `json:"extendedRole,omitempty"`
	GrantedRights    []string     `json:"grantedRights,omitempty"`
	DisallowedRights []string     `json:"disallowedRights,omitempty"`
}

func (*CreateRequest) Method

func (r *CreateRequest) Method() string

func (*CreateRequest) ResourcePath

func (r *CreateRequest) ResourcePath() string

func (*CreateRequest) Validate

func (r *CreateRequest) Validate() error

type CreateResult

type CreateResult struct {
	client.ResultMetadata
	Result string `json:"result"`
	Id     string `json:"id"`
	Name   string `json:"name"`
}

type CustomUserRole

type CustomUserRole struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type DeleteRequest

type DeleteRequest struct {
	client.BaseRequest
	Identifier     string
	IdentifierType Identifier
}

func (*DeleteRequest) Method

func (r *DeleteRequest) Method() string

func (*DeleteRequest) RequestParams

func (r *DeleteRequest) RequestParams() map[string]string

func (*DeleteRequest) ResourcePath

func (r *DeleteRequest) ResourcePath() string

func (*DeleteRequest) Validate

func (r *DeleteRequest) Validate() error

type DeleteResult

type DeleteResult struct {
	client.ResultMetadata
	Result string `json:"result"`
}

type ExtendedRole

type ExtendedRole string

type GetRequest

type GetRequest struct {
	client.BaseRequest
	Identifier     string
	IdentifierType Identifier
}

func (*GetRequest) Method

func (r *GetRequest) Method() string

func (*GetRequest) RequestParams

func (r *GetRequest) RequestParams() map[string]string

func (*GetRequest) ResourcePath

func (r *GetRequest) ResourcePath() string

func (*GetRequest) Validate

func (r *GetRequest) Validate() error

type GetResult

type GetResult struct {
	client.ResultMetadata
	Id               string       `json:"id"`
	Name             string       `json:"name"`
	ExtendedRole     ExtendedRole `json:"extendedRole"`
	GrantedRights    []string     `json:"grantedRights"`
	DisallowedRights []string     `json:"disallowedRights"`
}

type Identifier

type Identifier uint32

type ListRequest

type ListRequest struct {
	client.BaseRequest
}

func (*ListRequest) Method

func (r *ListRequest) Method() string

func (*ListRequest) ResourcePath

func (r *ListRequest) ResourcePath() string

func (*ListRequest) Validate

func (r *ListRequest) Validate() error

type ListResult

type ListResult struct {
	client.ResultMetadata
	CustomUserRoles []CustomUserRole `json:"data"`
}

type UpdateRequest

type UpdateRequest struct {
	client.BaseRequest
	Identifier       string
	IdentifierType   Identifier
	Name             string       `json:"name,omitempty"`
	ExtendedRole     ExtendedRole `json:"extendedRole,omitempty"`
	GrantedRights    []string     `json:"grantedRights,omitempty"`
	DisallowedRights []string     `json:"disallowedRights,omitempty"`
}

func (*UpdateRequest) Method

func (r *UpdateRequest) Method() string

func (*UpdateRequest) RequestParams

func (r *UpdateRequest) RequestParams() map[string]string

func (*UpdateRequest) ResourcePath

func (r *UpdateRequest) ResourcePath() string

func (*UpdateRequest) Validate

func (r *UpdateRequest) Validate() error

type UpdateResult

type UpdateResult struct {
	client.ResultMetadata
	Result string `json:"result"`
	Id     string `json:"id"`
	Name   string `json:"name"`
}

Jump to

Keyboard shortcuts

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