v1

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Resource_GetResourceScopes_FullMethodName    = "/manager_resource.Resource/GetResourceScopes"
	Resource_UpdateResourceScopes_FullMethodName = "/manager_resource.Resource/UpdateResourceScopes"
)
View Source
const OperationResourceGetResourceScopes = "/manager_resource.Resource/GetResourceScopes"
View Source
const OperationResourceUpdateResourceScopes = "/manager_resource.Resource/UpdateResourceScopes"

Variables

View Source
var File_api_manager_resource_manager_resource_proto protoreflect.FileDescriptor
View Source
var File_api_manager_resource_manager_resource_service_proto protoreflect.FileDescriptor
View Source
var Resource_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "manager_resource.Resource",
	HandlerType: (*ResourceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetResourceScopes",
			Handler:    _Resource_GetResourceScopes_Handler,
		},
		{
			MethodName: "UpdateResourceScopes",
			Handler:    _Resource_UpdateResourceScopes_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/manager/resource/manager_resource_service.proto",
}

Resource_ServiceDesc is the grpc.ServiceDesc for Resource service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterResourceHTTPServer

func RegisterResourceHTTPServer(s *http.Server, srv ResourceHTTPServer)

func RegisterResourceServer

func RegisterResourceServer(s grpc.ServiceRegistrar, srv ResourceServer)

Types

type GetResourceScopesReply

