group

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 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"`
}

GetRequest struct to get 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 as an ItemGroup struct

func (Group) GetRaw added in v1.6.6

func (g Group) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)

GetRaw gets details of the specified group as an array of bytes

func (Group) List

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

List gets list of group instances as a ListGroups struct

func (Group) ListRaw added in v1.6.6

func (g Group) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)

ListRaw gets list of group instances as an array of bytes

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 string `url:"by_id,omitempty" json:"by_id,omitempty"`

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

	// Sort by one of supported fields, format +|-(field)
	// Required: false
	SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"`

	// 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.
	// Default: true
	// Required: false
	Active bool `url:"active" json:"active"`
}

ListRequest struct to get list of group instances.

Jump to

Keyboard shortcuts

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