sdkBase

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoint string
}

func DefaultConfig

func DefaultConfig(options ...ConfigOption) Config

type ConfigOption

type ConfigOption func(config *Config)

func WithCustomEndpoint

func WithCustomEndpoint(endpoint string) ConfigOption

type Environment

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

func NewEnvironment

func NewEnvironment(config Config, httpClient *http.Client) Environment

func (Environment) Authorize

func (e Environment) Authorize(in string) Environment

func (Environment) Do

func (e Environment) Do(req *http.Request) (*http.Response, error)

func (Environment) Request

func (e Environment) Request(ctx context.Context, method string, url string, body io.Reader) (req *http.Request, err error)

type Response

type Response struct {
	Err          error
	HttpResponse *http.Response
	ResponseData *bytes.Buffer
	Request      *http.Request
}

func Delete

func Delete(ctx context.Context, e Environment, url string, in interface{}) *Response

func Get

func Get(ctx context.Context, e Environment, url string) *Response

func Method

func Method(ctx context.Context, e Environment, method string, url string, body io.Reader) (r *Response)

func MethodBody

func MethodBody(ctx context.Context, e Environment, method string, url string, in interface{}) (r *Response)

func Patch added in v1.0.16

func Patch(ctx context.Context, e Environment, url string, in interface{}) *Response

func Post

func Post(ctx context.Context, e Environment, url string, in interface{}) *Response

func PostRaw added in v1.0.11

func PostRaw(ctx context.Context, e Environment, url string, body io.Reader) *Response

func Put

func Put(ctx context.Context, e Environment, url string, in interface{}) *Response

func PutRaw added in v1.0.11

func PutRaw(ctx context.Context, e Environment, url string, body io.Reader) *Response

Jump to

Keyboard shortcuts

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