v1

package
v0.0.0-...-9139306 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0: "ACL_ROLE_INVALID_ARGUMENT",
		1: "ACL_ROLE_NOT_FOUND",
		2: "ACL_ROLE_UNPROCESSABLE_ENTITY",
	}
	ErrorReason_value = map[string]int32{
		"ACL_ROLE_INVALID_ARGUMENT":     0,
		"ACL_ROLE_NOT_FOUND":            1,
		"ACL_ROLE_UNPROCESSABLE_ENTITY": 2,
	}
)

Enum value maps for ErrorReason.

View Source
var ACL_ServiceDesc = grpc_go.ServiceDesc{
	ServiceName: "yrcs.nicehouse.api.acl.v1.ACL",
	HandlerType: (*ACLServer)(nil),
	Methods: []grpc_go.MethodDesc{
		{
			MethodName: "ListRoles",
			Handler:    _ACL_ListRoles_Handler,
		},
		{
			MethodName: "GetRole",
			Handler:    _ACL_GetRole_Handler,
		},
		{
			MethodName: "CreateRole",
			Handler:    _ACL_CreateRole_Handler,
		},
		{
			MethodName: "UpdateRole",
			Handler:    _ACL_UpdateRole_Handler,
		},
		{
			MethodName: "DeleteRoles",
			Handler:    _ACL_DeleteRoles_Handler,
		},
	},
	Streams:  []grpc_go.StreamDesc{},
	Metadata: "v1/acl.proto",
}

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

View Source
var File_v1_acl_proto protoreflect.FileDescriptor
View Source
var File_v1_error_reason_proto protoreflect.FileDescriptor

Functions

func RegisterACLServer

func RegisterACLServer(s grpc_go.ServiceRegistrar, srv ACLServer)

Types

type ACLClient

ACLClient is the client API for ACL 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 NewACLClient

func NewACLClient(cc *triple.TripleConn) ACLClient

type ACLClientImpl

type ACLClientImpl struct {
	ListRoles   func(ctx context.Context, in *common.PagingRequest) (*common.PagingResponse, error)
	GetRole     func(ctx context.Context, in *GetRoleRequest) (*Role, error)
	CreateRole  func(ctx context.Context, in *CreateRoleRequest) (*common.CommonCreate, error)
	UpdateRole  func(ctx context.Context, in *UpdateRoleRequest) (*common.CommonUpdate, error)
	DeleteRoles func(ctx context.Context, in *common.CommonDeletesRequest) (*emptypb.Empty, error)
}

func (*ACLClientImpl) GetDubboStub

func (c *ACLClientImpl) GetDubboStub(cc *triple.TripleConn) ACLClient

func (*ACLClientImpl) XXX_InterfaceName

func (c *ACLClientImpl) XXX_InterfaceName() string

type ACLServer

