endpoint

package
v0.0.0-...-029b4cf Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoClient = errors.New("client must be set")

Functions

This section is empty.

Types

type Endpoint

type Endpoint[Req any, Res any] struct {
	Method string
	Path   string
	Rate   float64
	Burst  int
	Key    string
	// contains filtered or unexported fields
}

func NewJSONGet

func NewJSONGet[Req any, Res any](
	cl *client.Client,
	path string,
	key string,
	rate float64,
	burst int,
) (*Endpoint[Req, Res], error)

func NewJSONPatch

func NewJSONPatch[Req any, Res any](
	cl *client.Client,
	path, key string,
	rate float64, burst int,
) (*Endpoint[Req, Res], error)

func (*Endpoint[Req, Res]) Do

func (ep *Endpoint[Req, Res]) Do(
	ctx context.Context, params *Req,
) (*Res, error)

Directories

Path Synopsis
inventory/inventory.go
inventory/inventory.go

Jump to

Keyboard shortcuts

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