testerapi

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

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

View Source
const Hostname = "codegen.test"

Hostname is the default hostname of the microservice: codegen.test.

Variables

View Source
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 NewClient

func NewClient(caller service.Publisher) *Client

NewClient creates a new unicast client to the codegen.test microservice.

func (*Client) DirectoryServer

func (_c *Client) DirectoryServer(ctx context.Context, url string) (res *http.Response, err error)

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

func (_c *Client) DirectoryServer_Do(r *http.Request) (res *http.Response, err error)

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

func (_c *Client) Echo(r *http.Request) (res *http.Response, err error)

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

func (_c *Client) Echo_Get(ctx context.Context, url string) (res *http.Response, err error)

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) ForHost

func (_c *Client) ForHost(host string) *Client

ForHost replaces the default hostname of this client.

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

func (_c *Client) Hello(r *http.Request) (res *http.Response, err error)

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

func (_c *Client) Hello_Get(ctx context.Context, url string) (res *http.Response, err error)

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

func (_c *Client) LinesIntersection(ctx context.Context, l1 XYLine, l2 *XYLine) (b bool, err error)

LinesIntersection tests nested non-primitive types.

func (*Client) MultiValueHeaders

func (_c *Client) MultiValueHeaders(r *http.Request) (res *http.Response, err error)

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

func (_c *Client) PathArgumentsPriority(ctx context.Context, foo string) (echo string, err error)

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

func (_c *Client) UnnamedWebPathArguments_Do(r *http.Request) (res *http.Response, err error)

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

func (_c *Client) WebPathArguments(r *http.Request) (res *http.Response, err error)

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.

func (*Client) WhatTimeIsIt

func (_c *Client) WhatTimeIsIt(ctx context.Context) (t time.Time, err error)

WhatTimeIsIt tests shifting the clock.

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.

func (*Hook) ForHost

func (_c *Hook) ForHost(host string) *Hook

ForHost replaces the default hostname of this hook.

func (*Hook) OnDiscovered

func (_c *Hook) OnDiscovered(handler func(ctx context.Context, p XYCoord, n int) (q XYCoord, m int, err error)) error

OnDiscovered tests firing events.

type LinesIntersectionIn

type LinesIntersectionIn struct {
	L1 XYLine  `json:"l1"`
	L2 *XYLine `json:"l2"`
}

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

func (_c *MulticastClient) DirectoryServer(ctx context.Context, url string) <-chan *pub.Response

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

func (_c *MulticastClient) Echo(ctx context.Context, r *http.Request) <-chan *pub.Response

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

func (_c *MulticastClient) Echo_Get(ctx context.Context, url string) <-chan *pub.Response

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

func (_c *MulticastClient) Hello(ctx context.Context, r *http.Request) <-chan *pub.Response

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

func (_c *MulticastClient) Hello_Get(ctx context.Context, url string) <-chan *pub.Response

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

type OnDiscoveredIn struct {
	P XYCoord `json:"p"`
	N int     `json:"n"`
}

OnDiscoveredIn are the input arguments of OnDiscovered.

type OnDiscoveredOut

type OnDiscoveredOut struct {
	Q XYCoord `json:"q"`
	M int     `json:"m"`
}

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.

func (*OnDiscoveredResponse) Get

func (_out *OnDiscoveredResponse) Get() (q XYCoord, m int, err error)

Get retrieves the return values.

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

type PointDistanceIn struct {
	P1 XYCoord  `json:"p1"`
	P2 *XYCoord `json:"p2"`
}

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

type ShiftPointIn struct {
	P *XYCoord `json:"p"`
	X float64  `json:"x"`
	Y float64  `json:"y"`
}

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

type StringCutIn struct {
	S   string `json:"s"`
	Sep string `json:"sep"`
}

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.

func (*StringCutResponse) Get

func (_out *StringCutResponse) Get() (before string, after string, found bool, err error)

Get retrieves the return values.

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.

func (*SubArrayRangeResponse) Get

func (_out *SubArrayRangeResponse) Get() (httpResponseBody []int, httpStatusCode int, err error)

Get retrieves the return values.

type SumTwoIntegersIn

type SumTwoIntegersIn struct {
	X int `json:"x"`
	Y int `json:"y"`
}

SumTwoIntegersIn are the input arguments of SumTwoIntegers.

type SumTwoIntegersOut

type SumTwoIntegersOut struct {
	Sum            int `json:"sum"`
	HTTPStatusCode int `json:"-"`
}

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.

func (*SumTwoIntegersResponse) Get

func (_out *SumTwoIntegersResponse) Get() (sum int, httpStatusCode int, err error)

Get retrieves the return values.

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

type WhatTimeIsItOut struct {
	T time.Time `json:"t"`
}

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.

func (*WhatTimeIsItResponse) Get

func (_out *WhatTimeIsItResponse) Get() (t time.Time, err error)

Get retrieves the return values.

type XYCoord

type XYCoord struct {
	X float64 `json:"x,omitempty"`
	Y float64 `json:"y,omitempty"`
}

XYCoord is a non-primitive type holding X,Y coordinates.

type XYLine

type XYLine struct {
	Start XYCoord `json:"start,omitempty"`
	End   XYCoord `json:"end,omitempty"`
}

XYLine is a non-primitive type with a nested non-primitive type.

Jump to

Keyboard shortcuts

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