api

package
v6.59.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 35 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 OptionalIntegerAlias added in v6.6.0

type OptionalIntegerAlias struct {
	Value *int
}

func (OptionalIntegerAlias) MarshalJSON added in v6.6.0

func (a OptionalIntegerAlias) MarshalJSON() ([]byte, error)

func (OptionalIntegerAlias) MarshalYAML added in v6.6.0

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

func (*OptionalIntegerAlias) UnmarshalJSON added in v6.6.0

func (a *OptionalIntegerAlias) UnmarshalJSON(data []byte) error

func (*OptionalIntegerAlias) UnmarshalYAML added in v6.6.0

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

type OptionalListAlias added in v6.12.0

type OptionalListAlias struct {
	Value *[]string
}

func (OptionalListAlias) MarshalJSON added in v6.12.0

func (a OptionalListAlias) MarshalJSON() ([]byte, error)

func (OptionalListAlias) MarshalYAML added in v6.12.0

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

func (*OptionalListAlias) UnmarshalJSON added in v6.12.0

func (a *OptionalListAlias) UnmarshalJSON(data []byte) error

func (*OptionalListAlias) UnmarshalYAML added in v6.12.0

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

type SafeUuid added in v6.35.0

type SafeUuid uuid.UUID

func (SafeUuid) MarshalText added in v6.35.0

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

func (SafeUuid) MarshalYAML added in v6.35.0

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

func (SafeUuid) String added in v6.35.0

func (a SafeUuid) String() string

func (*SafeUuid) UnmarshalText added in v6.35.0

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

func (*SafeUuid) UnmarshalYAML added in v6.35.0

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

type StringAlias

type StringAlias string

type TestService

