Documentation
¶
Index ¶
- func NewTestServiceCLICommand() *cobra.Command
- func NewTestServiceCLICommandWithClientProvider(clientProvider CLITestServiceClientProvider) *cobra.Command
- func RegisterRoutesTestService(router wrouter.Router, impl TestService, routerParams ...wrouter.RouteParam) error
- type CLIConfig
- type CLITestServiceClientProvider
- type CustomObject
- type OptionalIntegerAlias
- type OptionalListAlias
- type StringAlias
- type TestService
- type TestServiceCLICommand
- type TestServiceClient
- type TestServiceClientWithAuth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestServiceCLICommandWithClientProvider ¶
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 ¶
type CLIConfig struct {
Client httpclient.ClientConfig `yaml:",inline"`
}
type CLITestServiceClientProvider ¶
type CLITestServiceClientProvider interface {
Get(ctx context.Context, flags *pflag.FlagSet) (TestServiceClient, error)
}
func NewDefaultCLITestServiceClientProvider ¶
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 ¶
type OptionalIntegerAlias struct {
Value *int
}
func (OptionalIntegerAlias) MarshalJSON ¶
func (a OptionalIntegerAlias) MarshalJSON() ([]byte, error)
func (OptionalIntegerAlias) MarshalYAML ¶
func (a OptionalIntegerAlias) MarshalYAML() (interface{}, error)
func (*OptionalIntegerAlias) UnmarshalJSON ¶
func (a *OptionalIntegerAlias) UnmarshalJSON(data []byte) error
func (*OptionalIntegerAlias) UnmarshalYAML ¶
func (a *OptionalIntegerAlias) UnmarshalYAML(unmarshal func(interface{}) error) error
type OptionalListAlias ¶
type OptionalListAlias struct {
Value *[]string
}
func (OptionalListAlias) MarshalJSON ¶
func (a OptionalListAlias) MarshalJSON() ([]byte, error)
func (OptionalListAlias) MarshalYAML ¶
func (a OptionalListAlias) MarshalYAML() (interface{}, error)
func (*OptionalListAlias) UnmarshalJSON ¶
func (a *OptionalListAlias) UnmarshalJSON(data []byte) error
func (*OptionalListAlias) UnmarshalYAML ¶
func (a *OptionalListAlias) UnmarshalYAML(unmarshal func(interface{}) error) error
type StringAlias ¶
type StringAlias string
type TestService ¶
type TestService interface { Echo(ctx context.Context, cookieToken bearertoken.Token) error // These are some endpoint docs 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 GetListBoolean(ctx context.Context, myQueryParam1Arg []bool) ([]bool, error) PutMapStringString(ctx context.Context, myParamArg map[string]string) (map[string]string, error) PutMapStringAny(ctx context.Context, myParamArg map[string]interface{}) (map[string]interface{}, error) GetDateTime(ctx context.Context, myParamArg datetime.DateTime) (datetime.DateTime, error) GetDouble(ctx context.Context, myParamArg float64) (float64, error) GetRid(ctx context.Context, myParamArg rid.ResourceIdentifier) (rid.ResourceIdentifier, error) GetSafeLong(ctx context.Context, myParamArg safelong.SafeLong) (safelong.SafeLong, error) GetUuid(ctx context.Context, myParamArg uuid.UUID) (uuid.UUID, error) GetBinary(ctx context.Context) (io.ReadCloser, error) GetOptionalBinary(ctx context.Context) (*io.ReadCloser, error) // An endpoint that uses reserved flag names GetReserved(ctx context.Context, confArg string, bearertokenArg string) 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 ¶
type TestServiceCLICommand struct {
// contains filtered or unexported fields
}
type TestServiceClient ¶
type TestServiceClient interface { Echo(ctx context.Context, cookieToken bearertoken.Token) error // These are some endpoint docs 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 GetListBoolean(ctx context.Context, myQueryParam1Arg []bool) ([]bool, error) PutMapStringString(ctx context.Context, myParamArg map[string]string) (map[string]string, error) PutMapStringAny(ctx context.Context, myParamArg map[string]interface{}) (map[string]interface{}, error) GetDateTime(ctx context.Context, myParamArg datetime.DateTime) (datetime.DateTime, error) GetDouble(ctx context.Context, myParamArg float64) (float64, error) GetRid(ctx context.Context, myParamArg rid.ResourceIdentifier) (rid.ResourceIdentifier, error) GetSafeLong(ctx context.Context, myParamArg safelong.SafeLong) (safelong.SafeLong, error) GetUuid(ctx context.Context, myParamArg uuid.UUID) (uuid.UUID, error) GetBinary(ctx context.Context) (io.ReadCloser, error) GetOptionalBinary(ctx context.Context) (*io.ReadCloser, error) // An endpoint that uses reserved flag names GetReserved(ctx context.Context, confArg string, bearertokenArg string) 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 // These are some endpoint docs 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 GetListBoolean(ctx context.Context, myQueryParam1Arg []bool) ([]bool, error) PutMapStringString(ctx context.Context, myParamArg map[string]string) (map[string]string, error) PutMapStringAny(ctx context.Context, myParamArg map[string]interface{}) (map[string]interface{}, error) GetDateTime(ctx context.Context, myParamArg datetime.DateTime) (datetime.DateTime, error) GetDouble(ctx context.Context, myParamArg float64) (float64, error) GetRid(ctx context.Context, myParamArg rid.ResourceIdentifier) (rid.ResourceIdentifier, error) GetSafeLong(ctx context.Context, myParamArg safelong.SafeLong) (safelong.SafeLong, error) GetUuid(ctx context.Context, myParamArg uuid.UUID) (uuid.UUID, error) GetBinary(ctx context.Context) (io.ReadCloser, error) GetOptionalBinary(ctx context.Context) (*io.ReadCloser, error) // An endpoint that uses reserved flag names GetReserved(ctx context.Context, confArg string, bearertokenArg string) 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
Click to show internal directories.
Click to hide internal directories.