Documentation
¶
Index ¶
- Constants
- Variables
- func Hook(c context.Context, db, model, method string) (hook.ScopeResponse, error)
- func RegisterScopeHTTPServer(s *http.Server, srv ScopeHTTPServer)
- func RegisterScopeServer(s grpc.ServiceRegistrar, srv ScopeServer)
- type GetScopeReply
- func (*GetScopeReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetScopeReply) GetAllDept() bool
- func (x *GetScopeReply) GetDeptId() uint32
- func (x *GetScopeReply) GetDeptScopes() []uint32
- func (x *GetScopeReply) GetFields() []string
- func (x *GetScopeReply) GetRule() string
- func (x *GetScopeReply) GetTenantId() uint32
- func (x *GetScopeReply) GetUserId() uint32
- func (*GetScopeReply) ProtoMessage()
- func (x *GetScopeReply) ProtoReflect() protoreflect.Message
- func (x *GetScopeReply) Reset()
- func (x *GetScopeReply) String() string
- func (m *GetScopeReply) Validate() error
- func (m *GetScopeReply) ValidateAll() error
- type GetScopeReplyMultiError
- type GetScopeReplyValidationError
- func (e GetScopeReplyValidationError) Cause() error
- func (e GetScopeReplyValidationError) Error() string
- func (e GetScopeReplyValidationError) ErrorName() string
- func (e GetScopeReplyValidationError) Field() string
- func (e GetScopeReplyValidationError) Key() bool
- func (e GetScopeReplyValidationError) Reason() string
- type GetScopeRequest
- func (*GetScopeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetScopeRequest) GetDatabase() string
- func (x *GetScopeRequest) GetMethod() string
- func (x *GetScopeRequest) GetModel() string
- func (*GetScopeRequest) ProtoMessage()
- func (x *GetScopeRequest) ProtoReflect() protoreflect.Message
- func (x *GetScopeRequest) Reset()
- func (x *GetScopeRequest) String() string
- func (m *GetScopeRequest) Validate() error
- func (m *GetScopeRequest) ValidateAll() error
- type GetScopeRequestMultiError
- type GetScopeRequestValidationError
- func (e GetScopeRequestValidationError) Cause() error
- func (e GetScopeRequestValidationError) Error() string
- func (e GetScopeRequestValidationError) ErrorName() string
- func (e GetScopeRequestValidationError) Field() string
- func (e GetScopeRequestValidationError) Key() bool
- func (e GetScopeRequestValidationError) Reason() string
- type GetUserDeptIdReply
- func (*GetUserDeptIdReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserDeptIdReply) GetDeptId() uint32
- func (*GetUserDeptIdReply) ProtoMessage()
- func (x *GetUserDeptIdReply) ProtoReflect() protoreflect.Message
- func (x *GetUserDeptIdReply) Reset()
- func (x *GetUserDeptIdReply) String() string
- func (m *GetUserDeptIdReply) Validate() error
- func (m *GetUserDeptIdReply) ValidateAll() error
- type GetUserDeptIdReplyMultiError
- type GetUserDeptIdReplyValidationError
- func (e GetUserDeptIdReplyValidationError) Cause() error
- func (e GetUserDeptIdReplyValidationError) Error() string
- func (e GetUserDeptIdReplyValidationError) ErrorName() string
- func (e GetUserDeptIdReplyValidationError) Field() string
- func (e GetUserDeptIdReplyValidationError) Key() bool
- func (e GetUserDeptIdReplyValidationError) Reason() string
- type GetUserDeptIdRequest
- func (*GetUserDeptIdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserDeptIdRequest) GetUserId() uint32
- func (*GetUserDeptIdRequest) ProtoMessage()
- func (x *GetUserDeptIdRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserDeptIdRequest) Reset()
- func (x *GetUserDeptIdRequest) String() string
- func (m *GetUserDeptIdRequest) Validate() error
- func (m *GetUserDeptIdRequest) ValidateAll() error
- type GetUserDeptIdRequestMultiError
- type GetUserDeptIdRequestValidationError
- func (e GetUserDeptIdRequestValidationError) Cause() error
- func (e GetUserDeptIdRequestValidationError) Error() string
- func (e GetUserDeptIdRequestValidationError) ErrorName() string
- func (e GetUserDeptIdRequestValidationError) Field() string
- func (e GetUserDeptIdRequestValidationError) Key() bool
- func (e GetUserDeptIdRequestValidationError) Reason() string
- type ScopeClient
- type ScopeHTTPClient
- type ScopeHTTPClientImpl
- type ScopeHTTPServer
- type ScopeServer
- type UnimplementedScopeServer
- type UnsafeScopeServer
Constants ¶
const ( Scope_GetScope_FullMethodName = "/manager.api.scope.Scope/GetScope" Scope_GetUserDeptId_FullMethodName = "/manager.api.scope.Scope/GetUserDeptId" )
const ( OperationScopeGetScope = "/manager.api.scope.Scope/GetScope" OperationScopeGetUserDeptId = "/manager.api.scope.Scope/GetUserDeptId" )
Variables ¶
var File_api_scope_proto_scope_proto protoreflect.FileDescriptor
var File_api_scope_proto_scope_service_proto protoreflect.FileDescriptor
var Scope_ServiceDesc = grpc.ServiceDesc{ ServiceName: "manager.api.scope.Scope", HandlerType: (*ScopeServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetScope", Handler: _Scope_GetScope_Handler, }, { MethodName: "GetUserDeptId", Handler: _Scope_GetUserDeptId_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/scope/proto/scope_service.proto", }
Scope_ServiceDesc is the grpc.ServiceDesc for Scope service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterScopeHTTPServer ¶
func RegisterScopeHTTPServer(s *http.Server, srv ScopeHTTPServer)
func RegisterScopeServer ¶
func RegisterScopeServer(s grpc.ServiceRegistrar, srv ScopeServer)
Types ¶
type GetScopeReply ¶
type GetScopeReply struct {
AllDept bool `protobuf:"varint,1,opt,name=allDept,proto3" json:"allDept,omitempty"`
DeptScopes []uint32 `protobuf:"varint,2,rep,packed,name=deptScopes,proto3" json:"deptScopes,omitempty"`
Rule string `protobuf:"bytes,3,opt,name=rule,proto3" json:"rule,omitempty"`
Fields []string `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"`
UserId uint32 `protobuf:"varint,5,opt,name=userId,proto3" json:"userId,omitempty"`
DeptId uint32 `protobuf:"varint,6,opt,name=deptId,proto3" json:"deptId,omitempty"`
TenantId uint32 `protobuf:"varint,7,opt,name=tenantId,proto3" json:"tenantId,omitempty"`
// contains filtered or unexported fields
}
func (*GetScopeReply) Descriptor
deprecated
func (*GetScopeReply) Descriptor() ([]byte, []int)
Deprecated: Use GetScopeReply.ProtoReflect.Descriptor instead.
func (*GetScopeReply) GetAllDept ¶
func (x *GetScopeReply) GetAllDept() bool
func (*GetScopeReply) GetDeptId ¶
func (x *GetScopeReply) GetDeptId() uint32
func (*GetScopeReply) GetDeptScopes ¶
func (x *GetScopeReply) GetDeptScopes() []uint32
func (*GetScopeReply) GetFields ¶
func (x *GetScopeReply) GetFields() []string
func (*GetScopeReply) GetRule ¶
func (x *GetScopeReply) GetRule() string
func (*GetScopeReply) GetTenantId ¶
func (x *GetScopeReply) GetTenantId() uint32
func (*GetScopeReply) GetUserId ¶
func (x *GetScopeReply) GetUserId() uint32
func (*GetScopeReply) ProtoMessage ¶
func (*GetScopeReply) ProtoMessage()
func (*GetScopeReply) ProtoReflect ¶
func (x *GetScopeReply) ProtoReflect() protoreflect.Message
func (*GetScopeReply) Reset ¶
func (x *GetScopeReply) Reset()
func (*GetScopeReply) String ¶
func (x *GetScopeReply) String() string
func (*GetScopeReply) Validate ¶
func (m *GetScopeReply) Validate() error
Validate checks the field values on GetScopeReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetScopeReply) ValidateAll ¶
func (m *GetScopeReply) ValidateAll() error
ValidateAll checks the field values on GetScopeReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetScopeReplyMultiError, or nil if none found.
type GetScopeReplyMultiError ¶
type GetScopeReplyMultiError []error
GetScopeReplyMultiError is an error wrapping multiple validation errors returned by GetScopeReply.ValidateAll() if the designated constraints aren't met.
func (GetScopeReplyMultiError) AllErrors ¶
func (m GetScopeReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetScopeReplyMultiError) Error ¶
func (m GetScopeReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetScopeReplyValidationError ¶
type GetScopeReplyValidationError struct {
// contains filtered or unexported fields
}
GetScopeReplyValidationError is the validation error returned by GetScopeReply.Validate if the designated constraints aren't met.
func (GetScopeReplyValidationError) Cause ¶
func (e GetScopeReplyValidationError) Cause() error
Cause function returns cause value.
func (GetScopeReplyValidationError) Error ¶
func (e GetScopeReplyValidationError) Error() string
Error satisfies the builtin error interface
func (GetScopeReplyValidationError) ErrorName ¶
func (e GetScopeReplyValidationError) ErrorName() string
ErrorName returns error name.
func (GetScopeReplyValidationError) Field ¶
func (e GetScopeReplyValidationError) Field() string
Field function returns field value.
func (GetScopeReplyValidationError) Key ¶
func (e GetScopeReplyValidationError) Key() bool
Key function returns key value.
func (GetScopeReplyValidationError) Reason ¶
func (e GetScopeReplyValidationError) Reason() string
Reason function returns reason value.
type GetScopeRequest ¶
type GetScopeRequest struct {
Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"`
// contains filtered or unexported fields
}
func (*GetScopeRequest) Descriptor
deprecated
func (*GetScopeRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetScopeRequest.ProtoReflect.Descriptor instead.
func (*GetScopeRequest) GetDatabase ¶
func (x *GetScopeRequest) GetDatabase() string
func (*GetScopeRequest) GetMethod ¶
func (x *GetScopeRequest) GetMethod() string
func (*GetScopeRequest) GetModel ¶
func (x *GetScopeRequest) GetModel() string
func (*GetScopeRequest) ProtoMessage ¶
func (*GetScopeRequest) ProtoMessage()
func (*GetScopeRequest) ProtoReflect ¶
func (x *GetScopeRequest) ProtoReflect() protoreflect.Message
func (*GetScopeRequest) Reset ¶
func (x *GetScopeRequest) Reset()
func (*GetScopeRequest) String ¶
func (x *GetScopeRequest) String() string
func (*GetScopeRequest) Validate ¶
func (m *GetScopeRequest) Validate() error
Validate checks the field values on GetScopeRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetScopeRequest) ValidateAll ¶
func (m *GetScopeRequest) ValidateAll() error
ValidateAll checks the field values on GetScopeRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetScopeRequestMultiError, or nil if none found.
type GetScopeRequestMultiError ¶
type GetScopeRequestMultiError []error
GetScopeRequestMultiError is an error wrapping multiple validation errors returned by GetScopeRequest.ValidateAll() if the designated constraints aren't met.
func (GetScopeRequestMultiError) AllErrors ¶
func (m GetScopeRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetScopeRequestMultiError) Error ¶
func (m GetScopeRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetScopeRequestValidationError ¶
type GetScopeRequestValidationError struct {
// contains filtered or unexported fields
}
GetScopeRequestValidationError is the validation error returned by GetScopeRequest.Validate if the designated constraints aren't met.
func (GetScopeRequestValidationError) Cause ¶
func (e GetScopeRequestValidationError) Cause() error
Cause function returns cause value.
func (GetScopeRequestValidationError) Error ¶
func (e GetScopeRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetScopeRequestValidationError) ErrorName ¶
func (e GetScopeRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetScopeRequestValidationError) Field ¶
func (e GetScopeRequestValidationError) Field() string
Field function returns field value.
func (GetScopeRequestValidationError) Key ¶
func (e GetScopeRequestValidationError) Key() bool
Key function returns key value.
func (GetScopeRequestValidationError) Reason ¶
func (e GetScopeRequestValidationError) Reason() string
Reason function returns reason value.
type GetUserDeptIdReply ¶
type GetUserDeptIdReply struct {
DeptId uint32 `protobuf:"varint,1,opt,name=deptId,proto3" json:"deptId,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserDeptIdReply) Descriptor
deprecated
func (*GetUserDeptIdReply) Descriptor() ([]byte, []int)
Deprecated: Use GetUserDeptIdReply.ProtoReflect.Descriptor instead.
func (*GetUserDeptIdReply) GetDeptId ¶
func (x *GetUserDeptIdReply) GetDeptId() uint32
func (*GetUserDeptIdReply) ProtoMessage ¶
func (*GetUserDeptIdReply) ProtoMessage()
func (*GetUserDeptIdReply) ProtoReflect ¶
func (x *GetUserDeptIdReply) ProtoReflect() protoreflect.Message
func (*GetUserDeptIdReply) Reset ¶
func (x *GetUserDeptIdReply) Reset()
func (*GetUserDeptIdReply) String ¶
func (x *GetUserDeptIdReply) String() string
func (*GetUserDeptIdReply) Validate ¶
func (m *GetUserDeptIdReply) Validate() error
Validate checks the field values on GetUserDeptIdReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetUserDeptIdReply) ValidateAll ¶
func (m *GetUserDeptIdReply) ValidateAll() error
ValidateAll checks the field values on GetUserDeptIdReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetUserDeptIdReplyMultiError, or nil if none found.
type GetUserDeptIdReplyMultiError ¶
type GetUserDeptIdReplyMultiError []error
GetUserDeptIdReplyMultiError is an error wrapping multiple validation errors returned by GetUserDeptIdReply.ValidateAll() if the designated constraints aren't met.
func (GetUserDeptIdReplyMultiError) AllErrors ¶
func (m GetUserDeptIdReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserDeptIdReplyMultiError) Error ¶
func (m GetUserDeptIdReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserDeptIdReplyValidationError ¶
type GetUserDeptIdReplyValidationError struct {
// contains filtered or unexported fields
}
GetUserDeptIdReplyValidationError is the validation error returned by GetUserDeptIdReply.Validate if the designated constraints aren't met.
func (GetUserDeptIdReplyValidationError) Cause ¶
func (e GetUserDeptIdReplyValidationError) Cause() error
Cause function returns cause value.
func (GetUserDeptIdReplyValidationError) Error ¶
func (e GetUserDeptIdReplyValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserDeptIdReplyValidationError) ErrorName ¶
func (e GetUserDeptIdReplyValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserDeptIdReplyValidationError) Field ¶
func (e GetUserDeptIdReplyValidationError) Field() string
Field function returns field value.
func (GetUserDeptIdReplyValidationError) Key ¶
func (e GetUserDeptIdReplyValidationError) Key() bool
Key function returns key value.
func (GetUserDeptIdReplyValidationError) Reason ¶
func (e GetUserDeptIdReplyValidationError) Reason() string
Reason function returns reason value.
type GetUserDeptIdRequest ¶
type GetUserDeptIdRequest struct {
UserId uint32 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserDeptIdRequest) Descriptor
deprecated
func (*GetUserDeptIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserDeptIdRequest.ProtoReflect.Descriptor instead.
func (*GetUserDeptIdRequest) GetUserId ¶
func (x *GetUserDeptIdRequest) GetUserId() uint32
func (*GetUserDeptIdRequest) ProtoMessage ¶
func (*GetUserDeptIdRequest) ProtoMessage()
func (*GetUserDeptIdRequest) ProtoReflect ¶
func (x *GetUserDeptIdRequest) ProtoReflect() protoreflect.Message
func (*GetUserDeptIdRequest) Reset ¶
func (x *GetUserDeptIdRequest) Reset()
func (*GetUserDeptIdRequest) String ¶
func (x *GetUserDeptIdRequest) String() string
func (*GetUserDeptIdRequest) Validate ¶
func (m *GetUserDeptIdRequest) Validate() error
Validate checks the field values on GetUserDeptIdRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetUserDeptIdRequest) ValidateAll ¶
func (m *GetUserDeptIdRequest) ValidateAll() error
ValidateAll checks the field values on GetUserDeptIdRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetUserDeptIdRequestMultiError, or nil if none found.
type GetUserDeptIdRequestMultiError ¶
type GetUserDeptIdRequestMultiError []error
GetUserDeptIdRequestMultiError is an error wrapping multiple validation errors returned by GetUserDeptIdRequest.ValidateAll() if the designated constraints aren't met.
func (GetUserDeptIdRequestMultiError) AllErrors ¶
func (m GetUserDeptIdRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserDeptIdRequestMultiError) Error ¶
func (m GetUserDeptIdRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserDeptIdRequestValidationError ¶
type GetUserDeptIdRequestValidationError struct {
// contains filtered or unexported fields
}
GetUserDeptIdRequestValidationError is the validation error returned by GetUserDeptIdRequest.Validate if the designated constraints aren't met.
func (GetUserDeptIdRequestValidationError) Cause ¶
func (e GetUserDeptIdRequestValidationError) Cause() error
Cause function returns cause value.
func (GetUserDeptIdRequestValidationError) Error ¶
func (e GetUserDeptIdRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserDeptIdRequestValidationError) ErrorName ¶
func (e GetUserDeptIdRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserDeptIdRequestValidationError) Field ¶
func (e GetUserDeptIdRequestValidationError) Field() string
Field function returns field value.
func (GetUserDeptIdRequestValidationError) Key ¶
func (e GetUserDeptIdRequestValidationError) Key() bool
Key function returns key value.
func (GetUserDeptIdRequestValidationError) Reason ¶
func (e GetUserDeptIdRequestValidationError) Reason() string
Reason function returns reason value.
type ScopeClient ¶
type ScopeClient interface {
GetScope(ctx context.Context, in *GetScopeRequest, opts ...grpc.CallOption) (*GetScopeReply, error)
GetUserDeptId(ctx context.Context, in *GetUserDeptIdRequest, opts ...grpc.CallOption) (*GetUserDeptIdReply, error)
}
ScopeClient is the client API for Scope 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 NewScopeClient ¶
func NewScopeClient(cc grpc.ClientConnInterface) ScopeClient
type ScopeHTTPClient ¶
type ScopeHTTPClient interface {
GetScope(ctx context.Context, req *GetScopeRequest, opts ...http.CallOption) (rsp *GetScopeReply, err error)
GetUserDeptId(ctx context.Context, req *GetUserDeptIdRequest, opts ...http.CallOption) (rsp *GetUserDeptIdReply, err error)
}
func NewScopeHTTPClient ¶
func NewScopeHTTPClient(client *http.Client) ScopeHTTPClient
type ScopeHTTPClientImpl ¶
type ScopeHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*ScopeHTTPClientImpl) GetScope ¶
func (c *ScopeHTTPClientImpl) GetScope(ctx context.Context, in *GetScopeRequest, opts ...http.CallOption) (*GetScopeReply, error)
func (*ScopeHTTPClientImpl) GetUserDeptId ¶
func (c *ScopeHTTPClientImpl) GetUserDeptId(ctx context.Context, in *GetUserDeptIdRequest, opts ...http.CallOption) (*GetUserDeptIdReply, error)
type ScopeHTTPServer ¶
type ScopeHTTPServer interface {
GetScope(context.Context, *GetScopeRequest) (*GetScopeReply, error)
GetUserDeptId(context.Context, *GetUserDeptIdRequest) (*GetUserDeptIdReply, error)
}
type ScopeServer ¶
type ScopeServer interface {
GetScope(context.Context, *GetScopeRequest) (*GetScopeReply, error)
GetUserDeptId(context.Context, *GetUserDeptIdRequest) (*GetUserDeptIdReply, error)
// contains filtered or unexported methods
}
ScopeServer is the server API for Scope service. All implementations must embed UnimplementedScopeServer for forward compatibility
type UnimplementedScopeServer ¶
type UnimplementedScopeServer struct{}
UnimplementedScopeServer must be embedded to have forward compatible implementations.
func (UnimplementedScopeServer) GetScope ¶
func (UnimplementedScopeServer) GetScope(context.Context, *GetScopeRequest) (*GetScopeReply, error)
func (UnimplementedScopeServer) GetUserDeptId ¶
func (UnimplementedScopeServer) GetUserDeptId(context.Context, *GetUserDeptIdRequest) (*GetUserDeptIdReply, error)
type UnsafeScopeServer ¶
type UnsafeScopeServer interface {
// contains filtered or unexported methods
}
UnsafeScopeServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ScopeServer will result in compilation errors.