api

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseClient

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

func New

func New(baseURL string, httpClient *http.Client, opts ...Option) *BaseClient

func (*BaseClient) ExecuteRequest

func (c *BaseClient) ExecuteRequest(ctx context.Context, method, url string, params map[string]string, result any) (*resty.Response, error)

type Client

type Client interface {
	ExecuteRequest(ctx context.Context, method, url string, params map[string]string, result any) (*resty.Response, error)
}

type Option

type Option func(*BaseClient)

func WithAuthToken

func WithAuthToken(authToken string) Option

func WithBaseURL

func WithBaseURL(url string) Option

func WithErrorUnmarshaller

func WithErrorUnmarshaller(unmarshallerFn func(r *resty.Response) error) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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