pb

package
v0.0.0-...-d2b7790 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Account_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "account.Account",
	HandlerType: (*AccountServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Add",
			Handler:    _Account_Add_Handler,
		},
		{
			MethodName: "Del",
			Handler:    _Account_Del_Handler,
		},
		{
			MethodName: "Find",
			Handler:    _Account_Find_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "List",
			Handler:       _Account_List_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "user.proto",
}

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

Functions

func RegisterAccountServer

func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer)

Types

type AccountClient

type AccountClient interface {
	Add(ctx context.Context, in *User, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
	Del(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
	List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Account_ListClient, error)
	Find(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*User, error)
}

AccountClient is the client API for Account 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 NewAccountClient

func NewAccountClient(cc grpc.ClientConnInterface) AccountClient

type AccountServer

type AccountServer interface {
	Add(context.Context, *User) (*wrapperspb.StringValue, error)
	Del(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
	List(*emptypb.Empty, Account_ListServer) error
	Find(context.Context, *wrapperspb.StringValue) (*User, error)
	// contains filtered or unexported methods
}

AccountServer is the server API for Account service. All implementations must embed UnimplementedAccountServer for forward compatibility

type Account_ListClient

type Account_ListClient interface {
	Recv() (*User, error)
	grpc.ClientStream
}

type Account_ListServer

type Account_ListServer interface {
	Send(*User) error
	grpc.ServerStream
}

type UnimplementedAccountServer

type UnimplementedAccountServer struct {
}

UnimplementedAccountServer must be embedded to have forward compatible implementations.

func (UnimplementedAccountServer) Add

func (UnimplementedAccountServer) Del

func (UnimplementedAccountServer) Find

func (UnimplementedAccountServer) List

type UnsafeAccountServer

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

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

type User

type User struct {
	Uuid              string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	NickName          string `protobuf:"bytes,2,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"`
	Email             string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Phone             string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"`
	RegisterTimestamp string `protobuf:"bytes,5,opt,name=register_timestamp,json=registerTimestamp,proto3" json:"register_timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetNickName

func (x *User) GetNickName() string

func (*User) GetPhone

func (x *User) GetPhone() string

func (*User) GetRegisterTimestamp

func (x *User) GetRegisterTimestamp() string

func (*User) GetUuid

func (x *User) GetUuid() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Jump to

Keyboard shortcuts

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