type TestService interface {
	Echo(ctx context.Context, cookieToken bearertoken.Token) error
	EchoStrings(ctx context.Context, bodyArg []string) ([]string, error)
	EchoCustomObject(ctx context.Context, bodyArg *CustomObject) (*CustomObject, error)
	EchoOptionalAlias(ctx context.Context, bodyArg OptionalIntegerAlias) (OptionalIntegerAlias, error)
	EchoOptionalListAlias(ctx context.Context, bodyArg OptionalListAlias) (OptionalListAlias, error)
	GetPathParam(ctx context.Context, authHeader bearertoken.Token, myPathParamArg string) error
	GetPathParamAlias(ctx context.Context, authHeader bearertoken.Token, myPathParamArg StringAlias) error
	QueryParamList(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []string) error
	QueryParamListBoolean(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []bool) error
	QueryParamListDateTime(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []datetime.DateTime) error
	QueryParamSetDateTime(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []datetime.DateTime) ([]datetime.DateTime, error)
	QueryParamListDouble(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []float64) error
	QueryParamListInteger(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []int) error
	QueryParamListRid(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []rid.ResourceIdentifier) error
	QueryParamListSafeLong(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []safelong.SafeLong) error
	QueryParamListString(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []string) error
	QueryParamListUuid(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []uuid.UUID) error
	QueryParamExternalString(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg string) error
	QueryParamExternalInteger(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg int) error
	PathParamExternalString(ctx context.Context, authHeader bearertoken.Token, myPathParam1Arg string) error
	PathParamExternalInteger(ctx context.Context, authHeader bearertoken.Token, myPathParam1Arg int) error
	PostPathParam(ctx context.Context, authHeader bearertoken.Token, myPathParam1Arg string, myPathParam2Arg bool, myBodyParamArg CustomObject, myQueryParam1Arg string, myQueryParam2Arg string, myQueryParam3Arg float64, myQueryParam4Arg *safelong.SafeLong, myQueryParam5Arg *string, myQueryParam6Arg OptionalIntegerAlias, myHeaderParam1Arg safelong.SafeLong, myHeaderParam2Arg *uuid.UUID) (CustomObject, error)
	PostSafeParams(ctx context.Context, authHeader bearertoken.Token, myPathParam1Arg string, myPathParam2Arg bool, myBodyParamArg CustomObject, myQueryParam1Arg string, myQueryParam2Arg string, myQueryParam3Arg float64, myQueryParam4Arg *safelong.SafeLong, myQueryParam5Arg *string, myHeaderParam1Arg safelong.SafeLong, myHeaderParam2Arg *SafeUuid) error
	Bytes(ctx context.Context) (CustomObject, error)
	GetBinary(ctx context.Context) (io.ReadCloser, error)
	PostBinary(ctx context.Context, myBytesArg io.ReadCloser) (io.ReadCloser, error)
	PutBinary(ctx context.Context, myBytesArg io.ReadCloser) error
	GetOptionalBinary(ctx context.Context) (*io.ReadCloser, error)
	// An endpoint that uses go keywords
	Chan(ctx context.Context, varArg string, importArg map[string]string, typeArg string, returnArg safelong.SafeLong, httpArg string, jsonArg string, reqArg string, rwArg string) 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, cookieToken bearertoken.Token) error
	EchoStrings(ctx context.Context, bodyArg []string) ([]string, error)
	EchoCustomObject(ctx context.Context, bodyArg *CustomObject) (*CustomObject, error)
	EchoOptionalAlias(ctx context.Context, bodyArg OptionalIntegerAlias) (OptionalIntegerAlias, error)
	EchoOptionalListAlias(ctx context.Context, bodyArg OptionalListAlias) (OptionalListAlias, error)
	GetPathParam(ctx context.Context, authHeader bearertoken.Token, myPathParamArg string) error
	GetPathParamAlias(ctx context.Context, authHeader bearertoken.Token, myPathParamArg StringAlias) error
	QueryParamList(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []string) error
	QueryParamListBoolean(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []bool) error
	QueryParamListDateTime(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []datetime.DateTime) error
	QueryParamSetDateTime(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []datetime.DateTime) ([]datetime.DateTime, error)
	QueryParamListDouble(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []float64) error
	QueryParamListInteger(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []int) error
	QueryParamListRid(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []rid.ResourceIdentifier) error
	QueryParamListSafeLong(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []safelong.SafeLong) error
	QueryParamListString(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []string) error
	QueryParamListUuid(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg []uuid.UUID) error
	QueryParamExternalString(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg string) error
	QueryParamExternalInteger(ctx context.Context, authHeader bearertoken.Token, myQueryParam1Arg int) error
	PathParamExternalString(ctx context.Context, authHeader bearertoken.Token, myPathParam1Arg string) error
	PathParamExternalInteger(ctx context.Context, authHeader bearertoken.Token, myPathParam1Arg int) error
	PostPathParam(ctx context.Context, authHeader bearertoken.Token, myPathParam1Arg string, myPathParam2Arg bool, myBodyParamArg CustomObject, myQueryParam1Arg string, myQueryParam2Arg string, myQueryParam3Arg float64, myQueryParam4Arg *safelong.SafeLong, myQueryParam5Arg *string, myQueryParam6Arg OptionalIntegerAlias, myHeaderParam1Arg safelong.SafeLong, myHeaderParam2Arg *uuid.UUID) (CustomObject, error)
	PostSafeParams(ctx context.Context, authHeader bearertoken.Token, myPathParam1Arg string, myPathParam2Arg bool, myBodyParamArg CustomObject, myQueryParam1Arg string, myQueryParam2Arg string, myQueryParam3Arg float64, myQueryParam4Arg *safelong.SafeLong, myQueryParam5Arg *string, myHeaderParam1Arg safelong.SafeLong, myHeaderParam2Arg *SafeUuid) error
	Bytes(ctx context.Context) (CustomObject, error)
	GetBinary(ctx context.Context) (io.ReadCloser, error)
	PostBinary(ctx context.Context, myBytesArg func() io.ReadCloser) (io.ReadCloser, error)
	PutBinary(ctx context.Context, myBytesArg func() io.ReadCloser) error
	GetOptionalBinary(ctx context.Context) (*io.ReadCloser, error)
	// An endpoint that uses go keywords
	Chan(ctx context.Context, varArg string, importArg map[string]string, typeArg string, returnArg safelong.SafeLong, httpArg string, jsonArg string, reqArg string, rwArg string) error
}

