examplev1client

package
v0.3.85 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendCleanup

func AppendCleanup(ctx context.Context, fn ...Cleanup) context.Context

...

func IntoContext added in v0.0.114

func IntoContext(ctx context.Context, client *Client) context.Context

IntoContext returns a child context with the Client within.

func RunCleanups

func RunCleanups(ctx context.Context) error

...

Types

type Cleanup

type Cleanup = func(context.Context) error

...

type Client

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

...

func FromContext

func FromContext(ctx context.Context) (*Client, error)

FromContext retrieves a Client from the given context.

func New

func New(baseURL string) (*Client, error)

...

func (*Client) CreateResource

func (c *Client) CreateResource(
	ctx context.Context,
	name string,
) (*examplev1.Resource, Cleanup, error)

...

func (*Client) DeleteResource

func (c *Client) DeleteResource(ctx context.Context, id string) error

...

func (*Client) GetResource

func (c *Client) GetResource(ctx context.Context, id string) (*examplev1.Resource, error)

...

func (*Client) ListResources added in v0.3.71

func (c *Client) ListResources(ctx context.Context, limit int32) ([]*examplev1.Resource, string, error)

...

func (*Client) UpdateResource

func (c *Client) UpdateResource(
	ctx context.Context,
	id string,
	name string,
) (*examplev1.Resource, error)

...

Jump to

Keyboard shortcuts

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