client

package
v0.0.0-...-2aebc37 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 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 AuthenticityToken

type AuthenticityToken struct {
	Token string
}

type Client

type Client struct {
	Token  string
	Logger *log.Logger
	// contains filtered or unexported fields
}

func NewClient

func NewClient(url string, httpClient *http.Client, logger *log.Logger) *Client

func NewDefaultClient

func NewDefaultClient(url string) (*Client, error)

func (*Client) DeleteRequest

func (c *Client) DeleteRequest(ctx context.Context, url string) ([]byte, error)

func (*Client) GetRequest

func (c *Client) GetRequest(ctx context.Context, url string) ([]byte, error)

func (*Client) Login

func (c *Client) Login(ctx context.Context, username, password string) error

func (*Client) PostRequestWithResponse

func (c *Client) PostRequestWithResponse(ctx context.Context, url string, data any) ([]byte, error)

func (*Client) PutRequest

func (c *Client) PutRequest(ctx context.Context, url string, data any) ([]byte, error)

type LoginError

type LoginError struct{}

func (*LoginError) Error

func (*LoginError) Error() string

Jump to

Keyboard shortcuts

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