client

package
v0.4.27 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.4.22

type Client struct {
	*resty.Client
	Config
}

func (*Client) Delete added in v0.4.22

func (c *Client) Delete(path string, options ...Option) (*jnode.Node, error)

func (*Client) Get added in v0.4.22

func (c *Client) Get(path string, options ...Option) (*jnode.Node, error)

func (*Client) GetAuthToken added in v0.4.22

func (c *Client) GetAuthToken() string

func (*Client) GetClient added in v0.4.22

func (c *Client) GetClient() *resty.Client

func (*Client) GetHostURL added in v0.4.22

func (c *Client) GetHostURL() string

func (*Client) GetOrganization added in v0.4.22

func (c *Client) GetOrganization() string

func (*Client) GetWithParams added in v0.4.22

func (c *Client) GetWithParams(path string, params map[string]string, options ...Option) (*jnode.Node, error)

func (*Client) Patch added in v0.4.22

func (c *Client) Patch(path string, body *jnode.Node, options ...Option) (*jnode.Node, error)

func (*Client) Post added in v0.4.22

func (c *Client) Post(path string, body *jnode.Node, options ...Option) (*jnode.Node, error)

func (*Client) XCPPost added in v0.4.22

func (c *Client) XCPPost(orgID string, module string, files []string, values map[string]string, options ...Option) (*jnode.Node, error)

type Config

type Config struct {
	Organization     string
	APIToken         string
	APIServer        string
	APIPrefix        string
	Debug            bool
	TLSNoVerify      bool
	TimeoutSeconds   int
	RetryCount       int
	RetryWaitSeconds float64
	Headers          []string
}

type Interface

type Interface interface {
	Post(path string, body *jnode.Node, options ...Option) (*jnode.Node, error)
	Patch(path string, body *jnode.Node, options ...Option) (*jnode.Node, error)
	Get(path string, options ...Option) (*jnode.Node, error)
	GetWithParams(path string, params map[string]string, options ...Option) (*jnode.Node, error)
	Delete(path string, options ...Option) (*jnode.Node, error)
	XCPPost(orgID string, module string, files []string, values map[string]string, options ...Option) (*jnode.Node, error)
	GetClient() *resty.Client
}

func NewClient

func NewClient(config *Config) Interface

type Option

type Option func(*resty.Request)

Jump to

Keyboard shortcuts

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