scope

package
v0.0.0-...-d36d6b6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 27 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Scope_GetScope_FullMethodName      = "/manager.api.scope.Scope/GetScope"
	Scope_GetUserDeptId_FullMethodName = "/manager.api.scope.Scope/GetUserDeptId"
)
View Source
const (
	OperationScopeGetScope      = "/manager.api.scope.Scope/GetScope"
	OperationScopeGetUserDeptId = "/manager.api.scope.Scope/GetUserDeptId"
)

Variables

View Source
var File_api_scope_proto_scope_proto protoreflect.FileDescriptor
View Source
var File_api_scope_proto_scope_service_proto protoreflect.FileDescriptor
View Source
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 Hook

func Hook(c context.Context, db, model, method string) (hook.ScopeResponse, error)

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

Cause function returns cause value.

func (GetScopeReplyValidationError) Error

Error satisfies the builtin error interface

func (GetScopeReplyValidationError) ErrorName

func (e GetScopeReplyValidationError) ErrorName() string

ErrorName returns error name.

func (GetScopeReplyValidationError) Field

Field function returns field value.

func (GetScopeReplyValidationError) Key

Key function returns key value.

func (GetScopeReplyValidationError) Reason

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

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

Cause function returns cause value.

func (GetScopeRequestValidationError) Error

Error satisfies the builtin error interface

func (GetScopeRequestValidationError) ErrorName

func (e GetScopeRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetScopeRequestValidationError) Field

Field function returns field value.

func (GetScopeRequestValidationError) Key

Key function returns key value.

func (GetScopeRequestValidationError) Reason

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

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

Cause function returns cause value.

func (GetUserDeptIdReplyValidationError) Error

Error satisfies the builtin error interface

func (GetUserDeptIdReplyValidationError) ErrorName

ErrorName returns error name.

func (GetUserDeptIdReplyValidationError) Field

Field function returns field value.

func (GetUserDeptIdReplyValidationError) Key

Key function returns key value.

func (GetUserDeptIdReplyValidationError) Reason

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

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

Cause function returns cause value.

func (GetUserDeptIdRequestValidationError) Error

Error satisfies the builtin error interface

func (GetUserDeptIdRequestValidationError) ErrorName

ErrorName returns error name.

func (GetUserDeptIdRequestValidationError) Field

Field function returns field value.

func (GetUserDeptIdRequestValidationError) Key

Key function returns key value.

func (GetUserDeptIdRequestValidationError) Reason

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 (*ScopeHTTPClientImpl) GetUserDeptId

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) GetUserDeptId

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.

Jump to

Keyboard shortcuts

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