type ACLServer interface {
	ListRoles(context.Context, *common.PagingRequest) (*common.PagingResponse, error)
	GetRole(context.Context, *GetRoleRequest) (*Role, error)
	CreateRole(context.Context, *CreateRoleRequest) (*common.CommonCreate, error)
	UpdateRole(context.Context, *UpdateRoleRequest) (*common.CommonUpdate, error)
	DeleteRoles(context.Context, *common.CommonDeletesRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

ACLServer is the server API for ACL service. All implementations must embed UnimplementedACLServer for forward compatibility

type CreateRoleRequest

type CreateRoleRequest struct {
	Name        string  `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRoleRequest) Descriptor deprecated

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

Deprecated: Use CreateRoleRequest.ProtoReflect.Descriptor instead.

func (*CreateRoleRequest) GetDescription

func (x *CreateRoleRequest) GetDescription() string

func (*CreateRoleRequest) GetName

func (x *CreateRoleRequest) GetName() string

func (*CreateRoleRequest) ProtoMessage

func (*CreateRoleRequest) ProtoMessage()

func (*CreateRoleRequest) ProtoReflect

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

func (*CreateRoleRequest) Reset

func (x *CreateRoleRequest) Reset()

func (*CreateRoleRequest) String

func (x *CreateRoleRequest) String() string

func (*CreateRoleRequest) Validate

func (m *CreateRoleRequest) Validate() error

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

func (m *CreateRoleRequest) ValidateAll() error

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

type CreateRoleRequestMultiError

type CreateRoleRequestMultiError []error

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

func (CreateRoleRequestMultiError) AllErrors

func (m CreateRoleRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateRoleRequestMultiError) Error

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

type CreateRoleRequestValidationError

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

CreateRoleRequestValidationError is the validation error returned by CreateRoleRequest.Validate if the designated constraints aren't met.

func (CreateRoleRequestValidationError) Cause

Cause function returns cause value.

func (CreateRoleRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateRoleRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateRoleRequestValidationError) Field

Field function returns field value.

func (CreateRoleRequestValidationError) Key

Key function returns key value.

func (CreateRoleRequestValidationError) Reason

Reason function returns reason value.

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_ACL_ROLE_INVALID_ARGUMENT     ErrorReason = 0
	ErrorReason_ACL_ROLE_NOT_FOUND            ErrorReason = 1
	ErrorReason_ACL_ROLE_UNPROCESSABLE_ENTITY ErrorReason = 2
)

func (ErrorReason) Descriptor

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

type GetRoleRequest

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

func (*GetRoleRequest) Descriptor deprecated

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

Deprecated: Use GetRoleRequest.ProtoReflect.Descriptor instead.

func (*GetRoleRequest) GetId

func (x *GetRoleRequest) GetId() string

func (*GetRoleRequest) ProtoMessage

func (*GetRoleRequest) ProtoMessage()

func (*GetRoleRequest) ProtoReflect

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

func (*GetRoleRequest) Reset

func (x *GetRoleRequest) Reset()

func (*GetRoleRequest) String

func (x *GetRoleRequest) String() string

func (*GetRoleRequest) Validate

func (m *GetRoleRequest) Validate() error

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

func (m *GetRoleRequest) ValidateAll() error

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

type GetRoleRequestMultiError

type GetRoleRequestMultiError []error

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

func (GetRoleRequestMultiError) AllErrors

func (m GetRoleRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetRoleRequestMultiError) Error

func (m GetRoleRequestMultiError) Error() string

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

type GetRoleRequestValidationError

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

GetRoleRequestValidationError is the validation error returned by GetRoleRequest.Validate if the designated constraints aren't met.

func (GetRoleRequestValidationError) Cause

Cause function returns cause value.

func (GetRoleRequestValidationError) Error

Error satisfies the builtin error interface

func (GetRoleRequestValidationError) ErrorName

func (e GetRoleRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetRoleRequestValidationError) Field

Field function returns field value.

func (GetRoleRequestValidationError) Key

Key function returns key value.

func (GetRoleRequestValidationError) Reason

Reason function returns reason value.

type Role

type Role struct {
	Id          string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedAt   *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	UpdatedAt   *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	Name        string                 `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	Description string                 `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	IsSystem    bool                   `protobuf:"varint,6,opt,name=isSystem,proto3" json:"isSystem,omitempty"`
	// contains filtered or unexported fields
}

func (*Role) Descriptor deprecated

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

Deprecated: Use Role.ProtoReflect.Descriptor instead.

func (*Role) GetCreatedAt

func (x *Role) GetCreatedAt() *timestamppb.Timestamp

func (*Role) GetDescription

func (x *Role) GetDescription() string

func (*Role) GetId

func (x *Role) GetId() string

func (*Role) GetIsSystem

func (x *Role) GetIsSystem() bool

func (*Role) GetName

func (x *Role) GetName() string

func (*Role) GetUpdatedAt

func (x *Role) GetUpdatedAt() *timestamppb.Timestamp

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) ProtoReflect

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

func (*Role) Reset

func (x *Role) Reset()

func (*Role) String

func (x *Role) String() string

func (*Role) Validate

func (m *Role) Validate() error

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

func (m *Role) ValidateAll() error

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

type RoleMultiError

type RoleMultiError []error

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

func (RoleMultiError) AllErrors

func (m RoleMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RoleMultiError) Error

func (m RoleMultiError) Error() string

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

type RoleValidationError

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

RoleValidationError is the validation error returned by Role.Validate if the designated constraints aren't met.

func (RoleValidationError) Cause

func (e RoleValidationError) Cause() error

Cause function returns cause value.

func (RoleValidationError) Error

func (e RoleValidationError) Error() string

Error satisfies the builtin error interface

func (RoleValidationError) ErrorName

func (e RoleValidationError) ErrorName() string

ErrorName returns error name.

func (RoleValidationError) Field

func (e RoleValidationError) Field() string

Field function returns field value.

func (RoleValidationError) Key

func (e RoleValidationError) Key() bool

Key function returns key value.

func (RoleValidationError) Reason

func (e RoleValidationError) Reason() string

Reason function returns reason value.

type UnimplementedACLServer

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

UnimplementedACLServer must be embedded to have forward compatible implementations.

func (UnimplementedACLServer) CreateRole

func (UnimplementedACLServer) DeleteRoles

func (UnimplementedACLServer) GetRole

func (UnimplementedACLServer) ListRoles

func (UnimplementedACLServer) UpdateRole

func (*UnimplementedACLServer) XXX_GetProxyImpl

func (s *UnimplementedACLServer) XXX_GetProxyImpl() protocol.Invoker

func (*UnimplementedACLServer) XXX_InterfaceName

func (s *UnimplementedACLServer) XXX_InterfaceName() string

func (*UnimplementedACLServer) XXX_ServiceDesc

func (s *UnimplementedACLServer) XXX_ServiceDesc() *grpc_go.ServiceDesc

func (*UnimplementedACLServer) XXX_SetProxyImpl

func (s *UnimplementedACLServer) XXX_SetProxyImpl(impl protocol.Invoker)

type UnsafeACLServer

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

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

type UpdateRoleRequest

type UpdateRoleRequest struct {
	Id          string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
	Description *string `protobuf:"bytes,3,opt,name=description,proto3,oneof" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRoleRequest) Descriptor deprecated

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

Deprecated: Use UpdateRoleRequest.ProtoReflect.Descriptor instead.

func (*UpdateRoleRequest) GetDescription

func (x *UpdateRoleRequest) GetDescription() string

func (*UpdateRoleRequest) GetId

func (x *UpdateRoleRequest) GetId() string

func (*UpdateRoleRequest) GetName

func (x *UpdateRoleRequest) GetName() string

func (*UpdateRoleRequest) ProtoMessage

func (*UpdateRoleRequest) ProtoMessage()

func (*UpdateRoleRequest) ProtoReflect

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

func (*UpdateRoleRequest) Reset

func (x *UpdateRoleRequest) Reset()

func (*UpdateRoleRequest) String

func (x *UpdateRoleRequest) String() string

func (*UpdateRoleRequest) Validate

func (m *UpdateRoleRequest) Validate() error

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

func (m *UpdateRoleRequest) ValidateAll() error

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

type UpdateRoleRequestMultiError

type UpdateRoleRequestMultiError []error

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

func (UpdateRoleRequestMultiError) AllErrors

func (m UpdateRoleRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateRoleRequestMultiError) Error

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

type UpdateRoleRequestValidationError

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

UpdateRoleRequestValidationError is the validation error returned by UpdateRoleRequest.Validate if the designated constraints aren't met.

func (UpdateRoleRequestValidationError) Cause

Cause function returns cause value.

func (UpdateRoleRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateRoleRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateRoleRequestValidationError) Field

Field function returns field value.

func (UpdateRoleRequestValidationError) Key

Key function returns key value.

func (UpdateRoleRequestValidationError) Reason

Reason function returns reason value.

Directories

Path Synopsis
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag

Jump to

Keyboard shortcuts

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