test

package
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RegisterMyServiceServer

func RegisterMyServiceServer(s *grpc.Server, srv MyServiceServer)

Types

type MyServiceClient

type MyServiceClient interface {
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
	PingStream(ctx context.Context, opts ...grpc.CallOption) (MyService_PingStreamClient, error)
}

MyServiceClient is the client API for MyService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMyServiceClient

func NewMyServiceClient(cc grpc.ClientConnInterface) MyServiceClient

type MyServiceServer

type MyServiceServer interface {
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	PingStream(MyService_PingStreamServer) error
}

MyServiceServer is the server API for MyService service.

type MyService_PingStreamClient

type MyService_PingStreamClient interface {
	Send(*PingRequest) error
	Recv() (*PingResponse, error)
	grpc.ClientStream
}

type MyService_PingStreamServer

type MyService_PingStreamServer interface {
	Send(*PingResponse) error
	Recv() (*PingRequest, error)
	grpc.ServerStream
}

type PingRequest

type PingRequest struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*PingRequest) Descriptor deprecated

func (*PingRequest) Descriptor() ([]byte, []int)

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) GetId

func (x *PingRequest) GetId() int64

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

func (x *PingRequest) ProtoReflect() protoreflect.Message

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

func (*PingRequest) Validate

func (m *PingRequest) Validate() error

Validate checks the field values on PingRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type PingRequestValidationError

type PingRequestValidationError struct {
	// contains filtered or unexported fields
}

PingRequestValidationError is the validation error returned by PingRequest.Validate if the designated constraints aren't met.

func (PingRequestValidationError) Cause

Cause function returns cause value.

func (PingRequestValidationError) Error

Error satisfies the builtin error interface

func (PingRequestValidationError) ErrorName

func (e PingRequestValidationError) ErrorName() string

ErrorName returns error name.

func (PingRequestValidationError) Field

Field function returns field value.

func (PingRequestValidationError) Key

Key function returns key value.

func (PingRequestValidationError) Reason

Reason function returns reason value.

type PingResponse

type PingResponse struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*PingResponse) Descriptor deprecated

func (*PingResponse) Descriptor() ([]byte, []int)

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) GetId

func (x *PingResponse) GetId() int64

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect

func (x *PingResponse) ProtoReflect() protoreflect.Message

func (*PingResponse) Reset

func (x *PingResponse) Reset()

func (*PingResponse) String

func (x *PingResponse) String() string

func (*PingResponse) Validate

func (m *PingResponse) Validate() error

Validate checks the field values on PingResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type PingResponseValidationError

type PingResponseValidationError struct {
	// contains filtered or unexported fields
}

PingResponseValidationError is the validation error returned by PingResponse.Validate if the designated constraints aren't met.

func (PingResponseValidationError) Cause

Cause function returns cause value.

func (PingResponseValidationError) Error

Error satisfies the builtin error interface

func (PingResponseValidationError) ErrorName

func (e PingResponseValidationError) ErrorName() string

ErrorName returns error name.

func (PingResponseValidationError) Field

Field function returns field value.

func (PingResponseValidationError) Key

Key function returns key value.

func (PingResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedMyServiceServer

type UnimplementedMyServiceServer struct {
}

UnimplementedMyServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedMyServiceServer) Ping

func (*UnimplementedMyServiceServer) PingStream

Jump to

Keyboard shortcuts

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