api

package
v6.64.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestServiceCLICommand added in v6.18.0

func NewTestServiceCLICommand() *cobra.Command

func NewTestServiceCLICommandWithClientProvider added in v6.18.0

func NewTestServiceCLICommandWithClientProvider(clientProvider CLITestServiceClientProvider) *cobra.Command

func RegisterRoutesTestService

func RegisterRoutesTestService(router wrouter.Router, impl TestService, routerParams ...wrouter.RouteParam) error

RegisterRoutesTestService registers handlers for the TestService endpoints with a witchcraft wrouter. This should typically be called in a witchcraft server's InitFunc. impl provides an implementation of each endpoint, which can assume the request parameters have been parsed in accordance with the Conjure specification.

Types

type CLIConfig added in v6.18.0

type CLIConfig struct {
	Client httpclient.ClientConfig `yaml:",inline"`
}

type CLITestServiceClientProvider added in v6.18.0

type CLITestServiceClientProvider interface {
	Get(ctx context.Context, flags *pflag.FlagSet) (TestServiceClient, error)
}

func NewDefaultCLITestServiceClientProvider added in v6.18.0

func NewDefaultCLITestServiceClientProvider() CLITestServiceClientProvider

type CustomObject

type CustomObject struct {
	Data []byte `json:"data"`
}

func (CustomObject) MarshalYAML

func (o CustomObject) MarshalYAML() (interface{}, error)

func (*CustomObject) UnmarshalYAML

func (o *CustomObject) UnmarshalYAML(unmarshal func(interface{}) error) error

type RidAlias

type RidAlias rid.ResourceIdentifier

func (RidAlias) MarshalText

func (a RidAlias) MarshalText() ([]byte, error)

func (RidAlias) MarshalYAML

func (a RidAlias) MarshalYAML() (interface{}, error)

func (RidAlias) String

func (a RidAlias) String() string

func (*RidAlias) UnmarshalText

func (a *RidAlias) UnmarshalText(data []byte) error

func (*RidAlias) UnmarshalYAML

func (a *RidAlias) UnmarshalYAML(unmarshal func(interface{}) error) error

type StringAlias

type StringAlias string

type TestService

type TestService interface {
	Echo(ctx context.Context) error
	PathParam(ctx context.Context, paramArg string) error
	PathParamAlias(ctx context.Context, paramArg StringAlias) error
	PathParamRid(ctx context.Context, paramArg rid.ResourceIdentifier) error
	PathParamRidAlias(ctx context.Context, paramArg RidAlias) error
	Bytes(ctx context.Context) (CustomObject, error)
	Binary(ctx context.Context) (io.ReadCloser, error)
	MaybeBinary(ctx context.Context) (*io.ReadCloser, error)
	Query(ctx context.Context, queryArg *StringAlias) error
}

type TestServiceCLICommand added in v6.18.0

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

type TestServiceClient

type TestServiceClient interface {
	Echo(ctx context.Context) error
	PathParam(ctx context.Context, paramArg string) error
	PathParamAlias(ctx context.Context, paramArg StringAlias) error
	PathParamRid(ctx context.Context, paramArg rid.ResourceIdentifier) error
	PathParamRidAlias(ctx context.Context, paramArg RidAlias) error
	Bytes(ctx context.Context) (CustomObject, error)
	Binary(ctx context.Context) (io.ReadCloser, error)
	MaybeBinary(ctx context.Context) (*io.ReadCloser, error)
	Query(ctx context.Context, queryArg *StringAlias) error
}

func NewTestServiceClient

func NewTestServiceClient(client httpclient.Client) TestServiceClient

Jump to

Keyboard shortcuts

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