api

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalMutexKV = newMutexKV()

GlobalMutexKV is a global MutexKV for use within this plugin.

Functions

func Add added in v0.3.0

func Add[K any](c *Client, ctx context.Context, opts ReqOpts, resource *K) (string, error)

func Delete added in v0.3.0

func Delete(c *Client, ctx context.Context, opts ReqOpts, id string) error

func Get added in v0.3.0

func Get[K any](c *Client, ctx context.Context, opts ReqOpts, resource *K, id string) (*K, error)

func GetAll added in v0.9.0

func GetAll[K any](c *Client, ctx context.Context, opts ReqOpts, resources []K) ([]K, error)

func GetFilter added in v0.8.0

func GetFilter[K any](c *Client, ctx context.Context, opts ReqOpts, resource *K, key string) (*K, error)

func Update added in v0.3.0

func Update[K any](c *Client, ctx context.Context, opts ReqOpts, resource *K, id string) error

Types

type Client

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

func NewClient

func NewClient(options Options) *Client

func (*Client) ReconfigureService

func (c *Client) ReconfigureService(ctx context.Context, endpoint string) error

ReconfigureService defined at the endpoint.

type Options

type Options struct {
	Uri           string
	APIKey        string
	APISecret     string
	AllowInsecure bool

	// Retries
	MaxBackoff int64
	MinBackoff int64
	MaxRetries int64
}

type ReqOpts added in v0.3.0

type ReqOpts struct {
	AddEndpoint         string
	GetEndpoint         string
	UpdateEndpoint      string
	DeleteEndpoint      string
	ReconfigureEndpoint string

	Monad string
}

type SelectedMap

type SelectedMap string

func (*SelectedMap) String

func (s *SelectedMap) String() string

func (*SelectedMap) UnmarshalJSON

func (s *SelectedMap) UnmarshalJSON(data []byte) error

type SelectedMapList added in v0.3.0

type SelectedMapList []string

func (*SelectedMapList) MarshalJSON added in v0.3.0

func (s *SelectedMapList) MarshalJSON() ([]byte, error)

func (*SelectedMapList) String added in v0.3.0

func (s *SelectedMapList) String() string

func (*SelectedMapList) UnmarshalJSON added in v0.3.0

func (s *SelectedMapList) UnmarshalJSON(data []byte) error

type SelectedMapListNL added in v0.5.0

type SelectedMapListNL []string

func (*SelectedMapListNL) MarshalJSON added in v0.5.0

func (s *SelectedMapListNL) MarshalJSON() ([]byte, error)

func (*SelectedMapListNL) String added in v0.5.0

func (s *SelectedMapListNL) String() string

func (*SelectedMapListNL) UnmarshalJSON added in v0.5.0

func (s *SelectedMapListNL) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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