func NewTestServiceClient

func NewTestServiceClient(client httpclient.Client) TestServiceClient

type TestServiceClientWithAuth

type TestServiceClientWithAuth interface {
	Echo(ctx context.Context) error
	EchoStrings(ctx context.Context, bodyArg []string) ([]string, error)
	EchoCustomObject(ctx context.Context, bodyArg *CustomObject) (*CustomObject, error)
	EchoOptionalAlias(ctx context.Context, bodyArg OptionalIntegerAlias) (OptionalIntegerAlias, error)
	EchoOptionalListAlias(ctx context.Context, bodyArg OptionalListAlias) (OptionalListAlias, error)
	GetPathParam(ctx context.Context, myPathParamArg string) error
	GetPathParamAlias(ctx context.Context, myPathParamArg StringAlias) error
	QueryParamList(ctx context.Context, myQueryParam1Arg []string) error
	QueryParamListBoolean(ctx context.Context, myQueryParam1Arg []bool) error
	QueryParamListDateTime(ctx context.Context, myQueryParam1Arg []datetime.DateTime) error
	QueryParamSetDateTime(ctx context.Context, myQueryParam1Arg []datetime.DateTime) ([]datetime.DateTime, error)
	QueryParamListDouble(ctx context.Context, myQueryParam1Arg []float64) error
	QueryParamListInteger(ctx context.Context, myQueryParam1Arg []int) error
	QueryParamListRid(ctx context.Context, myQueryParam1Arg []rid.ResourceIdentifier) error
	QueryParamListSafeLong(ctx context.Context, myQueryParam1Arg []safelong.SafeLong) error
	QueryParamListString(ctx context.Context, myQueryParam1Arg []string) error
	QueryParamListUuid(ctx context.Context, myQueryParam1Arg []uuid.UUID) error
	QueryParamExternalString(ctx context.Context, myQueryParam1Arg string) error
	QueryParamExternalInteger(ctx context.Context, myQueryParam1Arg int) error
	PathParamExternalString(ctx context.Context, myPathParam1Arg string) error
	PathParamExternalInteger(ctx context.Context, myPathParam1Arg int) error
	PostPathParam(ctx context.Context, myPathParam1Arg string, myPathParam2Arg bool, myBodyParamArg CustomObject, myQueryParam1Arg string, myQueryParam2Arg string, myQueryParam3Arg float64, myQueryParam4Arg *safelong.SafeLong, myQueryParam5Arg *string, myQueryParam6Arg OptionalIntegerAlias, myHeaderParam1Arg safelong.SafeLong, myHeaderParam2Arg *uuid.UUID) (CustomObject, error)
	PostSafeParams(ctx context.Context, myPathParam1Arg string, myPathParam2Arg bool, myBodyParamArg CustomObject, myQueryParam1Arg string, myQueryParam2Arg string, myQueryParam3Arg float64, myQueryParam4Arg *safelong.SafeLong, myQueryParam5Arg *string, myHeaderParam1Arg safelong.SafeLong, myHeaderParam2Arg *SafeUuid) error
	Bytes(ctx context.Context) (CustomObject, error)
	GetBinary(ctx context.Context) (io.ReadCloser, error)
	PostBinary(ctx context.Context, myBytesArg func() io.ReadCloser) (io.ReadCloser, error)
	PutBinary(ctx context.Context, myBytesArg func() io.ReadCloser) error
	GetOptionalBinary(ctx context.Context) (*io.ReadCloser, error)
	// An endpoint that uses go keywords
	Chan(ctx context.Context, varArg string, importArg map[string]string, typeArg string, returnArg safelong.SafeLong, httpArg string, jsonArg string, reqArg string, rwArg string) error
}

func NewTestServiceClientWithAuth

func NewTestServiceClientWithAuth(client TestServiceClient, authHeader bearertoken.Token, cookieToken bearertoken.Token) TestServiceClientWithAuth

Jump to

Keyboard shortcuts

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