Documentation ¶
Overview ¶
Package testerapi implements the public API of the codegen.test microservice, including clients and data structures.
The tester is used to test the code generator's functions.
Index ¶
- Constants
- Variables
- type Client
- func (_c *Client) DirectoryServer(ctx context.Context, url string) (res *http.Response, err error)
- func (_c *Client) DirectoryServer_Do(r *http.Request) (res *http.Response, err error)
- func (_c *Client) Echo(r *http.Request) (res *http.Response, err error)
- func (_c *Client) Echo_Get(ctx context.Context, url string) (res *http.Response, err error)
- func (_c *Client) Echo_Post(ctx context.Context, url string, contentType string, body any) (res *http.Response, err error)
- func (_c *Client) ForHost(host string) *Client
- func (_c *Client) FunctionPathArguments(ctx context.Context, named string, path2 string, suffix string) (joined string, err error)
- func (_c *Client) Hello(r *http.Request) (res *http.Response, err error)
- func (_c *Client) Hello_Get(ctx context.Context, url string) (res *http.Response, err error)
- func (_c *Client) Hello_Post(ctx context.Context, url string, contentType string, body any) (res *http.Response, err error)
- func (_c *Client) LinesIntersection(ctx context.Context, l1 XYLine, l2 *XYLine) (b bool, err error)
- func (_c *Client) MultiValueHeaders(r *http.Request) (res *http.Response, err error)
- func (_c *Client) MultiValueHeaders_Get(ctx context.Context, url string) (res *http.Response, err error)
- func (_c *Client) MultiValueHeaders_Post(ctx context.Context, url string, contentType string, body any) (res *http.Response, err error)
- func (_c *Client) NonStringPathArguments(ctx context.Context, named int, path2 bool, suffix float64) (joined string, err error)
- func (_c *Client) PathArgumentsPriority(ctx context.Context, foo string) (echo string, err error)
- func (_c *Client) PointDistance(ctx context.Context, p1 XYCoord, p2 *XYCoord) (d float64, err error)
- func (_c *Client) ShiftPoint(ctx context.Context, p *XYCoord, x float64, y float64) (shifted *XYCoord, err error)
- func (_c *Client) StringCut(ctx context.Context, s string, sep string) (before string, after string, found bool, err error)
- func (_c *Client) SubArrayRange(ctx context.Context, httpRequestBody []int, min int, max int) (httpResponseBody []int, httpStatusCode int, err error)
- func (_c *Client) SumTwoIntegers(ctx context.Context, x int, y int) (sum int, httpStatusCode int, err error)
- func (_c *Client) UnnamedFunctionPathArguments(ctx context.Context, path1 string, path2 string, path3 string) (joined string, err error)
- func (_c *Client) UnnamedWebPathArguments(ctx context.Context, url string) (res *http.Response, err error)
- func (_c *Client) UnnamedWebPathArguments_Do(r *http.Request) (res *http.Response, err error)
- func (_c *Client) WebPathArguments(r *http.Request) (res *http.Response, err error)
- func (_c *Client) WebPathArguments_Get(ctx context.Context, url string) (res *http.Response, err error)
- func (_c *Client) WebPathArguments_Post(ctx context.Context, url string, contentType string, body any) (res *http.Response, err error)
- func (_c *Client) WhatTimeIsIt(ctx context.Context) (t time.Time, err error)
- type FunctionPathArgumentsIn
- type FunctionPathArgumentsOut
- type FunctionPathArgumentsResponse
- type Hook
- type LinesIntersectionIn
- type LinesIntersectionOut
- type LinesIntersectionResponse
- type MulticastClient
- func (_c *MulticastClient) DirectoryServer(ctx context.Context, url string) <-chan *pub.Response
- func (_c *MulticastClient) DirectoryServer_Do(ctx context.Context, r *http.Request) <-chan *pub.Response
- func (_c *MulticastClient) Echo(ctx context.Context, r *http.Request) <-chan *pub.Response
- func (_c *MulticastClient) Echo_Get(ctx context.Context, url string) <-chan *pub.Response
- func (_c *MulticastClient) Echo_Post(ctx context.Context, url string, contentType string, body any) <-chan *pub.Response
- func (_c *MulticastClient) ForHost(host string) *MulticastClient
- func (_c *MulticastClient) FunctionPathArguments(ctx context.Context, named string, path2 string, suffix string) <-chan *FunctionPathArgumentsResponse
- func (_c *MulticastClient) Hello(ctx context.Context, r *http.Request) <-chan *pub.Response
- func (_c *MulticastClient) Hello_Get(ctx context.Context, url string) <-chan *pub.Response
- func (_c *MulticastClient) Hello_Post(ctx context.Context, url string, contentType string, body any) <-chan *pub.Response
- func (_c *MulticastClient) LinesIntersection(ctx context.Context, l1 XYLine, l2 *XYLine) <-chan *LinesIntersectionResponse
- func (_c *MulticastClient) MultiValueHeaders(ctx context.Context, r *http.Request) <-chan *pub.Response
- func (_c *MulticastClient) MultiValueHeaders_Get(ctx context.Context, url string) <-chan *pub.Response
- func (_c *MulticastClient) MultiValueHeaders_Post(ctx context.Context, url string, contentType string, body any) <-chan *pub.Response
- func (_c *MulticastClient) NonStringPathArguments(ctx context.Context, named int, path2 bool, suffix float64) <-chan *NonStringPathArgumentsResponse
- func (_c *MulticastClient) PathArgumentsPriority(ctx context.Context, foo string) <-chan *PathArgumentsPriorityResponse
- func (_c *MulticastClient) PointDistance(ctx context.Context, p1 XYCoord, p2 *XYCoord) <-chan *PointDistanceResponse
- func (_c *MulticastClient) ShiftPoint(ctx context.Context, p *XYCoord, x float64, y float64) <-chan *ShiftPointResponse
- func (_c *MulticastClient) StringCut(ctx context.Context, s string, sep string) <-chan *StringCutResponse
- func (_c *MulticastClient) SubArrayRange(ctx context.Context, httpRequestBody []int, min int, max int) <-chan *SubArrayRangeResponse
- func (_c *MulticastClient) SumTwoIntegers(ctx context.Context, x int, y int) <-chan *SumTwoIntegersResponse
- func (_c *MulticastClient) UnnamedFunctionPathArguments(ctx context.Context, path1 string, path2 string, path3 string) <-chan *UnnamedFunctionPathArgumentsResponse
- func (_c *MulticastClient) UnnamedWebPathArguments(ctx context.Context, url string) <-chan *pub.Response
- func (_c *MulticastClient) UnnamedWebPathArguments_Do(ctx context.Context, r *http.Request) <-chan *pub.Response
- func (_c *MulticastClient) WebPathArguments(ctx context.Context, r *http.Request) <-chan *pub.Response
- func (_c *MulticastClient) WebPathArguments_Get(ctx context.Context, url string) <-chan *pub.Response
- func (_c *MulticastClient) WebPathArguments_Post(ctx context.Context, url string, contentType string, body any) <-chan *pub.Response
- func (_c *MulticastClient) WhatTimeIsIt(ctx context.Context) <-chan *WhatTimeIsItResponse
- type MulticastTrigger
- type NonStringPathArgumentsIn
- type NonStringPathArgumentsOut
- type NonStringPathArgumentsResponse
- type OnDiscoveredIn
- type OnDiscoveredOut
- type OnDiscoveredResponse
- type PathArgumentsPriorityIn
- type PathArgumentsPriorityOut
- type PathArgumentsPriorityResponse
- type PointDistanceIn
- type PointDistanceOut
- type PointDistanceResponse
- type ShiftPointIn
- type ShiftPointOut
- type ShiftPointResponse
- type StringCutIn
- type StringCutOut
- type StringCutResponse
- type SubArrayRangeIn
- type SubArrayRangeOut
- type SubArrayRangeResponse
- type SumTwoIntegersIn
- type SumTwoIntegersOut
- type SumTwoIntegersResponse
- type UnnamedFunctionPathArgumentsIn
- type UnnamedFunctionPathArgumentsOut
- type UnnamedFunctionPathArgumentsResponse
- type WhatTimeIsItIn
- type WhatTimeIsItOut
- type WhatTimeIsItResponse
- type XYCoord
- type XYLine
Constants ¶
const Hostname = "codegen.test"
Hostname is the default hostname of the microservice: codegen.test.
Variables ¶
var ( URLOfStringCut = httpx.JoinHostAndPath(Hostname, `:443/string-cut`) URLOfPointDistance = httpx.JoinHostAndPath(Hostname, `:443/point-distance`) URLOfShiftPoint = httpx.JoinHostAndPath(Hostname, `:443/shift-point`) URLOfLinesIntersection = httpx.JoinHostAndPath(Hostname, `:443/lines-intersection`) URLOfSubArrayRange = httpx.JoinHostAndPath(Hostname, `:443/sub-array-range/{max}`) URLOfSumTwoIntegers = httpx.JoinHostAndPath(Hostname, `:443/sum-two-integers`) URLOfFunctionPathArguments = httpx.JoinHostAndPath(Hostname, `:443/function-path-arguments/fixed/{named}/{}/{suffix+}`) URLOfNonStringPathArguments = httpx.JoinHostAndPath(Hostname, `:443/non-string-path-arguments/fixed/{named}/{}/{suffix+}`) URLOfUnnamedFunctionPathArguments = httpx.JoinHostAndPath(Hostname, `:443/unnamed-function-path-arguments/{}/foo/{}/bar/{+}`) URLOfPathArgumentsPriority = httpx.JoinHostAndPath(Hostname, `:443/path-arguments-priority/{foo}`) URLOfWhatTimeIsIt = httpx.JoinHostAndPath(Hostname, `:443/what-time-is-it`) URLOfEcho = httpx.JoinHostAndPath(Hostname, `:443/echo`) URLOfMultiValueHeaders = httpx.JoinHostAndPath(Hostname, `:443/multi-value-headers`) URLOfWebPathArguments = httpx.JoinHostAndPath(Hostname, `:443/web-path-arguments/fixed/{named}/{}/{suffix+}`) URLOfUnnamedWebPathArguments = httpx.JoinHostAndPath(Hostname, `:443/unnamed-web-path-arguments/{}/foo/{}/bar/{+}`) URLOfDirectoryServer = httpx.JoinHostAndPath(Hostname, `:443/directory-server/{filename+}`) URLOfHello = httpx.JoinHostAndPath(Hostname, `:443/hello`) )
Fully-qualified URLs of the microservice's endpoints.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an interface to calling the endpoints of the codegen.test microservice. This simple version is for unicast calls.
func (*Client) DirectoryServer ¶
DirectoryServer tests service resources given a greedy path argument.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) DirectoryServer_Do ¶
DirectoryServer_Do performs a customized request to the DirectoryServer endpoint.
DirectoryServer tests service resources given a greedy path argument.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) Echo ¶
Echo tests a typical web handler.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) Echo_Get ¶
Echo_Get performs a GET request to the Echo endpoint.
Echo tests a typical web handler.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) Echo_Post ¶
func (_c *Client) Echo_Post(ctx context.Context, url string, contentType string, body any) (res *http.Response, err error)
Echo_Post performs a POST request to the Echo endpoint.
Echo tests a typical web handler.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint. If the body if of type io.Reader, []byte or string, it is serialized in binary form. If it is of type url.Values, it is serialized as form data. All other types are serialized as JSON. If a content type is not explicitly provided, an attempt will be made to derive it from the body.
func (*Client) FunctionPathArguments ¶
func (_c *Client) FunctionPathArguments(ctx context.Context, named string, path2 string, suffix string) (joined string, err error)
FunctionPathArguments tests path arguments in functions.
func (*Client) Hello ¶
Hello prints hello in the language best matching the request's Accept-Language header.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) Hello_Get ¶
Hello_Get performs a GET request to the Hello endpoint.
Hello prints hello in the language best matching the request's Accept-Language header.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) Hello_Post ¶
func (_c *Client) Hello_Post(ctx context.Context, url string, contentType string, body any) (res *http.Response, err error)
Hello_Post performs a POST request to the Hello endpoint.
Hello prints hello in the language best matching the request's Accept-Language header.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint. If the body if of type io.Reader, []byte or string, it is serialized in binary form. If it is of type url.Values, it is serialized as form data. All other types are serialized as JSON. If a content type is not explicitly provided, an attempt will be made to derive it from the body.
func (*Client) LinesIntersection ¶
LinesIntersection tests nested non-primitive types.
func (*Client) MultiValueHeaders ¶
MultiValueHeaders tests a passing in and returning headers with multiple values.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) MultiValueHeaders_Get ¶
func (_c *Client) MultiValueHeaders_Get(ctx context.Context, url string) (res *http.Response, err error)
MultiValueHeaders_Get performs a GET request to the MultiValueHeaders endpoint.
MultiValueHeaders tests a passing in and returning headers with multiple values.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) MultiValueHeaders_Post ¶
func (_c *Client) MultiValueHeaders_Post(ctx context.Context, url string, contentType string, body any) (res *http.Response, err error)
MultiValueHeaders_Post performs a POST request to the MultiValueHeaders endpoint.
MultiValueHeaders tests a passing in and returning headers with multiple values.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint. If the body if of type io.Reader, []byte or string, it is serialized in binary form. If it is of type url.Values, it is serialized as form data. All other types are serialized as JSON. If a content type is not explicitly provided, an attempt will be made to derive it from the body.
func (*Client) NonStringPathArguments ¶
func (_c *Client) NonStringPathArguments(ctx context.Context, named int, path2 bool, suffix float64) (joined string, err error)
NonStringPathArguments tests path arguments that are not strings.
func (*Client) PathArgumentsPriority ¶
PathArgumentsPriority tests the priority of path arguments in functions.
func (*Client) PointDistance ¶
func (_c *Client) PointDistance(ctx context.Context, p1 XYCoord, p2 *XYCoord) (d float64, err error)
PointDistance tests a function that takes non-primitive input arguments.
func (*Client) ShiftPoint ¶
func (_c *Client) ShiftPoint(ctx context.Context, p *XYCoord, x float64, y float64) (shifted *XYCoord, err error)
ShiftPoint tests passing pointers of non-primitive types.
func (*Client) StringCut ¶
func (_c *Client) StringCut(ctx context.Context, s string, sep string) (before string, after string, found bool, err error)
StringCut tests a function that takes primitive input arguments and returns primitive values.
func (*Client) SubArrayRange ¶
func (_c *Client) SubArrayRange(ctx context.Context, httpRequestBody []int, min int, max int) (httpResponseBody []int, httpStatusCode int, err error)
SubArrayRange tests sending arguments as the entire request and response bodies. An httpRequestBody argument allows sending other arguments via query or path. An httpResponseBody argument prevents returning additional values, except for the status code.
func (*Client) SumTwoIntegers ¶
func (_c *Client) SumTwoIntegers(ctx context.Context, x int, y int) (sum int, httpStatusCode int, err error)
SumTwoIntegers tests returning a status code from a function.
func (*Client) UnnamedFunctionPathArguments ¶
func (_c *Client) UnnamedFunctionPathArguments(ctx context.Context, path1 string, path2 string, path3 string) (joined string, err error)
UnnamedFunctionPathArguments tests path arguments that are not named.
func (*Client) UnnamedWebPathArguments ¶
func (_c *Client) UnnamedWebPathArguments(ctx context.Context, url string) (res *http.Response, err error)
UnnamedWebPathArguments tests path arguments that are not named.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) UnnamedWebPathArguments_Do ¶
UnnamedWebPathArguments_Do performs a customized request to the UnnamedWebPathArguments endpoint.
UnnamedWebPathArguments tests path arguments that are not named.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) WebPathArguments ¶
WebPathArguments tests path arguments in web handlers.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) WebPathArguments_Get ¶
func (_c *Client) WebPathArguments_Get(ctx context.Context, url string) (res *http.Response, err error)
WebPathArguments_Get performs a GET request to the WebPathArguments endpoint.
WebPathArguments tests path arguments in web handlers.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*Client) WebPathArguments_Post ¶
func (_c *Client) WebPathArguments_Post(ctx context.Context, url string, contentType string, body any) (res *http.Response, err error)
WebPathArguments_Post performs a POST request to the WebPathArguments endpoint.
WebPathArguments tests path arguments in web handlers.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint. If the body if of type io.Reader, []byte or string, it is serialized in binary form. If it is of type url.Values, it is serialized as form data. All other types are serialized as JSON. If a content type is not explicitly provided, an attempt will be made to derive it from the body.
type FunctionPathArgumentsIn ¶
type FunctionPathArgumentsIn struct { Named string `json:"named"` Path2 string `json:"path2"` Suffix string `json:"suffix"` }
FunctionPathArgumentsIn are the input arguments of FunctionPathArguments.
type FunctionPathArgumentsOut ¶
type FunctionPathArgumentsOut struct {
Joined string `json:"joined"`
}
FunctionPathArgumentsOut are the return values of FunctionPathArguments.
type FunctionPathArgumentsResponse ¶
type FunctionPathArgumentsResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
FunctionPathArgumentsResponse is the response to FunctionPathArguments.
func (*FunctionPathArgumentsResponse) Get ¶
func (_out *FunctionPathArgumentsResponse) Get() (joined string, err error)
Get retrieves the return values.
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook assists in the subscription to the events of the codegen.test microservice.
func NewHook ¶
func NewHook(listener service.Subscriber) *Hook
NewHook creates a new hook to the events of the codegen.test microservice.
type LinesIntersectionIn ¶
LinesIntersectionIn are the input arguments of LinesIntersection.
type LinesIntersectionOut ¶
type LinesIntersectionOut struct {
B bool `json:"b"`
}
LinesIntersectionOut are the return values of LinesIntersection.
type LinesIntersectionResponse ¶
type LinesIntersectionResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
LinesIntersectionResponse is the response to LinesIntersection.
func (*LinesIntersectionResponse) Get ¶
func (_out *LinesIntersectionResponse) Get() (b bool, err error)
Get retrieves the return values.
type MulticastClient ¶
type MulticastClient struct {
// contains filtered or unexported fields
}
MulticastClient is an interface to calling the endpoints of the codegen.test microservice. This advanced version is for multicast calls.
func NewMulticastClient ¶
func NewMulticastClient(caller service.Publisher) *MulticastClient
NewMulticastClient creates a new multicast client to the codegen.test microservice.
func (*MulticastClient) DirectoryServer ¶
DirectoryServer tests service resources given a greedy path argument.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) DirectoryServer_Do ¶
func (_c *MulticastClient) DirectoryServer_Do(ctx context.Context, r *http.Request) <-chan *pub.Response
DirectoryServer_Do performs a customized request to the DirectoryServer endpoint.
DirectoryServer tests service resources given a greedy path argument.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) Echo ¶
Echo tests a typical web handler.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) Echo_Get ¶
Echo_Get performs a GET request to the Echo endpoint.
Echo tests a typical web handler.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) Echo_Post ¶
func (_c *MulticastClient) Echo_Post(ctx context.Context, url string, contentType string, body any) <-chan *pub.Response
Echo_Post performs a POST request to the Echo endpoint.
Echo tests a typical web handler.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint. If the body if of type io.Reader, []byte or string, it is serialized in binary form. If it is of type url.Values, it is serialized as form data. All other types are serialized as JSON. If a content type is not explicitly provided, an attempt will be made to derive it from the body.
func (*MulticastClient) ForHost ¶
func (_c *MulticastClient) ForHost(host string) *MulticastClient
ForHost replaces the default hostname of this client.
func (*MulticastClient) FunctionPathArguments ¶
func (_c *MulticastClient) FunctionPathArguments(ctx context.Context, named string, path2 string, suffix string) <-chan *FunctionPathArgumentsResponse
FunctionPathArguments tests path arguments in functions.
func (*MulticastClient) Hello ¶
Hello prints hello in the language best matching the request's Accept-Language header.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) Hello_Get ¶
Hello_Get performs a GET request to the Hello endpoint.
Hello prints hello in the language best matching the request's Accept-Language header.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) Hello_Post ¶
func (_c *MulticastClient) Hello_Post(ctx context.Context, url string, contentType string, body any) <-chan *pub.Response
Hello_Post performs a POST request to the Hello endpoint.
Hello prints hello in the language best matching the request's Accept-Language header.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint. If the body if of type io.Reader, []byte or string, it is serialized in binary form. If it is of type url.Values, it is serialized as form data. All other types are serialized as JSON. If a content type is not explicitly provided, an attempt will be made to derive it from the body.
func (*MulticastClient) LinesIntersection ¶
func (_c *MulticastClient) LinesIntersection(ctx context.Context, l1 XYLine, l2 *XYLine) <-chan *LinesIntersectionResponse
LinesIntersection tests nested non-primitive types.
func (*MulticastClient) MultiValueHeaders ¶
func (_c *MulticastClient) MultiValueHeaders(ctx context.Context, r *http.Request) <-chan *pub.Response
MultiValueHeaders tests a passing in and returning headers with multiple values.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) MultiValueHeaders_Get ¶
func (_c *MulticastClient) MultiValueHeaders_Get(ctx context.Context, url string) <-chan *pub.Response
MultiValueHeaders_Get performs a GET request to the MultiValueHeaders endpoint.
MultiValueHeaders tests a passing in and returning headers with multiple values.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) MultiValueHeaders_Post ¶
func (_c *MulticastClient) MultiValueHeaders_Post(ctx context.Context, url string, contentType string, body any) <-chan *pub.Response
MultiValueHeaders_Post performs a POST request to the MultiValueHeaders endpoint.
MultiValueHeaders tests a passing in and returning headers with multiple values.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint. If the body if of type io.Reader, []byte or string, it is serialized in binary form. If it is of type url.Values, it is serialized as form data. All other types are serialized as JSON. If a content type is not explicitly provided, an attempt will be made to derive it from the body.
func (*MulticastClient) NonStringPathArguments ¶
func (_c *MulticastClient) NonStringPathArguments(ctx context.Context, named int, path2 bool, suffix float64) <-chan *NonStringPathArgumentsResponse
NonStringPathArguments tests path arguments that are not strings.
func (*MulticastClient) PathArgumentsPriority ¶
func (_c *MulticastClient) PathArgumentsPriority(ctx context.Context, foo string) <-chan *PathArgumentsPriorityResponse
PathArgumentsPriority tests the priority of path arguments in functions.
func (*MulticastClient) PointDistance ¶
func (_c *MulticastClient) PointDistance(ctx context.Context, p1 XYCoord, p2 *XYCoord) <-chan *PointDistanceResponse
PointDistance tests a function that takes non-primitive input arguments.
func (*MulticastClient) ShiftPoint ¶
func (_c *MulticastClient) ShiftPoint(ctx context.Context, p *XYCoord, x float64, y float64) <-chan *ShiftPointResponse
ShiftPoint tests passing pointers of non-primitive types.
func (*MulticastClient) StringCut ¶
func (_c *MulticastClient) StringCut(ctx context.Context, s string, sep string) <-chan *StringCutResponse
StringCut tests a function that takes primitive input arguments and returns primitive values.
func (*MulticastClient) SubArrayRange ¶
func (_c *MulticastClient) SubArrayRange(ctx context.Context, httpRequestBody []int, min int, max int) <-chan *SubArrayRangeResponse
SubArrayRange tests sending arguments as the entire request and response bodies. An httpRequestBody argument allows sending other arguments via query or path. An httpResponseBody argument prevents returning additional values, except for the status code.
func (*MulticastClient) SumTwoIntegers ¶
func (_c *MulticastClient) SumTwoIntegers(ctx context.Context, x int, y int) <-chan *SumTwoIntegersResponse
SumTwoIntegers tests returning a status code from a function.
func (*MulticastClient) UnnamedFunctionPathArguments ¶
func (_c *MulticastClient) UnnamedFunctionPathArguments(ctx context.Context, path1 string, path2 string, path3 string) <-chan *UnnamedFunctionPathArgumentsResponse
UnnamedFunctionPathArguments tests path arguments that are not named.
func (*MulticastClient) UnnamedWebPathArguments ¶
func (_c *MulticastClient) UnnamedWebPathArguments(ctx context.Context, url string) <-chan *pub.Response
UnnamedWebPathArguments tests path arguments that are not named.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) UnnamedWebPathArguments_Do ¶
func (_c *MulticastClient) UnnamedWebPathArguments_Do(ctx context.Context, r *http.Request) <-chan *pub.Response
UnnamedWebPathArguments_Do performs a customized request to the UnnamedWebPathArguments endpoint.
UnnamedWebPathArguments tests path arguments that are not named.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) WebPathArguments ¶
func (_c *MulticastClient) WebPathArguments(ctx context.Context, r *http.Request) <-chan *pub.Response
WebPathArguments tests path arguments in web handlers.
If a request is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) WebPathArguments_Get ¶
func (_c *MulticastClient) WebPathArguments_Get(ctx context.Context, url string) <-chan *pub.Response
WebPathArguments_Get performs a GET request to the WebPathArguments endpoint.
WebPathArguments tests path arguments in web handlers.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint.
func (*MulticastClient) WebPathArguments_Post ¶
func (_c *MulticastClient) WebPathArguments_Post(ctx context.Context, url string, contentType string, body any) <-chan *pub.Response
WebPathArguments_Post performs a POST request to the WebPathArguments endpoint.
WebPathArguments tests path arguments in web handlers.
If a URL is not provided, it defaults to the URL of the endpoint. Otherwise, it is resolved relative to the URL of the endpoint. If the body if of type io.Reader, []byte or string, it is serialized in binary form. If it is of type url.Values, it is serialized as form data. All other types are serialized as JSON. If a content type is not explicitly provided, an attempt will be made to derive it from the body.
func (*MulticastClient) WhatTimeIsIt ¶
func (_c *MulticastClient) WhatTimeIsIt(ctx context.Context) <-chan *WhatTimeIsItResponse
WhatTimeIsIt tests shifting the clock.
type MulticastTrigger ¶
type MulticastTrigger struct {
// contains filtered or unexported fields
}
MulticastTrigger is an interface to trigger the events of the codegen.test microservice.
func NewMulticastTrigger ¶
func NewMulticastTrigger(caller service.Publisher) *MulticastTrigger
NewMulticastTrigger creates a new multicast trigger of the codegen.test microservice.
func (*MulticastTrigger) ForHost ¶
func (_c *MulticastTrigger) ForHost(host string) *MulticastTrigger
ForHost replaces the default hostname of this trigger.
func (*MulticastTrigger) OnDiscovered ¶
func (_c *MulticastTrigger) OnDiscovered(ctx context.Context, p XYCoord, n int) <-chan *OnDiscoveredResponse
OnDiscovered tests firing events.
type NonStringPathArgumentsIn ¶
type NonStringPathArgumentsIn struct { Named int `json:"named"` Path2 bool `json:"path2"` Suffix float64 `json:"suffix"` }
NonStringPathArgumentsIn are the input arguments of NonStringPathArguments.
type NonStringPathArgumentsOut ¶
type NonStringPathArgumentsOut struct {
Joined string `json:"joined"`
}
NonStringPathArgumentsOut are the return values of NonStringPathArguments.
type NonStringPathArgumentsResponse ¶
type NonStringPathArgumentsResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
NonStringPathArgumentsResponse is the response to NonStringPathArguments.
func (*NonStringPathArgumentsResponse) Get ¶
func (_out *NonStringPathArgumentsResponse) Get() (joined string, err error)
Get retrieves the return values.
type OnDiscoveredIn ¶
OnDiscoveredIn are the input arguments of OnDiscovered.
type OnDiscoveredOut ¶
OnDiscoveredOut are the return values of OnDiscovered.
type OnDiscoveredResponse ¶
type OnDiscoveredResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
OnDiscoveredResponse is the response to OnDiscovered.
type PathArgumentsPriorityIn ¶
type PathArgumentsPriorityIn struct {
Foo string `json:"foo"`
}
PathArgumentsPriorityIn are the input arguments of PathArgumentsPriority.
type PathArgumentsPriorityOut ¶
type PathArgumentsPriorityOut struct {
Echo string `json:"echo"`
}
PathArgumentsPriorityOut are the return values of PathArgumentsPriority.
type PathArgumentsPriorityResponse ¶
type PathArgumentsPriorityResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
PathArgumentsPriorityResponse is the response to PathArgumentsPriority.
func (*PathArgumentsPriorityResponse) Get ¶
func (_out *PathArgumentsPriorityResponse) Get() (echo string, err error)
Get retrieves the return values.
type PointDistanceIn ¶
PointDistanceIn are the input arguments of PointDistance.
type PointDistanceOut ¶
type PointDistanceOut struct {
D float64 `json:"d"`
}
PointDistanceOut are the return values of PointDistance.
type PointDistanceResponse ¶
type PointDistanceResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
PointDistanceResponse is the response to PointDistance.
func (*PointDistanceResponse) Get ¶
func (_out *PointDistanceResponse) Get() (d float64, err error)
Get retrieves the return values.
type ShiftPointIn ¶
ShiftPointIn are the input arguments of ShiftPoint.
type ShiftPointOut ¶
type ShiftPointOut struct {
Shifted *XYCoord `json:"shifted"`
}
ShiftPointOut are the return values of ShiftPoint.
type ShiftPointResponse ¶
type ShiftPointResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
ShiftPointResponse is the response to ShiftPoint.
func (*ShiftPointResponse) Get ¶
func (_out *ShiftPointResponse) Get() (shifted *XYCoord, err error)
Get retrieves the return values.
type StringCutIn ¶
StringCutIn are the input arguments of StringCut.
type StringCutOut ¶
type StringCutOut struct { Before string `json:"before"` After string `json:"after"` Found bool `json:"found"` }
StringCutOut are the return values of StringCut.
type StringCutResponse ¶
type StringCutResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
StringCutResponse is the response to StringCut.
type SubArrayRangeIn ¶
type SubArrayRangeIn struct { HTTPRequestBody []int `json:"-"` Min int `json:"min"` Max int `json:"max"` }
SubArrayRangeIn are the input arguments of SubArrayRange.
type SubArrayRangeOut ¶
type SubArrayRangeOut struct { HTTPResponseBody []int `json:"httpResponseBody"` HTTPStatusCode int `json:"-"` }
SubArrayRangeOut are the return values of SubArrayRange.
type SubArrayRangeResponse ¶
type SubArrayRangeResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
SubArrayRangeResponse is the response to SubArrayRange.
type SumTwoIntegersIn ¶
SumTwoIntegersIn are the input arguments of SumTwoIntegers.
type SumTwoIntegersOut ¶
SumTwoIntegersOut are the return values of SumTwoIntegers.
type SumTwoIntegersResponse ¶
type SumTwoIntegersResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
SumTwoIntegersResponse is the response to SumTwoIntegers.
type UnnamedFunctionPathArgumentsIn ¶
type UnnamedFunctionPathArgumentsIn struct { Path1 string `json:"path1"` Path2 string `json:"path2"` Path3 string `json:"path3"` }
UnnamedFunctionPathArgumentsIn are the input arguments of UnnamedFunctionPathArguments.
type UnnamedFunctionPathArgumentsOut ¶
type UnnamedFunctionPathArgumentsOut struct {
Joined string `json:"joined"`
}
UnnamedFunctionPathArgumentsOut are the return values of UnnamedFunctionPathArguments.
type UnnamedFunctionPathArgumentsResponse ¶
type UnnamedFunctionPathArgumentsResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
UnnamedFunctionPathArgumentsResponse is the response to UnnamedFunctionPathArguments.
func (*UnnamedFunctionPathArgumentsResponse) Get ¶
func (_out *UnnamedFunctionPathArgumentsResponse) Get() (joined string, err error)
Get retrieves the return values.
type WhatTimeIsItIn ¶
type WhatTimeIsItIn struct { }
WhatTimeIsItIn are the input arguments of WhatTimeIsIt.
type WhatTimeIsItOut ¶
WhatTimeIsItOut are the return values of WhatTimeIsIt.
type WhatTimeIsItResponse ¶
type WhatTimeIsItResponse struct { HTTPResponse *http.Response // contains filtered or unexported fields }
WhatTimeIsItResponse is the response to WhatTimeIsIt.