grpc

package
v0.12.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expect

type Expect struct {
	Code    string        `yaml:"code,omitempty"`
	Message interface{}   `yaml:"message,omitempty"`
	Status  ExpectStatus  `yaml:"status,omitempty"`
	Header  yaml.MapSlice `yaml:"header,omitempty"`
	Trailer yaml.MapSlice `yaml:"trailer,omitempty"`

	// for backward compatibility
	Body interface{} `yaml:"body,omitempty"`
}

Expect represents expected response values.

func (*Expect) Build

func (e *Expect) Build(ctx *context.Context) (assert.Assertion, error)

Build implements protocol.AssertionBuilder interface.

type ExpectStatus

type ExpectStatus struct {
	Code    string                     `yaml:"code"`
	Message string                     `yaml:"message"`
	Details []map[string]yaml.MapSlice `yaml:"details"`
}

ExpectStatus represents expected gRPC status.

type GRPC

type GRPC struct{}

GRPC is a protocol type for the scenarigo step.

func (*GRPC) Name

func (p *GRPC) Name() string

Name implements protocol.Protocol interface.

func (*GRPC) UnmarshalExpect

func (p *GRPC) UnmarshalExpect(b []byte) (protocol.AssertionBuilder, error)

UnmarshalExpect implements protocol.Protocol interface.

func (*GRPC) UnmarshalRequest

func (p *GRPC) UnmarshalRequest(b []byte) (protocol.Invoker, error)

UnmarshalRequest implements protocol.Protocol interface.

type Request

type Request struct {
	Client   string      `yaml:"client,omitempty"`
	Method   string      `yaml:"method"`
	Metadata interface{} `yaml:"metadata,omitempty"`
	Message  interface{} `yaml:"message,omitempty"`

	// for backward compatibility
	Body interface{} `yaml:"body,omitempty"`
}

Request represents a request.

func (*Request) Invoke

func (r *Request) Invoke(ctx *context.Context) (*context.Context, interface{}, error)

Invoke implements protocol.Invoker interface.

Jump to

Keyboard shortcuts

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