Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterPermServiceServer(s grpc.ServiceRegistrar, srv PermServiceServer)
- type CheckUserEnableReq
- func (*CheckUserEnableReq) Descriptor() ([]byte, []int)deprecated
- func (x *CheckUserEnableReq) GetGenTokenAt() string
- func (x *CheckUserEnableReq) GetUserId() string
- func (*CheckUserEnableReq) ProtoMessage()
- func (x *CheckUserEnableReq) ProtoReflect() protoreflect.Message
- func (x *CheckUserEnableReq) Reset()
- func (x *CheckUserEnableReq) String() string
- type CheckUserEnableResp
- func (*CheckUserEnableResp) Descriptor() ([]byte, []int)deprecated
- func (x *CheckUserEnableResp) GetLanguage() string
- func (x *CheckUserEnableResp) GetLastUpdatePasswordAt() int64
- func (*CheckUserEnableResp) ProtoMessage()
- func (x *CheckUserEnableResp) ProtoReflect() protoreflect.Message
- func (x *CheckUserEnableResp) Reset()
- func (x *CheckUserEnableResp) String() string
- type CheckUserPermReq
- func (*CheckUserPermReq) Descriptor() ([]byte, []int)deprecated
- func (x *CheckUserPermReq) GetGenTokenAt() string
- func (x *CheckUserPermReq) GetOneOfPerms() []string
- func (x *CheckUserPermReq) GetOrgId() string
- func (x *CheckUserPermReq) GetUserId() string
- func (*CheckUserPermReq) ProtoMessage()
- func (x *CheckUserPermReq) ProtoReflect() protoreflect.Message
- func (x *CheckUserPermReq) Reset()
- func (x *CheckUserPermReq) String() string
- type CheckUserPermResp
- func (*CheckUserPermResp) Descriptor() ([]byte, []int)deprecated
- func (x *CheckUserPermResp) GetIsAdmin() bool
- func (x *CheckUserPermResp) GetIsSystem() bool
- func (x *CheckUserPermResp) GetLanguage() string
- func (x *CheckUserPermResp) GetLastUpdatePasswordAt() int64
- func (*CheckUserPermResp) ProtoMessage()
- func (x *CheckUserPermResp) ProtoReflect() protoreflect.Message
- func (x *CheckUserPermResp) Reset()
- func (x *CheckUserPermResp) String() string
- type PermServiceClient
- type PermServiceServer
- type UnimplementedPermServiceServer
- type UnsafePermServiceServer
Constants ¶
const ( PermService_CheckUserEnable_FullMethodName = "/perm_service.PermService/CheckUserEnable" PermService_CheckUserPerm_FullMethodName = "/perm_service.PermService/CheckUserPerm" )
Variables ¶
var File_proto_perm_service_perm_service_proto protoreflect.FileDescriptor
var PermService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "perm_service.PermService", HandlerType: (*PermServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CheckUserEnable", Handler: _PermService_CheckUserEnable_Handler, }, { MethodName: "CheckUserPerm", Handler: _PermService_CheckUserPerm_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/perm-service/perm-service.proto", }
PermService_ServiceDesc is the grpc.ServiceDesc for PermService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPermServiceServer ¶
func RegisterPermServiceServer(s grpc.ServiceRegistrar, srv PermServiceServer)
Types ¶
type CheckUserEnableReq ¶
type CheckUserEnableReq struct {
UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
GenTokenAt string `protobuf:"bytes,2,opt,name=genTokenAt,proto3" json:"genTokenAt,omitempty"`
// contains filtered or unexported fields
}
func (*CheckUserEnableReq) Descriptor
deprecated
func (*CheckUserEnableReq) Descriptor() ([]byte, []int)
Deprecated: Use CheckUserEnableReq.ProtoReflect.Descriptor instead.
func (*CheckUserEnableReq) GetGenTokenAt ¶
func (x *CheckUserEnableReq) GetGenTokenAt() string
func (*CheckUserEnableReq) GetUserId ¶
func (x *CheckUserEnableReq) GetUserId() string
func (*CheckUserEnableReq) ProtoMessage ¶
func (*CheckUserEnableReq) ProtoMessage()
func (*CheckUserEnableReq) ProtoReflect ¶
func (x *CheckUserEnableReq) ProtoReflect() protoreflect.Message
func (*CheckUserEnableReq) Reset ¶
func (x *CheckUserEnableReq) Reset()
func (*CheckUserEnableReq) String ¶
func (x *CheckUserEnableReq) String() string
type CheckUserEnableResp ¶
type CheckUserEnableResp struct {
Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"`
LastUpdatePasswordAt int64 `protobuf:"varint,2,opt,name=lastUpdatePasswordAt,proto3" json:"lastUpdatePasswordAt,omitempty"`
// contains filtered or unexported fields
}
func (*CheckUserEnableResp) Descriptor
deprecated
func (*CheckUserEnableResp) Descriptor() ([]byte, []int)
Deprecated: Use CheckUserEnableResp.ProtoReflect.Descriptor instead.
func (*CheckUserEnableResp) GetLanguage ¶
func (x *CheckUserEnableResp) GetLanguage() string
func (*CheckUserEnableResp) GetLastUpdatePasswordAt ¶ added in v0.2.8
func (x *CheckUserEnableResp) GetLastUpdatePasswordAt() int64
func (*CheckUserEnableResp) ProtoMessage ¶
func (*CheckUserEnableResp) ProtoMessage()
func (*CheckUserEnableResp) ProtoReflect ¶
func (x *CheckUserEnableResp) ProtoReflect() protoreflect.Message
func (*CheckUserEnableResp) Reset ¶
func (x *CheckUserEnableResp) Reset()
func (*CheckUserEnableResp) String ¶
func (x *CheckUserEnableResp) String() string
type CheckUserPermReq ¶
type CheckUserPermReq struct {
UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
GenTokenAt string `protobuf:"bytes,2,opt,name=genTokenAt,proto3" json:"genTokenAt,omitempty"`
OrgId string `protobuf:"bytes,3,opt,name=orgId,proto3" json:"orgId,omitempty"`
OneOfPerms []string `protobuf:"bytes,4,rep,name=oneOfPerms,proto3" json:"oneOfPerms,omitempty"`
// contains filtered or unexported fields
}
func (*CheckUserPermReq) Descriptor
deprecated
func (*CheckUserPermReq) Descriptor() ([]byte, []int)
Deprecated: Use CheckUserPermReq.ProtoReflect.Descriptor instead.
func (*CheckUserPermReq) GetGenTokenAt ¶
func (x *CheckUserPermReq) GetGenTokenAt() string
func (*CheckUserPermReq) GetOneOfPerms ¶
func (x *CheckUserPermReq) GetOneOfPerms() []string
func (*CheckUserPermReq) GetOrgId ¶
func (x *CheckUserPermReq) GetOrgId() string
func (*CheckUserPermReq) GetUserId ¶
func (x *CheckUserPermReq) GetUserId() string
func (*CheckUserPermReq) ProtoMessage ¶
func (*CheckUserPermReq) ProtoMessage()
func (*CheckUserPermReq) ProtoReflect ¶
func (x *CheckUserPermReq) ProtoReflect() protoreflect.Message
func (*CheckUserPermReq) Reset ¶
func (x *CheckUserPermReq) Reset()
func (*CheckUserPermReq) String ¶
func (x *CheckUserPermReq) String() string
type CheckUserPermResp ¶
type CheckUserPermResp struct {
IsAdmin bool `protobuf:"varint,1,opt,name=isAdmin,proto3" json:"isAdmin,omitempty"`
IsSystem bool `protobuf:"varint,2,opt,name=isSystem,proto3" json:"isSystem,omitempty"`
Language string `protobuf:"bytes,3,opt,name=language,proto3" json:"language,omitempty"`
LastUpdatePasswordAt int64 `protobuf:"varint,4,opt,name=lastUpdatePasswordAt,proto3" json:"lastUpdatePasswordAt,omitempty"`
// contains filtered or unexported fields
}
func (*CheckUserPermResp) Descriptor
deprecated
func (*CheckUserPermResp) Descriptor() ([]byte, []int)
Deprecated: Use CheckUserPermResp.ProtoReflect.Descriptor instead.
func (*CheckUserPermResp) GetIsAdmin ¶
func (x *CheckUserPermResp) GetIsAdmin() bool
func (*CheckUserPermResp) GetIsSystem ¶
func (x *CheckUserPermResp) GetIsSystem() bool
func (*CheckUserPermResp) GetLanguage ¶
func (x *CheckUserPermResp) GetLanguage() string
func (*CheckUserPermResp) GetLastUpdatePasswordAt ¶ added in v0.2.8
func (x *CheckUserPermResp) GetLastUpdatePasswordAt() int64
func (*CheckUserPermResp) ProtoMessage ¶
func (*CheckUserPermResp) ProtoMessage()
func (*CheckUserPermResp) ProtoReflect ¶
func (x *CheckUserPermResp) ProtoReflect() protoreflect.Message
func (*CheckUserPermResp) Reset ¶
func (x *CheckUserPermResp) Reset()
func (*CheckUserPermResp) String ¶
func (x *CheckUserPermResp) String() string
type PermServiceClient ¶
type PermServiceClient interface {
// 检查用户状态
CheckUserEnable(ctx context.Context, in *CheckUserEnableReq, opts ...grpc.CallOption) (*CheckUserEnableResp, error)
// 检查用户权限
CheckUserPerm(ctx context.Context, in *CheckUserPermReq, opts ...grpc.CallOption) (*CheckUserPermResp, error)
}
PermServiceClient is the client API for PermService 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 NewPermServiceClient ¶
func NewPermServiceClient(cc grpc.ClientConnInterface) PermServiceClient
type PermServiceServer ¶
type PermServiceServer interface {
// 检查用户状态
CheckUserEnable(context.Context, *CheckUserEnableReq) (*CheckUserEnableResp, error)
// 检查用户权限
CheckUserPerm(context.Context, *CheckUserPermReq) (*CheckUserPermResp, error)
// contains filtered or unexported methods
}
PermServiceServer is the server API for PermService service. All implementations must embed UnimplementedPermServiceServer for forward compatibility.
type UnimplementedPermServiceServer ¶
type UnimplementedPermServiceServer struct{}
UnimplementedPermServiceServer 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 (UnimplementedPermServiceServer) CheckUserEnable ¶
func (UnimplementedPermServiceServer) CheckUserEnable(context.Context, *CheckUserEnableReq) (*CheckUserEnableResp, error)
func (UnimplementedPermServiceServer) CheckUserPerm ¶
func (UnimplementedPermServiceServer) CheckUserPerm(context.Context, *CheckUserPermReq) (*CheckUserPermResp, error)
type UnsafePermServiceServer ¶
type UnsafePermServiceServer interface {
// contains filtered or unexported methods
}
UnsafePermServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PermServiceServer will result in compilation errors.