Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualToMessage ¶
EqualToMessage grpc alias for wiremock.MustEqualToJson. May panic if there are problems with marshaling.
Types ¶
type ResponseBuilder ¶
type ResponseBuilder struct {
// contains filtered or unexported fields
}
func Error ¶
func Error(grpcResponseStatus codes.Code, grpcResponseReason string) *ResponseBuilder
Error creates a response builder with a gRPC error status and reason.
func Fault ¶
func Fault(fault wiremock.Fault) *ResponseBuilder
func JSON ¶
func JSON(json string) *ResponseBuilder
JSON creates a response builder with a JSON body.
func Message ¶
func Message(message proto.Message) *ResponseBuilder
Message creates a response builder with a serialized proto message as the body. Can panic if there are problems with marshaling.
func (*ResponseBuilder) Build ¶
func (b *ResponseBuilder) Build() wiremock.Response
func (*ResponseBuilder) WithDelay ¶
func (b *ResponseBuilder) WithDelay(delay wiremock.DelayInterface) *ResponseBuilder
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
NewService creates a new instance of the Service
type StubRuleBuilder ¶
type StubRuleBuilder struct {
// contains filtered or unexported fields
}
func Method ¶
func Method(method string) *StubRuleBuilder
Method creates a new instance of the StubRuleBuilder with grpc method.
func (*StubRuleBuilder) Build ¶
func (s *StubRuleBuilder) Build(serviceName string) *wiremock.StubRule
Build builds a new instance of the StubRule.
func (*StubRuleBuilder) WillReturn ¶
func (s *StubRuleBuilder) WillReturn(responseBuilder *ResponseBuilder) *StubRuleBuilder
WillReturn sets the response for the stub rule.
func (*StubRuleBuilder) WithRequestMessage ¶
func (s *StubRuleBuilder) WithRequestMessage(matcher wiremock.BasicParamMatcher) *StubRuleBuilder
WithRequestMessage adds a request message matcher to the stub rule.
Click to show internal directories.
Click to hide internal directories.