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: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BFFAdmin_ServiceDesc = grpc_go.ServiceDesc{
	ServiceName: "yrcs.nicehouse.api.bffadmin.v1.BFFAdmin",
	HandlerType: (*BFFAdminServer)(nil),
	Methods: []grpc_go.MethodDesc{
		{
			MethodName: "ListRoles",
			Handler:    _BFFAdmin_ListRoles_Handler,
		},
		{
			MethodName: "GetRole",
			Handler:    _BFFAdmin_GetRole_Handler,
		},
		{
			MethodName: "CreateRole",
			Handler:    _BFFAdmin_CreateRole_Handler,
		},
		{
			MethodName: "UpdateRole",
			Handler:    _BFFAdmin_UpdateRole_Handler,
		},
		{
			MethodName: "DeleteRoles",
			Handler:    _BFFAdmin_DeleteRoles_Handler,
		},
	},
	Streams:  []grpc_go.StreamDesc{},
	Metadata: "v1/admin.proto",
}

BFFAdmin_ServiceDesc is the grpc_go.ServiceDesc for BFFAdmin 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_admin_proto protoreflect.FileDescriptor

Functions

func CreateRoleHandler

func CreateRoleHandler(srv BFFAdminHTTPServer) func(ctx *gin.Context)

@Tags 添加角色 @Summary 添加角色 @Description 通过接收 json body 参数来添加角色 @Accept json @Produce json @Param message body v1.CreateRoleRequest false "角色属性" @Success 200 {object} common.CommonCreate @Router /admin/roles [post]

func DeleteRolesHandler

func DeleteRolesHandler(srv BFFAdminHTTPServer) func(ctx *gin.Context)

@Tags 删除角色 @Summary 删除一个或多个角色 @Description 通过接收数组 ids json body 参数来删除角色 @Accept json @Produce json @Param message body common.CommonDeletesRequest true "角色 ids 数组" @Success 200 @Router /admin/roles [delete]

func GetRoleHandler

func GetRoleHandler(srv BFFAdminHTTPServer) func(ctx *gin.Context)

@Tags 获取一个角色 @Summary 获取一个角色 @Description 通过接收 id 参数来获取一个角色 @Accept json @Produce json @Param id path string true "角色 id" minlength(26) maxlength(26) @Success 200 {object} v1.Role @Router /admin/roles/{id} [get]

func ListRolesHandler

func ListRolesHandler(srv BFFAdminHTTPServer) func(ctx *gin.Context)

@Tags 获取角色管理列表 @Summary 角色列表 @Description 角色管理分页列表 @Accept json @Produce json @Param page query int false "页码" Format(uint32) @Param pageSize query int false "每页条目数" Format(uint32) @Param query[Name] query string false "名称" @Param orderBy[Name] query int false "按名称排序" Enums(0, 1) @Param orderBy[Id] query int false "按 ID 排序" Enums(0, 1) @Success 200 {object} common.PagingResponse @Router /admin/roles [get]

func RegisterBFFAdminHTTPServer

func RegisterBFFAdminHTTPServer(r *gin.Engine, srv BFFAdminHTTPServer)

func RegisterBFFAdminServer

func RegisterBFFAdminServer(s grpc_go.ServiceRegistrar, srv BFFAdminServer)

func UpdateRoleHandler

func UpdateRoleHandler(srv BFFAdminHTTPServer) func(ctx *gin.Context)

@Tags 编辑一个角色 @Summary 编辑一个角色 @Description 通过接收 id 参数和 json body 参数来编辑一个角色 @Accept json @Produce json @Param id path string true "角色 id" minlength(26) maxlength(26) @Param message body v1.UpdateRoleRequest false "角色属性" @Success 200 {object} common.CommonUpdate @Router /admin/roles/{id} [put]

Types

type BFFAdminClient

BFFAdminClient is the client API for BFFAdmin 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 NewBFFAdminClient

func NewBFFAdminClient(cc *triple.TripleConn) BFFAdminClient

type BFFAdminClientImpl

type BFFAdminClientImpl 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 (*BFFAdminClientImpl) GetDubboStub

func (c *BFFAdminClientImpl) GetDubboStub(cc *triple.TripleConn) BFFAdminClient

func (*BFFAdminClientImpl) XXX_InterfaceName

func (c *BFFAdminClientImpl) XXX_InterfaceName() string

type BFFAdminServer

type BFFAdminServer 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
}

BFFAdminServer is the server API for BFFAdmin service. All implementations must embed UnimplementedBFFAdminServer 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 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"`
	IsSystem bool   `protobuf:"varint,2,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) GetId

func (x *Role) GetId() string

func (*Role) GetIsSystem

func (x *Role) GetIsSystem() bool

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 UnimplementedBFFAdminServer

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

UnimplementedBFFAdminServer must be embedded to have forward compatible implementations.

func (UnimplementedBFFAdminServer) CreateRole

func (UnimplementedBFFAdminServer) DeleteRoles

func (UnimplementedBFFAdminServer) GetRole

func (UnimplementedBFFAdminServer) ListRoles

func (UnimplementedBFFAdminServer) UpdateRole

func (*UnimplementedBFFAdminServer) XXX_GetProxyImpl

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

func (*UnimplementedBFFAdminServer) XXX_InterfaceName

func (s *UnimplementedBFFAdminServer) XXX_InterfaceName() string

func (*UnimplementedBFFAdminServer) XXX_ServiceDesc

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

func (*UnimplementedBFFAdminServer) XXX_SetProxyImpl

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

type UnsafeBFFAdminServer

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

UnsafeBFFAdminServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BFFAdminServer 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