examplev1client

package
v0.0.123 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: MIT Imports: 16 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 AuthnUnaryInterceptor added in v0.0.94

func AuthnUnaryInterceptor(next connect.UnaryFunc) connect.UnaryFunc

...

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

...

func ScenarioFromContext

func ScenarioFromContext(ctx context.Context) (string, bool)

...

func ScenarioIntoContext added in v0.0.114

func ScenarioIntoContext(ctx context.Context, scen *godog.Scenario) context.Context

...

func ScenarioUnaryInterceptor

func ScenarioUnaryInterceptor(next connect.UnaryFunc) connect.UnaryFunc

...

func ValidateUnaryInterceptor

func ValidateUnaryInterceptor(next connect.UnaryFunc) connect.UnaryFunc

ValidateUnaryInterceptor validates that responses are valid according to Protobuf annotations. Invalid responses result in an Internal error code with the validation failures as a message. Requests are not validated to prevent obscuring the validation implemented by the server.

Server validation does not currently include response validation. See connectrpc/validate-go#28 for details.

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) UpdateResource

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

...

Jump to

Keyboard shortcuts

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