rest_client

package
v0.0.0-...-25d1615 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	Ctx            context.Context
	CustomJWTToken string
}

func NewResource

func NewResource(ctx context.Context) *Resource

func (*Resource) Delete

func (this *Resource) Delete(service string, resource string, data handler.Map) (resp *ResourceResponse, err error)

func (*Resource) Get

func (this *Resource) Get(service string, resource string, data handler.Map) (resp *ResourceResponse, err error)

func (*Resource) LoginAs

func (this *Resource) LoginAs(username string) *Resource

func (*Resource) LoginAsManager

func (this *Resource) LoginAsManager() *Resource

func (*Resource) Post

func (this *Resource) Post(service string, resource string, data handler.Map) (resp *ResourceResponse, err error)

func (*Resource) Put

func (this *Resource) Put(service string, resource string, data handler.Map) (resp *ResourceResponse, err error)

type ResourceResponse

type ResourceResponse struct {
	RespData *simplejson.Json
}

func (*ResourceResponse) Data

func (this *ResourceResponse) Data() *simplejson.Json

func (*ResourceResponse) ErrCode

func (this *ResourceResponse) ErrCode() string

func (*ResourceResponse) IsSuccess

func (this *ResourceResponse) IsSuccess() bool

Jump to

Keyboard shortcuts

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