Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterBiHTTPServer(s *http.Server, srv BiHTTPServer)
- func RegisterBiServer(s grpc.ServiceRegistrar, srv BiServer)
- type Authority
- func (*Authority) Descriptor() ([]byte, []int)deprecated
- func (x *Authority) GetAuthorityId() uint64
- func (x *Authority) GetAuthorityName() string
- func (x *Authority) GetParentId() uint64
- func (*Authority) ProtoMessage()
- func (x *Authority) ProtoReflect() protoreflect.Message
- func (x *Authority) Reset()
- func (x *Authority) String() string
- type BiClient
- type BiHTTPClient
- type BiHTTPClientImpl
- type BiHTTPServer
- type BiServer
- type ChangeUser
- func (*ChangeUser) Descriptor() ([]byte, []int)deprecated
- func (x *ChangeUser) GetEmail() string
- func (x *ChangeUser) GetEnable() int64
- func (x *ChangeUser) GetHeaderImg() string
- func (x *ChangeUser) GetID() uint64
- func (x *ChangeUser) GetNickName() string
- func (x *ChangeUser) GetPhone() string
- func (x *ChangeUser) GetSideMode() string
- func (x *ChangeUser) GetUsername() string
- func (*ChangeUser) ProtoMessage()
- func (x *ChangeUser) ProtoReflect() protoreflect.Message
- func (x *ChangeUser) Reset()
- func (x *ChangeUser) String() string
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type PingRequest
- type PongReply
- type ReqChangePassword
- func (*ReqChangePassword) Descriptor() ([]byte, []int)deprecated
- func (x *ReqChangePassword) GetNewPassword() string
- func (x *ReqChangePassword) GetPassword() string
- func (*ReqChangePassword) ProtoMessage()
- func (x *ReqChangePassword) ProtoReflect() protoreflect.Message
- func (x *ReqChangePassword) Reset()
- func (x *ReqChangePassword) String() string
- type ReqLogin
- type ReqRegister
- func (*ReqRegister) Descriptor() ([]byte, []int)deprecated
- func (x *ReqRegister) GetAuthorityId() int64
- func (x *ReqRegister) GetAuthorityIds() []int64
- func (x *ReqRegister) GetEmail() string
- func (x *ReqRegister) GetEnable() int64
- func (x *ReqRegister) GetHeaderImg() string
- func (x *ReqRegister) GetNickName() string
- func (x *ReqRegister) GetPassword() string
- func (x *ReqRegister) GetPhone() string
- func (x *ReqRegister) GetUsername() string
- func (*ReqRegister) ProtoMessage()
- func (x *ReqRegister) ProtoReflect() protoreflect.Message
- func (x *ReqRegister) Reset()
- func (x *ReqRegister) String() string
- type ReqSetUserAuth
- func (*ReqSetUserAuth) Descriptor() ([]byte, []int)deprecated
- func (x *ReqSetUserAuth) GetAuthorityId() uint64
- func (x *ReqSetUserAuth) GetUserId() uint64
- func (*ReqSetUserAuth) ProtoMessage()
- func (x *ReqSetUserAuth) ProtoReflect() protoreflect.Message
- func (x *ReqSetUserAuth) Reset()
- func (x *ReqSetUserAuth) String() string
- type ReqSetUserAuthorities
- func (*ReqSetUserAuthorities) Descriptor() ([]byte, []int)deprecated
- func (x *ReqSetUserAuthorities) GetAuthorityId() []uint64
- func (x *ReqSetUserAuthorities) GetType() uint64
- func (x *ReqSetUserAuthorities) GetUserID() uint64
- func (*ReqSetUserAuthorities) ProtoMessage()
- func (x *ReqSetUserAuthorities) ProtoReflect() protoreflect.Message
- func (x *ReqSetUserAuthorities) Reset()
- func (x *ReqSetUserAuthorities) String() string
- type RespLogin
- func (*RespLogin) Descriptor() ([]byte, []int)deprecated
- func (x *RespLogin) GetExpiresAt() int64
- func (x *RespLogin) GetToken() string
- func (x *RespLogin) GetUserInfo() *UserInfo
- func (*RespLogin) ProtoMessage()
- func (x *RespLogin) ProtoReflect() protoreflect.Message
- func (x *RespLogin) Reset()
- func (x *RespLogin) String() string
- type UnimplementedBiServer
- type UnsafeBiServer
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfo) GetAuthorities() []*Authority
- func (x *UserInfo) GetAuthority() *Authority
- func (x *UserInfo) GetAuthorityId() uint64
- func (x *UserInfo) GetBaseColor() string
- func (x *UserInfo) GetCreatedAt() int64
- func (x *UserInfo) GetDeletedAt() int64
- func (x *UserInfo) GetEmail() string
- func (x *UserInfo) GetEnable() int64
- func (x *UserInfo) GetHeaderImg() string
- func (x *UserInfo) GetID() uint64
- func (x *UserInfo) GetNickName() string
- func (x *UserInfo) GetPassword() string
- func (x *UserInfo) GetUpdatedAt() int64
- func (x *UserInfo) GetUsername() string
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
Constants ¶
const (
Bi_Ping_FullMethodName = "/bi.v1.Bi/Ping"
)
const OperationBiPing = "/bi.v1.Bi/Ping"
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "GREETER_UNSPECIFIED", 1: "USER_NOT_FOUND", } ErrorReason_value = map[string]int32{ "GREETER_UNSPECIFIED": 0, "USER_NOT_FOUND": 1, } )
Enum value maps for ErrorReason.
var Bi_ServiceDesc = grpc.ServiceDesc{ ServiceName: "bi.v1.Bi", HandlerType: (*BiServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _Bi_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "bi/v1/method.proto", }
Bi_ServiceDesc is the grpc.ServiceDesc for Bi service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_bi_v1_api_user_proto protoreflect.FileDescriptor
var File_bi_v1_error_reason_proto protoreflect.FileDescriptor
var File_bi_v1_method_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBiHTTPServer ¶
func RegisterBiHTTPServer(s *http.Server, srv BiHTTPServer)
func RegisterBiServer ¶
func RegisterBiServer(s grpc.ServiceRegistrar, srv BiServer)
Types ¶
type Authority ¶
type Authority struct { AuthorityId uint64 `protobuf:"varint,1,opt,name=authorityId,proto3" json:"authorityId,omitempty"` AuthorityName string `protobuf:"bytes,2,opt,name=authorityName,proto3" json:"authorityName,omitempty"` ParentId uint64 `protobuf:"varint,3,opt,name=parentId,proto3" json:"parentId,omitempty"` // contains filtered or unexported fields }
func (*Authority) Descriptor
deprecated
func (*Authority) GetAuthorityId ¶
func (*Authority) GetAuthorityName ¶
func (*Authority) GetParentId ¶
func (*Authority) ProtoMessage ¶
func (*Authority) ProtoMessage()
func (*Authority) ProtoReflect ¶
func (x *Authority) ProtoReflect() protoreflect.Message
type BiClient ¶
type BiClient interface { // Sends a greeting Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongReply, error) }
BiClient is the client API for Bi 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.
The greeting service definition.
func NewBiClient ¶
func NewBiClient(cc grpc.ClientConnInterface) BiClient
type BiHTTPClient ¶
type BiHTTPClient interface {
Ping(ctx context.Context, req *PingRequest, opts ...http.CallOption) (rsp *PongReply, err error)
}
func NewBiHTTPClient ¶
func NewBiHTTPClient(client *http.Client) BiHTTPClient
type BiHTTPClientImpl ¶
type BiHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*BiHTTPClientImpl) Ping ¶
func (c *BiHTTPClientImpl) Ping(ctx context.Context, in *PingRequest, opts ...http.CallOption) (*PongReply, error)
type BiHTTPServer ¶
type BiHTTPServer interface { // Ping Sends a greeting Ping(context.Context, *PingRequest) (*PongReply, error) }
type BiServer ¶
type BiServer interface { // Sends a greeting Ping(context.Context, *PingRequest) (*PongReply, error) // contains filtered or unexported methods }
BiServer is the server API for Bi service. All implementations must embed UnimplementedBiServer for forward compatibility.
The greeting service definition.
type ChangeUser ¶
type ChangeUser struct { ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` NickName string `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` HeaderImg string `protobuf:"bytes,6,opt,name=headerImg,proto3" json:"headerImg,omitempty"` SideMode string `protobuf:"bytes,7,opt,name=sideMode,proto3" json:"sideMode,omitempty"` Enable int64 `protobuf:"varint,8,opt,name=enable,proto3" json:"enable,omitempty"` // contains filtered or unexported fields }
func (*ChangeUser) Descriptor
deprecated
func (*ChangeUser) Descriptor() ([]byte, []int)
Deprecated: Use ChangeUser.ProtoReflect.Descriptor instead.
func (*ChangeUser) GetEmail ¶
func (x *ChangeUser) GetEmail() string
func (*ChangeUser) GetEnable ¶
func (x *ChangeUser) GetEnable() int64
func (*ChangeUser) GetHeaderImg ¶
func (x *ChangeUser) GetHeaderImg() string
func (*ChangeUser) GetID ¶
func (x *ChangeUser) GetID() uint64
func (*ChangeUser) GetNickName ¶
func (x *ChangeUser) GetNickName() string
func (*ChangeUser) GetPhone ¶
func (x *ChangeUser) GetPhone() string
func (*ChangeUser) GetSideMode ¶
func (x *ChangeUser) GetSideMode() string
func (*ChangeUser) GetUsername ¶
func (x *ChangeUser) GetUsername() string
func (*ChangeUser) ProtoMessage ¶
func (*ChangeUser) ProtoMessage()
func (*ChangeUser) ProtoReflect ¶
func (x *ChangeUser) ProtoReflect() protoreflect.Message
func (*ChangeUser) Reset ¶
func (x *ChangeUser) Reset()
func (*ChangeUser) String ¶
func (x *ChangeUser) String() string
type ErrorReason ¶
type ErrorReason int32
const ( ErrorReason_GREETER_UNSPECIFIED ErrorReason = 0 ErrorReason_USER_NOT_FOUND ErrorReason = 1 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
type PingRequest ¶
type PingRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) GetName ¶
func (x *PingRequest) GetName() string
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
type PongReply ¶
type PongReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*PongReply) Descriptor
deprecated
func (*PongReply) GetMessage ¶
func (*PongReply) ProtoMessage ¶
func (*PongReply) ProtoMessage()
func (*PongReply) ProtoReflect ¶
func (x *PongReply) ProtoReflect() protoreflect.Message
type ReqChangePassword ¶
type ReqChangePassword struct { Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` NewPassword string `protobuf:"bytes,2,opt,name=newPassword,proto3" json:"newPassword,omitempty"` // contains filtered or unexported fields }
func (*ReqChangePassword) Descriptor
deprecated
func (*ReqChangePassword) Descriptor() ([]byte, []int)
Deprecated: Use ReqChangePassword.ProtoReflect.Descriptor instead.
func (*ReqChangePassword) GetNewPassword ¶
func (x *ReqChangePassword) GetNewPassword() string
func (*ReqChangePassword) GetPassword ¶
func (x *ReqChangePassword) GetPassword() string
func (*ReqChangePassword) ProtoMessage ¶
func (*ReqChangePassword) ProtoMessage()
func (*ReqChangePassword) ProtoReflect ¶
func (x *ReqChangePassword) ProtoReflect() protoreflect.Message
func (*ReqChangePassword) Reset ¶
func (x *ReqChangePassword) Reset()
func (*ReqChangePassword) String ¶
func (x *ReqChangePassword) String() string
type ReqLogin ¶
type ReqLogin 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 (*ReqLogin) Descriptor
deprecated
func (*ReqLogin) GetPassword ¶
func (*ReqLogin) GetUsername ¶
func (*ReqLogin) ProtoMessage ¶
func (*ReqLogin) ProtoMessage()
func (*ReqLogin) ProtoReflect ¶
func (x *ReqLogin) ProtoReflect() protoreflect.Message
type ReqRegister ¶
type ReqRegister 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"` NickName string `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"` HeaderImg string `protobuf:"bytes,4,opt,name=headerImg,proto3" json:"headerImg,omitempty"` AuthorityId int64 `protobuf:"varint,5,opt,name=authorityId,proto3" json:"authorityId,omitempty"` Enable int64 `protobuf:"varint,6,opt,name=enable,proto3" json:"enable,omitempty"` AuthorityIds []int64 `protobuf:"varint,7,rep,packed,name=authorityIds,proto3" json:"authorityIds,omitempty"` Phone string `protobuf:"bytes,8,opt,name=phone,proto3" json:"phone,omitempty"` Email string `protobuf:"bytes,9,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*ReqRegister) Descriptor
deprecated
func (*ReqRegister) Descriptor() ([]byte, []int)
Deprecated: Use ReqRegister.ProtoReflect.Descriptor instead.
func (*ReqRegister) GetAuthorityId ¶
func (x *ReqRegister) GetAuthorityId() int64
func (*ReqRegister) GetAuthorityIds ¶
func (x *ReqRegister) GetAuthorityIds() []int64
func (*ReqRegister) GetEmail ¶
func (x *ReqRegister) GetEmail() string
func (*ReqRegister) GetEnable ¶
func (x *ReqRegister) GetEnable() int64
func (*ReqRegister) GetHeaderImg ¶
func (x *ReqRegister) GetHeaderImg() string
func (*ReqRegister) GetNickName ¶
func (x *ReqRegister) GetNickName() string
func (*ReqRegister) GetPassword ¶
func (x *ReqRegister) GetPassword() string
func (*ReqRegister) GetPhone ¶
func (x *ReqRegister) GetPhone() string
func (*ReqRegister) GetUsername ¶
func (x *ReqRegister) GetUsername() string
func (*ReqRegister) ProtoMessage ¶
func (*ReqRegister) ProtoMessage()
func (*ReqRegister) ProtoReflect ¶
func (x *ReqRegister) ProtoReflect() protoreflect.Message
func (*ReqRegister) Reset ¶
func (x *ReqRegister) Reset()
func (*ReqRegister) String ¶
func (x *ReqRegister) String() string
type ReqSetUserAuth ¶
type ReqSetUserAuth struct { UserId uint64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` AuthorityId uint64 `protobuf:"varint,2,opt,name=authorityId,proto3" json:"authorityId,omitempty"` // contains filtered or unexported fields }
func (*ReqSetUserAuth) Descriptor
deprecated
func (*ReqSetUserAuth) Descriptor() ([]byte, []int)
Deprecated: Use ReqSetUserAuth.ProtoReflect.Descriptor instead.
func (*ReqSetUserAuth) GetAuthorityId ¶
func (x *ReqSetUserAuth) GetAuthorityId() uint64
func (*ReqSetUserAuth) GetUserId ¶
func (x *ReqSetUserAuth) GetUserId() uint64
func (*ReqSetUserAuth) ProtoMessage ¶
func (*ReqSetUserAuth) ProtoMessage()
func (*ReqSetUserAuth) ProtoReflect ¶
func (x *ReqSetUserAuth) ProtoReflect() protoreflect.Message
func (*ReqSetUserAuth) Reset ¶
func (x *ReqSetUserAuth) Reset()
func (*ReqSetUserAuth) String ¶
func (x *ReqSetUserAuth) String() string
type ReqSetUserAuthorities ¶
type ReqSetUserAuthorities struct { UserID uint64 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"` // 1:添加; 2:删除 Type uint64 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` AuthorityId []uint64 `protobuf:"varint,3,rep,packed,name=authorityId,proto3" json:"authorityId,omitempty"` // contains filtered or unexported fields }
func (*ReqSetUserAuthorities) Descriptor
deprecated
func (*ReqSetUserAuthorities) Descriptor() ([]byte, []int)
Deprecated: Use ReqSetUserAuthorities.ProtoReflect.Descriptor instead.
func (*ReqSetUserAuthorities) GetAuthorityId ¶
func (x *ReqSetUserAuthorities) GetAuthorityId() []uint64
func (*ReqSetUserAuthorities) GetType ¶
func (x *ReqSetUserAuthorities) GetType() uint64
func (*ReqSetUserAuthorities) GetUserID ¶
func (x *ReqSetUserAuthorities) GetUserID() uint64
func (*ReqSetUserAuthorities) ProtoMessage ¶
func (*ReqSetUserAuthorities) ProtoMessage()
func (*ReqSetUserAuthorities) ProtoReflect ¶
func (x *ReqSetUserAuthorities) ProtoReflect() protoreflect.Message
func (*ReqSetUserAuthorities) Reset ¶
func (x *ReqSetUserAuthorities) Reset()
func (*ReqSetUserAuthorities) String ¶
func (x *ReqSetUserAuthorities) String() string
type RespLogin ¶
type RespLogin struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` ExpiresAt int64 `protobuf:"varint,2,opt,name=ExpiresAt,proto3" json:"ExpiresAt,omitempty"` UserInfo *UserInfo `protobuf:"bytes,3,opt,name=userInfo,proto3" json:"userInfo,omitempty"` // contains filtered or unexported fields }
func (*RespLogin) Descriptor
deprecated
func (*RespLogin) GetExpiresAt ¶
func (*RespLogin) GetUserInfo ¶
func (*RespLogin) ProtoMessage ¶
func (*RespLogin) ProtoMessage()
func (*RespLogin) ProtoReflect ¶
func (x *RespLogin) ProtoReflect() protoreflect.Message
type UnimplementedBiServer ¶
type UnimplementedBiServer struct{}
UnimplementedBiServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedBiServer) Ping ¶
func (UnimplementedBiServer) Ping(context.Context, *PingRequest) (*PongReply, error)
type UnsafeBiServer ¶
type UnsafeBiServer interface {
// contains filtered or unexported methods
}
UnsafeBiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BiServer will result in compilation errors.
type UserInfo ¶
type UserInfo struct { ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` CreatedAt int64 `protobuf:"varint,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"` UpdatedAt int64 `protobuf:"varint,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` DeletedAt int64 `protobuf:"varint,4,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"` NickName string `protobuf:"bytes,7,opt,name=nickName,proto3" json:"nickName,omitempty"` HeaderImg string `protobuf:"bytes,8,opt,name=headerImg,proto3" json:"headerImg,omitempty"` BaseColor string `protobuf:"bytes,9,opt,name=baseColor,proto3" json:"baseColor,omitempty"` AuthorityId uint64 `protobuf:"varint,10,opt,name=authorityId,proto3" json:"authorityId,omitempty"` Email string `protobuf:"bytes,11,opt,name=email,proto3" json:"email,omitempty"` Enable int64 `protobuf:"varint,12,opt,name=enable,proto3" json:"enable,omitempty"` Authority *Authority `protobuf:"bytes,13,opt,name=authority,proto3" json:"authority,omitempty"` Authorities []*Authority `protobuf:"bytes,14,rep,name=authorities,proto3" json:"authorities,omitempty"` // contains filtered or unexported fields }
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) GetAuthorities ¶
func (*UserInfo) GetAuthority ¶
func (*UserInfo) GetAuthorityId ¶
func (*UserInfo) GetBaseColor ¶
func (*UserInfo) GetCreatedAt ¶
func (*UserInfo) GetDeletedAt ¶
func (*UserInfo) GetHeaderImg ¶
func (*UserInfo) GetNickName ¶
func (*UserInfo) GetPassword ¶
func (*UserInfo) GetUpdatedAt ¶
func (*UserInfo) GetUsername ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message