client

package
v0.0.0-...-3e6933e Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	StatusCode int
	ErrorMsg   string
	Data       []byte
	Rs         *base.Resource
}

type SearchResult

type SearchResult struct {
	StatusCode   int
	ErrorMsg     string
	TotalResults int `json:"totalResults"`
	Resources    []*base.Resource
	StartIndex   int `json:"startIndex"`
	ItemsPerPage int `json:"itemsPerPage"`
}

type SparrowClient

type SparrowClient struct {
	Schemas  map[string]*schema.Schema
	ResTypes map[string]*schema.ResourceType
	// contains filtered or unexported fields
}

func NewSparrowClient

func NewSparrowClient(baseUrl string) *SparrowClient

func (*SparrowClient) Add

func (scl *SparrowClient) Add(rs *base.Resource) Result

func (*SparrowClient) AddGroup

func (scl *SparrowClient) AddGroup(groupJson string) Result

func (*SparrowClient) AddUser

func (scl *SparrowClient) AddUser(userJson string) Result

func (*SparrowClient) ApproveJoinReq

func (scl *SparrowClient) ApproveJoinReq(serverId uint16) Result

func (*SparrowClient) Delete

func (scl *SparrowClient) Delete(rid string, rt *schema.ResourceType) Result

func (*SparrowClient) DirectLogin

func (scl *SparrowClient) DirectLogin(username string, password string, domain string) error

func (*SparrowClient) GetAll

func (scl *SparrowClient) GetAll(rt *schema.ResourceType) SearchResult

func (*SparrowClient) GetGroup

func (scl *SparrowClient) GetGroup(id string) Result

func (*SparrowClient) GetResource

func (scl *SparrowClient) GetResource(id string, rt *schema.ResourceType) Result

func (*SparrowClient) GetUser

func (scl *SparrowClient) GetUser(id string) Result

func (*SparrowClient) MakeSchemaAware

func (scl *SparrowClient) MakeSchemaAware() error

func (*SparrowClient) ParseResource

func (scl *SparrowClient) ParseResource(data []byte) (*base.Resource, error)

func (*SparrowClient) Patch

func (scl *SparrowClient) Patch(patchReq string, rid string, rt *schema.ResourceType, rsVersion string, returnAttrs string) Result

func (*SparrowClient) Replace

func (scl *SparrowClient) Replace(rid string, replaceJson string, rt *schema.ResourceType, rsVersion string) Result

func (*SparrowClient) SendJoinReq

func (scl *SparrowClient) SendJoinReq(host string, port int) Result

Jump to

Keyboard shortcuts

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