pb

package
v0.0.0-...-d11ffb8 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LoginReply_ReplyType_name = map[int32]string{
		0: "Success",
		1: "Fail",
	}
	LoginReply_ReplyType_value = map[string]int32{
		"Success": 0,
		"Fail":    1,
	}
)

Enum value maps for LoginReply_ReplyType.

View Source
var (
	RegisterReply_ReplyType_name = map[int32]string{
		0: "Success",
		1: "Fail",
	}
	RegisterReply_ReplyType_value = map[string]int32{
		"Success": 0,
		"Fail":    1,
	}
)

Enum value maps for RegisterReply_ReplyType.

View Source
var (
	GetReply_ReplyType_name = map[int32]string{
		0: "Success",
		1: "Fail",
	}
	GetReply_ReplyType_value = map[string]int32{
		"Success": 0,
		"Fail":    1,
	}
)

Enum value maps for GetReply_ReplyType.

View Source
var File_users_proto protoreflect.FileDescriptor

Functions

func RegisterUsersServer

func RegisterUsersServer(s *grpc.Server, srv UsersServer)

Types

type GetReply

type GetReply struct {
	Username string             `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Phone    string             `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone,omitempty"`
	Email    string             `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	Status   GetReply_ReplyType `protobuf:"varint,4,opt,name=status,proto3,enum=pb.GetReply_ReplyType" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*GetReply) Descriptor deprecated

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

Deprecated: Use GetReply.ProtoReflect.Descriptor instead.

func (*GetReply) GetEmail

func (x *GetReply) GetEmail() string

func (*GetReply) GetPhone

func (x *GetReply) GetPhone() string

func (*GetReply) GetStatus

func (x *GetReply) GetStatus() GetReply_ReplyType

func (*GetReply) GetUsername

func (x *GetReply) GetUsername() string

func (*GetReply) ProtoMessage

func (*GetReply) ProtoMessage()

func (*GetReply) ProtoReflect

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

func (*GetReply) Reset

func (x *GetReply) Reset()

func (*GetReply) String

func (x *GetReply) String() string

type GetReply_ReplyType

type GetReply_ReplyType int32
const (
	GetReply_Success GetReply_ReplyType = 0
	GetReply_Fail    GetReply_ReplyType = 1
)

func (GetReply_ReplyType) Descriptor

func (GetReply_ReplyType) Enum

func (GetReply_ReplyType) EnumDescriptor deprecated

func (GetReply_ReplyType) EnumDescriptor() ([]byte, []int)

Deprecated: Use GetReply_ReplyType.Descriptor instead.

func (GetReply_ReplyType) Number

func (GetReply_ReplyType) String

func (x GetReply_ReplyType) String() string

func (GetReply_ReplyType) Type

type GetRequest

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

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetId

func (x *GetRequest) GetId() string

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 LoginReply

type LoginReply struct {
	Token  string               `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Status LoginReply_ReplyType `protobuf:"varint,2,opt,name=status,proto3,enum=pb.LoginReply_ReplyType" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginReply) Descriptor deprecated

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

Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.

func (*LoginReply) GetStatus

func (x *LoginReply) GetStatus() LoginReply_ReplyType

func (*LoginReply) GetToken

func (x *LoginReply) GetToken() string

func (*LoginReply) ProtoMessage

func (*LoginReply) ProtoMessage()

func (*LoginReply) ProtoReflect

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

func (*LoginReply) Reset

func (x *LoginReply) Reset()

func (*LoginReply) String

func (x *LoginReply) String() string

type LoginReply_ReplyType

type LoginReply_ReplyType int32
const (
	LoginReply_Success LoginReply_ReplyType = 0
	LoginReply_Fail    LoginReply_ReplyType = 1
)

func (LoginReply_ReplyType) Descriptor

func (LoginReply_ReplyType) Enum

func (LoginReply_ReplyType) EnumDescriptor deprecated

func (LoginReply_ReplyType) EnumDescriptor() ([]byte, []int)

Deprecated: Use LoginReply_ReplyType.Descriptor instead.

func (LoginReply_ReplyType) Number

func (LoginReply_ReplyType) String

func (x LoginReply_ReplyType) String() string

func (LoginReply_ReplyType) Type

type LoginRequest

type LoginRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetUsername

func (x *LoginRequest) GetUsername() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type RegisterReply

type RegisterReply struct {
	Token  string                  `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Status RegisterReply_ReplyType `protobuf:"varint,2,opt,name=status,proto3,enum=pb.RegisterReply_ReplyType" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterReply) Descriptor deprecated

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

Deprecated: Use RegisterReply.ProtoReflect.Descriptor instead.

func (*RegisterReply) GetStatus

func (x *RegisterReply) GetStatus() RegisterReply_ReplyType

func (*RegisterReply) GetToken

func (x *RegisterReply) GetToken() string

func (*RegisterReply) ProtoMessage

func (*RegisterReply) ProtoMessage()

func (*RegisterReply) ProtoReflect

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

func (*RegisterReply) Reset

func (x *RegisterReply) Reset()

func (*RegisterReply) String

func (x *RegisterReply) String() string

type RegisterReply_ReplyType

type RegisterReply_ReplyType int32
const (
	RegisterReply_Success RegisterReply_ReplyType = 0
	RegisterReply_Fail    RegisterReply_ReplyType = 1
)

func (RegisterReply_ReplyType) Descriptor

func (RegisterReply_ReplyType) Enum

func (RegisterReply_ReplyType) EnumDescriptor deprecated

func (RegisterReply_ReplyType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RegisterReply_ReplyType.Descriptor instead.

func (RegisterReply_ReplyType) Number

func (RegisterReply_ReplyType) String

func (x RegisterReply_ReplyType) String() string

func (RegisterReply_ReplyType) Type

type RegisterRequest

type RegisterRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Phone    string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`
	Email    string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterRequest) Descriptor deprecated

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

Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.

func (*RegisterRequest) GetEmail

func (x *RegisterRequest) GetEmail() string

func (*RegisterRequest) GetPassword

func (x *RegisterRequest) GetPassword() string

func (*RegisterRequest) GetPhone

func (x *RegisterRequest) GetPhone() string

func (*RegisterRequest) GetUsername

func (x *RegisterRequest) GetUsername() string

func (*RegisterRequest) ProtoMessage

func (*RegisterRequest) ProtoMessage()

func (*RegisterRequest) ProtoReflect

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

func (*RegisterRequest) Reset

func (x *RegisterRequest) Reset()

func (*RegisterRequest) String

func (x *RegisterRequest) String() string

type UnimplementedUsersServer

type UnimplementedUsersServer struct {
}

UnimplementedUsersServer can be embedded to have forward compatible implementations.

func (*UnimplementedUsersServer) Get

func (*UnimplementedUsersServer) Login

func (*UnimplementedUsersServer) Register

type UsersClient

type UsersClient interface {
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error)
}

UsersClient is the client API for Users service.

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

func NewUsersClient

func NewUsersClient(cc grpc.ClientConnInterface) UsersClient

type UsersServer

type UsersServer interface {
	Login(context.Context, *LoginRequest) (*LoginReply, error)
	Register(context.Context, *RegisterRequest) (*RegisterReply, error)
	Get(context.Context, *GetRequest) (*GetReply, error)
}

UsersServer is the server API for Users service.

Jump to

Keyboard shortcuts

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