api

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RegisterUserServer

func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)

Types

type Empty added in v1.3.0

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

func (*Empty) Descriptor deprecated added in v1.3.0

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage added in v1.3.0

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v1.11.0

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

func (*Empty) Reset added in v1.3.0

func (x *Empty) Reset()

func (*Empty) String added in v1.3.0

func (x *Empty) String() string

type Reply

type Reply struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Count   int64  `protobuf:"zigzag64,2,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*Reply) Descriptor deprecated

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

Deprecated: Use Reply.ProtoReflect.Descriptor instead.

func (*Reply) GetCount added in v1.3.0

func (x *Reply) GetCount() int64

func (*Reply) GetMessage

func (x *Reply) GetMessage() string

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) ProtoReflect added in v1.11.0

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

func (*Reply) Reset

func (x *Reply) Reset()

func (*Reply) String

func (x *Reply) String() string

type Request

type Request struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetMessage

func (x *Request) GetMessage() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect added in v1.11.0

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type UidT added in v1.3.0

type UidT struct {
	Uid int64 `protobuf:"zigzag64,1,opt,name=uid,proto3" json:"uid,omitempty"`
	// contains filtered or unexported fields
}

func (*UidT) Descriptor deprecated added in v1.3.0

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

Deprecated: Use UidT.ProtoReflect.Descriptor instead.

func (*UidT) GetUid added in v1.3.0

func (x *UidT) GetUid() int64

func (*UidT) ProtoMessage added in v1.3.0

func (*UidT) ProtoMessage()

func (*UidT) ProtoReflect added in v1.11.0

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

func (*UidT) Reset added in v1.3.0

func (x *UidT) Reset()

func (*UidT) String added in v1.3.0

func (x *UidT) String() string

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer should be embedded to have forward compatible implementations.

func (UnimplementedUserServer) CreateUser added in v1.3.0

func (UnimplementedUserServer) DeleteUser added in v1.3.0

func (UnimplementedUserServer) Ping

func (UnimplementedUserServer) ReadUser added in v1.3.0

func (UnimplementedUserServer) UpdateUser added in v1.3.0

type UnsafeUserServer added in v1.11.0

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

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

type UserClient

type UserClient interface {
	Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error)
	CreateUser(ctx context.Context, in *UserT, opts ...grpc.CallOption) (*UidT, error)
	ReadUser(ctx context.Context, in *UidT, opts ...grpc.CallOption) (*UserT, error)
	UpdateUser(ctx context.Context, in *UserT, opts ...grpc.CallOption) (*Empty, error)
	DeleteUser(ctx context.Context, in *UidT, opts ...grpc.CallOption) (*Empty, error)
}

UserClient is the client API for User 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 NewUserClient

func NewUserClient(cc grpc.ClientConnInterface) UserClient

type UserServer

type UserServer interface {
	Ping(context.Context, *Request) (*Reply, error)
	CreateUser(context.Context, *UserT) (*UidT, error)
	ReadUser(context.Context, *UidT) (*UserT, error)
	UpdateUser(context.Context, *UserT) (*Empty, error)
	DeleteUser(context.Context, *UidT) (*Empty, error)
}

UserServer is the server API for User service. All implementations should embed UnimplementedUserServer for forward compatibility

type UserT added in v1.3.0

type UserT struct {
	Uid  int64  `protobuf:"zigzag64,1,opt,name=uid,proto3" json:"uid,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Sex  int64  `protobuf:"zigzag64,3,opt,name=sex,proto3" json:"sex,omitempty"`
	// contains filtered or unexported fields
}

func (*UserT) Descriptor deprecated added in v1.3.0

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

Deprecated: Use UserT.ProtoReflect.Descriptor instead.

func (*UserT) GetName added in v1.3.0

func (x *UserT) GetName() string

func (*UserT) GetSex added in v1.3.0

func (x *UserT) GetSex() int64

func (*UserT) GetUid added in v1.3.0

func (x *UserT) GetUid() int64

func (*UserT) ProtoMessage added in v1.3.0

func (*UserT) ProtoMessage()

func (*UserT) ProtoReflect added in v1.11.0

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

func (*UserT) Reset added in v1.3.0

func (x *UserT) Reset()

func (*UserT) String added in v1.3.0

func (x *UserT) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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