Documentation
¶
Index ¶
- func DecodeGrpcMethodRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
- func EncodeGrpcMethodResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func EncodeGrpcStreamResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func NewFields(v *testpb.GrpcStreamStreamingRequest) *test.Fields
- func NewGrpcMethodHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewGrpcMethodPayload(message *testpb.GrpcMethodRequest) *test.Fields
- func NewGrpcStreamHandler(endpoint goa.Endpoint, h goagrpc.StreamHandler) goagrpc.StreamHandler
- func NewProtoGrpcMethodResponse(result *test.Fields) *testpb.GrpcMethodResponse
- func NewProtoGrpcStreamResponse(result *test.Fields) *testpb.GrpcStreamResponse
- type ErrorNamer
- type GrpcStreamServerStream
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeGrpcMethodRequest ¶
func DecodeGrpcMethodRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
DecodeGrpcMethodRequest decodes requests sent to "test" service "grpc_method" endpoint.
func EncodeGrpcMethodResponse ¶
func EncodeGrpcMethodResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
EncodeGrpcMethodResponse encodes responses from the "test" service "grpc_method" endpoint.
func EncodeGrpcStreamResponse ¶
func EncodeGrpcStreamResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
EncodeGrpcStreamResponse encodes responses from the "test" service "grpc_stream" endpoint.
func NewGrpcMethodHandler ¶
func NewGrpcMethodHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewGrpcMethodHandler creates a gRPC handler which serves the "test" service "grpc_method" endpoint.
func NewGrpcMethodPayload ¶
func NewGrpcMethodPayload(message *testpb.GrpcMethodRequest) *test.Fields
NewGrpcMethodPayload builds the payload of the "grpc_method" endpoint of the "test" service from the gRPC request type.
func NewGrpcStreamHandler ¶
func NewGrpcStreamHandler(endpoint goa.Endpoint, h goagrpc.StreamHandler) goagrpc.StreamHandler
NewGrpcStreamHandler creates a gRPC handler which serves the "test" service "grpc_stream" endpoint.
func NewProtoGrpcMethodResponse ¶ added in v0.10.0
func NewProtoGrpcMethodResponse(result *test.Fields) *testpb.GrpcMethodResponse
NewProtoGrpcMethodResponse builds the gRPC response type from the result of the "grpc_method" endpoint of the "test" service.
func NewProtoGrpcStreamResponse ¶ added in v0.10.0
func NewProtoGrpcStreamResponse(result *test.Fields) *testpb.GrpcStreamResponse
NewProtoGrpcStreamResponse builds the gRPC response type from the result of the "grpc_stream" endpoint of the "test" service.
Types ¶
type ErrorNamer ¶
type ErrorNamer interface {
ErrorName() string
}
ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the expr.
type GrpcStreamServerStream ¶
type GrpcStreamServerStream struct {
// contains filtered or unexported fields
}
GrpcStreamServerStream implements the test.GrpcStreamServerStream interface.
func (*GrpcStreamServerStream) Close ¶
func (s *GrpcStreamServerStream) Close() error
type Server ¶
type Server struct { GrpcMethodH goagrpc.UnaryHandler GrpcStreamH goagrpc.StreamHandler testpb.UnimplementedTestServer }
Server implements the testpb.TestServer interface.
func New ¶
func New(e *test.Endpoints, uh goagrpc.UnaryHandler, sh goagrpc.StreamHandler) *Server
New instantiates the server struct with the test service endpoints.
func (*Server) GrpcMethod ¶
func (s *Server) GrpcMethod(ctx context.Context, message *testpb.GrpcMethodRequest) (*testpb.GrpcMethodResponse, error)
GrpcMethod implements the "GrpcMethod" method in testpb.TestServer interface.
func (*Server) GrpcStream ¶
func (s *Server) GrpcStream(stream testpb.Test_GrpcStreamServer) error
GrpcStream implements the "GrpcStream" method in testpb.TestServer interface.