client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	StatusCode int
	Message    string
	ExitCode   int
}

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) GetExitCode

func (e *APIError) GetExitCode() int

type Client

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

func New

func New(baseURL, token string) *Client

func (*Client) BuildURL

func (c *Client) BuildURL(path string, params url.Values) string

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, path string) error

func (*Client) DownloadFile

func (c *Client) DownloadFile(ctx context.Context, path, outputPath string) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, path string, result interface{}) error

func (*Client) Patch

func (c *Client) Patch(ctx context.Context, path string, body interface{}, result interface{}) error

func (*Client) Post

func (c *Client) Post(ctx context.Context, path string, body interface{}, result interface{}) error

func (*Client) Put

func (c *Client) Put(ctx context.Context, path string, body interface{}, result interface{}) error

func (*Client) UploadFile

func (c *Client) UploadFile(ctx context.Context, path, filePath string, result interface{}) error

Jump to

Keyboard shortcuts

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