clients

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 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 ChildClient

type ChildClient[T any] struct {
	Headers *http.Header
	// contains filtered or unexported fields
}

func NewChildClient

func NewChildClient[T any](ctx context.Context, svr string, parentResource, childResouce string, oauth2 *clientcredentials.Config, writeScopes ...string) (*ChildClient[T], error)

func (*ChildClient[T]) Create

func (c *ChildClient[T]) Create(parentID string, d *T) error

func (*ChildClient[T]) Delete

func (c *ChildClient[T]) Delete(parentID string, id string) error

func (*ChildClient[T]) Get

func (c *ChildClient[T]) Get(parentID string, id string) (*T, error)

func (*ChildClient[T]) Patch

func (c *ChildClient[T]) Patch(parentID string, id string, d *T) error

func (*ChildClient[T]) Search

func (c *ChildClient[T]) Search(parentID string, opts ...*api.Options) (api.SearchResult[T], error)

func (*ChildClient[T]) Update

func (c *ChildClient[T]) Update(parentID string, id string, d *T) error

type Client

type Client[T any] struct {
	Headers *http.Header
	// contains filtered or unexported fields
}

func NewClient

func NewClient[T any](ctx context.Context, svr string, resource string, oauth2 *clientcredentials.Config, writeScopes ...string) (*Client[T], error)

func (*Client[T]) Create

func (c *Client[T]) Create(d *T) error

func (*Client[T]) Delete

func (c *Client[T]) Delete(id string) error

func (*Client[T]) Get

func (c *Client[T]) Get(id string) (*T, error)

func (*Client[T]) Patch

func (c *Client[T]) Patch(id string, d *T) error

func (*Client[T]) Search

func (c *Client[T]) Search(opts ...*api.Options) (api.SearchResult[T], error)

func (*Client[T]) Update

func (c *Client[T]) Update(id string, d *T) error

Jump to

Keyboard shortcuts

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