api

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutesTestService

func RegisterRoutesTestService(router wrouter.Router, impl TestService) 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 CustomObject

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

func (CustomObject) MarshalJSON

func (o CustomObject) MarshalJSON() ([]byte, error)

func (CustomObject) MarshalYAML

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

func (*CustomObject) UnmarshalJSON

func (o *CustomObject) UnmarshalJSON(data []byte) error

func (*CustomObject) UnmarshalYAML

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

type TestService

type TestService interface {
	Echo(ctx context.Context, cookieToken bearertoken.Token) error
	GetPathParam(ctx context.Context, authHeader bearertoken.Token, myPathParamArg string) 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, myHeaderParam1Arg safelong.SafeLong, myHeaderParam2Arg *uuid.UUID) (CustomObject, 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
}

type TestServiceClient

type TestServiceClient TestService

func NewTestServiceClient

func NewTestServiceClient(client httpclient.Client) TestServiceClient

type TestServiceClientWithAuth

type TestServiceClientWithAuth TestServiceWithAuth

func NewTestServiceClientWithAuth

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

type TestServiceWithAuth

type TestServiceWithAuth interface {
	Echo(ctx context.Context) error
	GetPathParam(ctx context.Context, myPathParamArg string) error
	PostPathParam(ctx context.Context, myPathParam1Arg string, myPathParam2Arg bool, myBodyParamArg CustomObject, myQueryParam1Arg string, myQueryParam2Arg string, myQueryParam3Arg float64, myQueryParam4Arg *safelong.SafeLong, myQueryParam5Arg *string, myHeaderParam1Arg safelong.SafeLong, myHeaderParam2Arg *uuid.UUID) (CustomObject, 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
}

Jump to

Keyboard shortcuts

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