type GetResourceScopesReply struct {
	All    bool     `protobuf:"varint,1,opt,name=all,proto3" json:"all,omitempty"`
	Scopes []uint32 `protobuf:"varint,2,rep,packed,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResourceScopesReply) Descriptor deprecated

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

Deprecated: Use GetResourceScopesReply.ProtoReflect.Descriptor instead.

func (*GetResourceScopesReply) GetAll

func (x *GetResourceScopesReply) GetAll() bool

func (*GetResourceScopesReply) GetScopes

func (x *GetResourceScopesReply) GetScopes() []uint32

func (*GetResourceScopesReply) ProtoMessage

func (*GetResourceScopesReply) ProtoMessage()

func (*GetResourceScopesReply) ProtoReflect

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

func (*GetResourceScopesReply) Reset

func (x *GetResourceScopesReply) Reset()

func (*GetResourceScopesReply) String

func (x *GetResourceScopesReply) String() string

func (*GetResourceScopesReply) Validate

func (m *GetResourceScopesReply) Validate() error

Validate checks the field values on GetResourceScopesReply 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 (*GetResourceScopesReply) ValidateAll

func (m *GetResourceScopesReply) ValidateAll() error

ValidateAll checks the field values on GetResourceScopesReply 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 GetResourceScopesReplyMultiError, or nil if none found.

type GetResourceScopesReplyMultiError

type GetResourceScopesReplyMultiError []error

GetResourceScopesReplyMultiError is an error wrapping multiple validation errors returned by GetResourceScopesReply.ValidateAll() if the designated constraints aren't met.

func (GetResourceScopesReplyMultiError) AllErrors

func (m GetResourceScopesReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetResourceScopesReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetResourceScopesReplyValidationError

type GetResourceScopesReplyValidationError struct {
	// contains filtered or unexported fields
}

GetResourceScopesReplyValidationError is the validation error returned by GetResourceScopesReply.Validate if the designated constraints aren't met.

func (GetResourceScopesReplyValidationError) Cause

Cause function returns cause value.

func (GetResourceScopesReplyValidationError) Error

Error satisfies the builtin error interface

func (GetResourceScopesReplyValidationError) ErrorName

ErrorName returns error name.

func (GetResourceScopesReplyValidationError) Field

Field function returns field value.

func (GetResourceScopesReplyValidationError) Key

Key function returns key value.

func (GetResourceScopesReplyValidationError) Reason

Reason function returns reason value.

type GetResourceScopesRequest

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

func (*GetResourceScopesRequest) Descriptor deprecated

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

Deprecated: Use GetResourceScopesRequest.ProtoReflect.Descriptor instead.

func (*GetResourceScopesRequest) GetKeyword

func (x *GetResourceScopesRequest) GetKeyword() string

func (*GetResourceScopesRequest) ProtoMessage

func (*GetResourceScopesRequest) ProtoMessage()

func (*GetResourceScopesRequest) ProtoReflect

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

func (*GetResourceScopesRequest) Reset

func (x *GetResourceScopesRequest) Reset()

func (*GetResourceScopesRequest) String

func (x *GetResourceScopesRequest) String() string

func (*GetResourceScopesRequest) Validate

func (m *GetResourceScopesRequest) Validate() error

Validate checks the field values on GetResourceScopesRequest 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 (*GetResourceScopesRequest) ValidateAll

func (m *GetResourceScopesRequest) ValidateAll() error

ValidateAll checks the field values on GetResourceScopesRequest 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 GetResourceScopesRequestMultiError, or nil if none found.

type GetResourceScopesRequestMultiError

type GetResourceScopesRequestMultiError []error

GetResourceScopesRequestMultiError is an error wrapping multiple validation errors returned by GetResourceScopesRequest.ValidateAll() if the designated constraints aren't met.

func (GetResourceScopesRequestMultiError) AllErrors

func (m GetResourceScopesRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetResourceScopesRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetResourceScopesRequestValidationError

type GetResourceScopesRequestValidationError struct {
	// contains filtered or unexported fields
}

GetResourceScopesRequestValidationError is the validation error returned by GetResourceScopesRequest.Validate if the designated constraints aren't met.

func (GetResourceScopesRequestValidationError) Cause

Cause function returns cause value.

func (GetResourceScopesRequestValidationError) Error

Error satisfies the builtin error interface

func (GetResourceScopesRequestValidationError) ErrorName

ErrorName returns error name.

func (GetResourceScopesRequestValidationError) Field

Field function returns field value.

func (GetResourceScopesRequestValidationError) Key

Key function returns key value.

func (GetResourceScopesRequestValidationError) Reason

Reason function returns reason value.

type ResourceClient

type ResourceClient interface {
	// GetResourceScopes 获取资源权限
	GetResourceScopes(ctx context.Context, in *GetResourceScopesRequest, opts ...grpc.CallOption) (*GetResourceScopesReply, error)
	// UpdateResourceScopes 更新资源权限
	UpdateResourceScopes(ctx context.Context, in *UpdateResourceScopesRequest, opts ...grpc.CallOption) (*UpdateResourceScopesReply, error)
}

ResourceClient is the client API for Resource 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 NewResourceClient

func NewResourceClient(cc grpc.ClientConnInterface) ResourceClient

type ResourceHTTPClient

type ResourceHTTPClient interface {
	GetResourceScopes(ctx context.Context, req *GetResourceScopesRequest, opts ...http.CallOption) (rsp *GetResourceScopesReply, err error)
	UpdateResourceScopes(ctx context.Context, req *UpdateResourceScopesRequest, opts ...http.CallOption) (rsp *UpdateResourceScopesReply, err error)
}

func NewResourceHTTPClient

func NewResourceHTTPClient(client *http.Client) ResourceHTTPClient

type ResourceHTTPClientImpl

type ResourceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*ResourceHTTPClientImpl) GetResourceScopes

func (*ResourceHTTPClientImpl) UpdateResourceScopes

type ResourceHTTPServer

type ResourceHTTPServer interface {
	// GetResourceScopes GetResourceScopes 获取资源权限
	GetResourceScopes(context.Context, *GetResourceScopesRequest) (*GetResourceScopesReply, error)
	// UpdateResourceScopes UpdateResourceScopes 更新资源权限
	UpdateResourceScopes(context.Context, *UpdateResourceScopesRequest) (*UpdateResourceScopesReply, error)
}

type ResourceServer

type ResourceServer interface {
	// GetResourceScopes 获取资源权限
	GetResourceScopes(context.Context, *GetResourceScopesRequest) (*GetResourceScopesReply, error)
	// UpdateResourceScopes 更新资源权限
	UpdateResourceScopes(context.Context, *UpdateResourceScopesRequest) (*UpdateResourceScopesReply, error)
	// contains filtered or unexported methods
}

ResourceServer is the server API for Resource service. All implementations must embed UnimplementedResourceServer for forward compatibility

type UnimplementedResourceServer

type UnimplementedResourceServer struct {
}

UnimplementedResourceServer must be embedded to have forward compatible implementations.

func (UnimplementedResourceServer) GetResourceScopes

type UnsafeResourceServer

type UnsafeResourceServer interface {
	// contains filtered or unexported methods
}

UnsafeResourceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ResourceServer will result in compilation errors.

type UpdateResourceScopesReply

type UpdateResourceScopesReply struct {
	// contains filtered or unexported fields
}

func (*UpdateResourceScopesReply) Descriptor deprecated

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

Deprecated: Use UpdateResourceScopesReply.ProtoReflect.Descriptor instead.

func (*UpdateResourceScopesReply) ProtoMessage

func (*UpdateResourceScopesReply) ProtoMessage()

func (*UpdateResourceScopesReply) ProtoReflect

func (*UpdateResourceScopesReply) Reset

func (x *UpdateResourceScopesReply) Reset()

func (*UpdateResourceScopesReply) String

func (x *UpdateResourceScopesReply) String() string

func (*UpdateResourceScopesReply) Validate

func (m *UpdateResourceScopesReply) Validate() error

Validate checks the field values on UpdateResourceScopesReply 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 (*UpdateResourceScopesReply) ValidateAll

func (m *UpdateResourceScopesReply) ValidateAll() error

ValidateAll checks the field values on UpdateResourceScopesReply 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 UpdateResourceScopesReplyMultiError, or nil if none found.

type UpdateResourceScopesReplyMultiError

type UpdateResourceScopesReplyMultiError []error

UpdateResourceScopesReplyMultiError is an error wrapping multiple validation errors returned by UpdateResourceScopesReply.ValidateAll() if the designated constraints aren't met.

func (UpdateResourceScopesReplyMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (UpdateResourceScopesReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UpdateResourceScopesReplyValidationError

type UpdateResourceScopesReplyValidationError struct {
	// contains filtered or unexported fields
}

UpdateResourceScopesReplyValidationError is the validation error returned by UpdateResourceScopesReply.Validate if the designated constraints aren't met.

func (UpdateResourceScopesReplyValidationError) Cause

Cause function returns cause value.

func (UpdateResourceScopesReplyValidationError) Error

Error satisfies the builtin error interface

func (UpdateResourceScopesReplyValidationError) ErrorName

ErrorName returns error name.

func (UpdateResourceScopesReplyValidationError) Field

Field function returns field value.

func (UpdateResourceScopesReplyValidationError) Key

Key function returns key value.

func (UpdateResourceScopesReplyValidationError) Reason

Reason function returns reason value.

type UpdateResourceScopesRequest

type UpdateResourceScopesRequest struct {
	Keyword    string   `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"`
	ResourceId uint32   `protobuf:"varint,2,opt,name=resourceId,proto3" json:"resourceId,omitempty"`
	Scopes     []uint32 `protobuf:"varint,3,rep,packed,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateResourceScopesRequest) Descriptor deprecated

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

Deprecated: Use UpdateResourceScopesRequest.ProtoReflect.Descriptor instead.

func (*UpdateResourceScopesRequest) GetKeyword

func (x *UpdateResourceScopesRequest) GetKeyword() string

func (*UpdateResourceScopesRequest) GetResourceId

func (x *UpdateResourceScopesRequest) GetResourceId() uint32

func (*UpdateResourceScopesRequest) GetScopes

func (x *UpdateResourceScopesRequest) GetScopes() []uint32

func (*UpdateResourceScopesRequest) ProtoMessage

func (*UpdateResourceScopesRequest) ProtoMessage()

func (*UpdateResourceScopesRequest) ProtoReflect

func (*UpdateResourceScopesRequest) Reset

func (x *UpdateResourceScopesRequest) Reset()

func (*UpdateResourceScopesRequest) String

func (x *UpdateResourceScopesRequest) String() string

func (*UpdateResourceScopesRequest) Validate

func (m *UpdateResourceScopesRequest) Validate() error

Validate checks the field values on UpdateResourceScopesRequest 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 (*UpdateResourceScopesRequest) ValidateAll

func (m *UpdateResourceScopesRequest) ValidateAll() error

ValidateAll checks the field values on UpdateResourceScopesRequest 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 UpdateResourceScopesRequestMultiError, or nil if none found.

type UpdateResourceScopesRequestMultiError

type UpdateResourceScopesRequestMultiError []error

UpdateResourceScopesRequestMultiError is an error wrapping multiple validation errors returned by UpdateResourceScopesRequest.ValidateAll() if the designated constraints aren't met.

func (UpdateResourceScopesRequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (UpdateResourceScopesRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UpdateResourceScopesRequestValidationError

type UpdateResourceScopesRequestValidationError struct {
	// contains filtered or unexported fields
}

UpdateResourceScopesRequestValidationError is the validation error returned by UpdateResourceScopesRequest.Validate if the designated constraints aren't met.

func (UpdateResourceScopesRequestValidationError) Cause

Cause function returns cause value.

func (UpdateResourceScopesRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateResourceScopesRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateResourceScopesRequestValidationError) Field

Field function returns field value.

func (UpdateResourceScopesRequestValidationError) Key

Key function returns key value.

func (UpdateResourceScopesRequestValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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