group

package
v1.5.12 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetRequest

type GetRequest struct {
	// Group ID
	// Required: true
	GroupID string `url:"groupId" json:"groupId" validate:"required"`
}

Reuqest struct for getting details of the specified group.

type Group

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

Structure for creating request to group

func New

func New(client interfaces.Caller) *Group

Builder for group endpoints

func (Group) Get

func (g Group) Get(ctx context.Context, req GetRequest) (*ItemGroup, error)

Get gets details of the specified group.

func (Group) List

func (g Group) List(ctx context.Context, req ListRequest) (*ListGroups, error)

type ItemGroup

type ItemGroup struct {
	// CKey
	CKey string `json:"_ckey"`

	// Meta
	Meta []interface{} `json:"meta"`

	// Is active
	Actice bool `json:"active"`

	// Description
	Description string `json:"description"`

	// Domain
	Domain string `json:"domain"`

	// GID
	GID uint64 `json:"gid"`

	// GUID
	GUID string `json:"guid"`

	// ID
	ID string

	// Last check
	LastCheck uint64 `json:"lastcheck"`

	// Roles
	Roles []interface{} `json:"roles"`

	// Users
	Users []string `json:"users"`
}

type ListGroups

type ListGroups struct {
	Data []ItemGroup `json:"data"`

	EntryCount uint64 `json:"entryCount"`
}

type ListRequest

type ListRequest struct {
	// Find by id.
	// Requires: false
	ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`

	// Find by list users.
	// Required: false
	User string `url:"user,omitempty" json:"user,omitempty"`

	// Page number.
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size, maximum - 100.
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`

	// Find by active True or False.
	// Required: true
	Active bool `url:"active" json:"active" validate:"required"`
}

Request struct for getting list of group instances.

Jump to

Keyboard shortcuts

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