age

package
Version: v0.0.0-...-24617a1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AgeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "age.AgeService",
	HandlerType: (*AgeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _AgeService_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "age.proto",
}

AgeService_ServiceDesc is the grpc.ServiceDesc for AgeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterAgeServiceServer

func RegisterAgeServiceServer(s grpc.ServiceRegistrar, srv AgeServiceServer)

Types

type Age

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

func (*Age) Descriptor deprecated

This method has been deprecated.
func (*Age) Descriptor() ([]byte, []int)

Deprecated: Use Age.ProtoReflect.Descriptor instead.

func (*Age) GetAge

func (x *Age) GetAge() uint64

func (*Age) GetId

func (x *Age) GetId() uint64

func (*Age) ProtoMessage

func (*Age) ProtoMessage()

func (*Age) ProtoReflect

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

func (*Age) Reset

func (x *Age) Reset()

func (*Age) String

func (x *Age) String() string

type AgeServiceClient

type AgeServiceClient interface {
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
}

AgeServiceClient is the client API for AgeService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAgeServiceClient

func NewAgeServiceClient(cc grpc.ClientConnInterface) AgeServiceClient

type AgeServiceServer

type AgeServiceServer interface {
	Get(context.Context, *GetRequest) (*GetResponse, error)
	// contains filtered or unexported methods
}

AgeServiceServer is the server API for AgeService service. All implementations must embed UnimplementedAgeServiceServer for forward compatibility

type GetRequest

type GetRequest struct {
	Age uint64 `protobuf:"varint,1,opt,name=age,proto3" json:"age,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

This method has been deprecated.
func (*GetRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetAge

func (x *GetRequest) GetAge() uint64

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {
	Code uint64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // for error
	Data *Age   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

This method has been deprecated.
func (*GetResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetCode

func (x *GetResponse) GetCode() uint64

func (*GetResponse) GetData

func (x *GetResponse) GetData() *Age

func (*GetResponse) GetMsg

func (x *GetResponse) GetMsg() string

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type UnimplementedAgeServiceServer

type UnimplementedAgeServiceServer struct {
}

UnimplementedAgeServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAgeServiceServer) Get

type UnsafeAgeServiceServer

type UnsafeAgeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAgeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgeServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL