groups

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, req CreateRequest) error

Create Create new group.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, req DeleteRequest) error

Delete Delete group.

func (*Client) Find

func (c *Client) Find(ctx context.Context, req FindRequest) (FindResponse, error)

Find Get group configuration.

func (*Client) Index

func (c *Client) Index(ctx context.Context) ([]IndexResponse, error)

Index Group index.

func (*Client) Update

func (c *Client) Update(ctx context.Context, req UpdateRequest) error

Update Update group data.

type CreateRequest

type CreateRequest struct {
	Groupid string `url:"groupid" json:"groupid"`

	// The following parameters are optional
	Comment *string `url:"comment,omitempty" json:"comment,omitempty"`
}

type DeleteRequest

type DeleteRequest struct {
	Groupid string `url:"groupid" json:"groupid"`
}

type FindRequest

type FindRequest struct {
	Groupid string `url:"groupid" json:"groupid"`
}

type FindResponse

type FindResponse struct {
	Members []string `url:"members" json:"members"`

	// The following parameters are optional
	Comment *string `url:"comment,omitempty" json:"comment,omitempty"`
}

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexResponse

type IndexResponse struct {
	Groupid string `url:"groupid" json:"groupid"`

	// The following parameters are optional
	Comment *string `url:"comment,omitempty" json:"comment,omitempty"`
	Users   *string `url:"users,omitempty" json:"users,omitempty"` // list of users which form this group
}

type UpdateRequest

type UpdateRequest struct {
	Groupid string `url:"groupid" json:"groupid"`

	// The following parameters are optional
	Comment *string `url:"comment,omitempty" json:"comment,omitempty"`
}

Jump to

Keyboard shortcuts

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