department

package
Version: v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDepartmentName 默认部门名称
	DefaultDepartmentName = "default"
)

Variables

View Source
var (
	ApplicationFormStatus_name = map[int32]string{
		0: "NULL",
		1: "PENDDING",
		2: "PASSED",
		3: "DENY",
	}
	ApplicationFormStatus_value = map[string]int32{
		"NULL":     0,
		"PENDDING": 1,
		"PASSED":   2,
		"DENY":     3,
	}
)

Enum value maps for ApplicationFormStatus.

View Source
var DepartmentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "keyauth.department.DepartmentService",
	HandlerType: (*DepartmentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "QueryDepartment",
			Handler:    _DepartmentService_QueryDepartment_Handler,
		},
		{
			MethodName: "DescribeDepartment",
			Handler:    _DepartmentService_DescribeDepartment_Handler,
		},
		{
			MethodName: "CreateDepartment",
			Handler:    _DepartmentService_CreateDepartment_Handler,
		},
		{
			MethodName: "UpdateDepartment",
			Handler:    _DepartmentService_UpdateDepartment_Handler,
		},
		{
			MethodName: "DeleteDepartment",
			Handler:    _DepartmentService_DeleteDepartment_Handler,
		},
		{
			MethodName: "QueryApplicationForm",
			Handler:    _DepartmentService_QueryApplicationForm_Handler,
		},
		{
			MethodName: "DescribeApplicationForm",
			Handler:    _DepartmentService_DescribeApplicationForm_Handler,
		},
		{
			MethodName: "JoinDepartment",
			Handler:    _DepartmentService_JoinDepartment_Handler,
		},
		{
			MethodName: "DealApplicationForm",
			Handler:    _DepartmentService_DealApplicationForm_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/department/pb/service.proto",
}

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

View Source
var File_pkg_department_pb_department_proto protoreflect.FileDescriptor
View Source
var File_pkg_department_pb_enum_proto protoreflect.FileDescriptor
View Source
var File_pkg_department_pb_request_proto protoreflect.FileDescriptor
View Source
var File_pkg_department_pb_service_proto protoreflect.FileDescriptor

Functions

func HttpEntry added in v0.2.0

func HttpEntry() *http.EntrySet

HttpEntry todo

func RegisterDepartmentServiceServer added in v0.2.0

func RegisterDepartmentServiceServer(s grpc.ServiceRegistrar, srv DepartmentServiceServer)

Types

type ApplicationForm added in v0.2.0

type ApplicationForm struct {

	// 申请单ID
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"`
	// 域
	Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain" bson:"domain"`
	// 申请人
	Creater string `protobuf:"bytes,3,opt,name=creater,proto3" json:"creater" bson:"creater"`
	// 创建时间
	CreateAt int64 `protobuf:"varint,4,opt,name=create_at,json=createAt,proto3" json:"create_at" bson:"create_at"`
	// 更新时间
	UpdateAt int64 `protobuf:"varint,5,opt,name=update_at,json=updateAt,proto3" json:"update_at" bson:"update_at"`
	// 申请人
	Account string `protobuf:"bytes,6,opt,name=account,proto3" json:"account" bson:"account"`
	// 申请加入的部门
	DepartmentId string `protobuf:"bytes,7,opt,name=department_id,json=departmentId,proto3" json:"department_id" bson:"department_id"`
	// 留言
	Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message" bson:"message"`
	// 状态
	Status ApplicationFormStatus `protobuf:"varint,9,opt,name=status,proto3,enum=keyauth.department.ApplicationFormStatus" json:"status" bson:"status"`
	// contains filtered or unexported fields
}

ApplicationForm todo

func NewApplicationForm added in v0.2.0

func NewApplicationForm(req *JoinDepartmentRequest) (*ApplicationForm, error)

NewApplicationForm todo

func NewDeafultApplicationForm added in v0.2.0

func NewDeafultApplicationForm() *ApplicationForm

NewDeafultApplicationForm todo

func (*ApplicationForm) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*ApplicationForm) Descriptor() ([]byte, []int)

Deprecated: Use ApplicationForm.ProtoReflect.Descriptor instead.

func (*ApplicationForm) GetAccount added in v0.2.0

func (x *ApplicationForm) GetAccount() string

func (*ApplicationForm) GetCreateAt added in v0.2.0

func (x *ApplicationForm) GetCreateAt() int64

func (*ApplicationForm) GetCreater added in v0.2.0

func (x *ApplicationForm) GetCreater() string

func (*ApplicationForm) GetDepartmentId added in v0.2.0

func (x *ApplicationForm) GetDepartmentId() string

func (*ApplicationForm) GetDomain added in v0.2.0

func (x *ApplicationForm) GetDomain() string

func (*ApplicationForm) GetId added in v0.2.0

func (x *ApplicationForm) GetId() string

func (*ApplicationForm) GetMessage added in v0.2.0

func (x *ApplicationForm) GetMessage() string

func (*ApplicationForm) GetStatus added in v0.2.0

func (x *ApplicationForm) GetStatus() ApplicationFormStatus

func (*ApplicationForm) GetUpdateAt added in v0.2.0

func (x *ApplicationForm) GetUpdateAt() int64

func (*ApplicationForm) ProtoMessage added in v0.2.0

func (*ApplicationForm) ProtoMessage()

func (*ApplicationForm) ProtoReflect added in v0.2.0

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

func (*ApplicationForm) Reset added in v0.2.0

func (x *ApplicationForm) Reset()

func (*ApplicationForm) String added in v0.2.0

func (x *ApplicationForm) String() string

type ApplicationFormSet added in v0.2.0

type ApplicationFormSet struct {
	Total int64              `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"`
	Items []*ApplicationForm `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"`
	// contains filtered or unexported fields
}

func NewDApplicationFormSet added in v0.2.0

func NewDApplicationFormSet() *ApplicationFormSet

NewDApplicationFormSet 实例化

func (*ApplicationFormSet) Add added in v0.2.0

Add 添加

func (*ApplicationFormSet) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*ApplicationFormSet) Descriptor() ([]byte, []int)

Deprecated: Use ApplicationFormSet.ProtoReflect.Descriptor instead.

func (*ApplicationFormSet) GetItems added in v0.2.0

func (x *ApplicationFormSet) GetItems() []*ApplicationForm

func (*ApplicationFormSet) GetTotal added in v0.2.0

func (x *ApplicationFormSet) GetTotal() int64

func (*ApplicationFormSet) Length added in v0.2.0

func (s *ApplicationFormSet) Length() int

Length 个数

func (*ApplicationFormSet) ProtoMessage added in v0.2.0

func (*ApplicationFormSet) ProtoMessage()

func (*ApplicationFormSet) ProtoReflect added in v0.2.0

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

func (*ApplicationFormSet) Reset added in v0.2.0

func (x *ApplicationFormSet) Reset()

func (*ApplicationFormSet) String added in v0.2.0

func (x *ApplicationFormSet) String() string

type ApplicationFormStatus added in v0.2.0

type ApplicationFormStatus int32
const (
	ApplicationFormStatus_NULL ApplicationFormStatus = 0
	// Pending todo
	ApplicationFormStatus_PENDDING ApplicationFormStatus = 1
	// Passed todo
	ApplicationFormStatus_PASSED ApplicationFormStatus = 2
	// Deny todo
	ApplicationFormStatus_DENY ApplicationFormStatus = 3
)

func ParseApplicationFormStatusFromString added in v0.2.0

func ParseApplicationFormStatusFromString(str string) (ApplicationFormStatus, error)

ParseApplicationFormStatusFromString Parse ApplicationFormStatus from string

func (ApplicationFormStatus) Descriptor added in v0.2.0

func (ApplicationFormStatus) Enum added in v0.2.0

func (ApplicationFormStatus) EnumDescriptor deprecated added in v0.2.0

This method has been deprecated.
func (ApplicationFormStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ApplicationFormStatus.Descriptor instead.

func (ApplicationFormStatus) Equal added in v0.2.0

Equal type compare

func (ApplicationFormStatus) IsIn added in v0.2.0

IsIn todo

func (ApplicationFormStatus) MarshalJSON added in v0.2.0

func (t ApplicationFormStatus) MarshalJSON() ([]byte, error)

MarshalJSON todo

func (ApplicationFormStatus) Number added in v0.2.0

func (ApplicationFormStatus) String added in v0.2.0

func (x ApplicationFormStatus) String() string

func (ApplicationFormStatus) Type added in v0.2.0

func (*ApplicationFormStatus) UnmarshalJSON added in v0.2.0

func (t *ApplicationFormStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON todo

type CreateDepartmentRequest

type CreateDepartmentRequest struct {

	// 部门名称
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" validate:"required,lte=60"`
	// 显示名称
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name"`
	// 上级部门ID
	ParentId string `protobuf:"bytes,3,opt,name=parent_id,json=parentId,proto3" json:"parent_id" validate:"lte=200"`
	// 部门管理者account
	Manager string `protobuf:"bytes,4,opt,name=manager,proto3" json:"manager" validate:"required,lte=200"`
	// 部门成员默认角色
	DefaultRoleId string `protobuf:"bytes,5,opt,name=default_role_id,json=defaultRoleId,proto3" json:"default_role_id" validate:"lte=200"`
	// 部门所属域
	Domain string `protobuf:"bytes,6,opt,name=domain,proto3" json:"domain"`
	// 创建人
	CreateBy string `protobuf:"bytes,7,opt,name=create_by,json=createBy,proto3" json:"create_by"`
	// contains filtered or unexported fields
}

CreateDepartmentRequest 创建部门请求

func NewCreateDepartmentRequest

func NewCreateDepartmentRequest() *CreateDepartmentRequest

NewCreateDepartmentRequest todo

func (*CreateDepartmentRequest) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*CreateDepartmentRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateDepartmentRequest.ProtoReflect.Descriptor instead.

func (*CreateDepartmentRequest) GetCreateBy added in v0.5.5

func (x *CreateDepartmentRequest) GetCreateBy() string

func (*CreateDepartmentRequest) GetDefaultRoleId added in v0.2.0

func (x *CreateDepartmentRequest) GetDefaultRoleId() string

func (*CreateDepartmentRequest) GetDisplayName added in v0.2.0

func (x *CreateDepartmentRequest) GetDisplayName() string

func (*CreateDepartmentRequest) GetDomain added in v0.5.5

func (x *CreateDepartmentRequest) GetDomain() string

func (*CreateDepartmentRequest) GetManager added in v0.2.0

func (x *CreateDepartmentRequest) GetManager() string

func (*CreateDepartmentRequest) GetName added in v0.2.0

func (x *CreateDepartmentRequest) GetName() string

func (*CreateDepartmentRequest) GetParentId added in v0.2.0

func (x *CreateDepartmentRequest) GetParentId() string

func (*CreateDepartmentRequest) Patch added in v0.2.0

Patch todo

func (*CreateDepartmentRequest) ProtoMessage added in v0.2.0

func (*CreateDepartmentRequest) ProtoMessage()

func (*CreateDepartmentRequest) ProtoReflect added in v0.2.0

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

func (*CreateDepartmentRequest) Reset added in v0.2.0

func (x *CreateDepartmentRequest) Reset()

func (*CreateDepartmentRequest) String added in v0.2.0

func (x *CreateDepartmentRequest) String() string

func (*CreateDepartmentRequest) UpdateOwner added in v0.5.5

func (req *CreateDepartmentRequest) UpdateOwner(tk *token.Token)

func (*CreateDepartmentRequest) Validate

func (req *CreateDepartmentRequest) Validate() error

Validate 校验参数的合法性

type DealApplicationFormRequest added in v0.2.0

type DealApplicationFormRequest struct {

	// 用户
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"`
	// 状态
	Status ApplicationFormStatus `protobuf:"varint,2,opt,name=status,proto3,enum=keyauth.department.ApplicationFormStatus" json:"status"`
	// 备注
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
	// contains filtered or unexported fields
}

DealApplicationFormRequest todo

func NewDefaultDealApplicationFormRequest added in v0.2.0

func NewDefaultDealApplicationFormRequest() *DealApplicationFormRequest

NewDefaultDealApplicationFormRequest todo

func (*DealApplicationFormRequest) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*DealApplicationFormRequest) Descriptor() ([]byte, []int)

Deprecated: Use DealApplicationFormRequest.ProtoReflect.Descriptor instead.

func (*DealApplicationFormRequest) GetId added in v0.2.0

func (*DealApplicationFormRequest) GetMessage added in v0.2.0

func (x *DealApplicationFormRequest) GetMessage() string

func (*DealApplicationFormRequest) GetStatus added in v0.2.0

func (*DealApplicationFormRequest) ProtoMessage added in v0.2.0

func (*DealApplicationFormRequest) ProtoMessage()

func (*DealApplicationFormRequest) ProtoReflect added in v0.2.0

func (*DealApplicationFormRequest) Reset added in v0.2.0

func (x *DealApplicationFormRequest) Reset()

func (*DealApplicationFormRequest) String added in v0.2.0

func (x *DealApplicationFormRequest) String() string

func (*DealApplicationFormRequest) Validate added in v0.2.0

func (req *DealApplicationFormRequest) Validate() error

Validate todo

type DeleteDepartmentRequest added in v0.2.0

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

DeleteDepartmentRequest todo

func NewDeleteDepartmentRequestWithID added in v0.2.0

func NewDeleteDepartmentRequestWithID(id string) *DeleteDepartmentRequest

NewDeleteDepartmentRequestWithID todo

func (*DeleteDepartmentRequest) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*DeleteDepartmentRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteDepartmentRequest.ProtoReflect.Descriptor instead.

func (*DeleteDepartmentRequest) GetId added in v0.2.0

func (x *DeleteDepartmentRequest) GetId() string

func (*DeleteDepartmentRequest) ProtoMessage added in v0.2.0

func (*DeleteDepartmentRequest) ProtoMessage()

func (*DeleteDepartmentRequest) ProtoReflect added in v0.2.0

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

func (*DeleteDepartmentRequest) Reset added in v0.2.0

func (x *DeleteDepartmentRequest) Reset()

func (*DeleteDepartmentRequest) String added in v0.2.0

func (x *DeleteDepartmentRequest) String() string

func (*DeleteDepartmentRequest) Validate added in v0.2.0

func (req *DeleteDepartmentRequest) Validate() error

Validate todo

type Department

type Department struct {

	// 部门ID
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"`
	// 路径
	ParentPath string `protobuf:"bytes,2,opt,name=parent_path,json=parentPath,proto3" json:"parent_path" bson:"parent_path"`
	// 部门编号
	Number uint64 `protobuf:"varint,3,opt,name=number,proto3" json:"number" bson:"number"`
	// 部门创建时间
	CreateAt int64 `protobuf:"varint,4,opt,name=create_at,json=createAt,proto3" json:"create_at" bson:"create_at"`
	// 更新时间
	UpdateAt int64 `protobuf:"varint,5,opt,name=update_at,json=updateAt,proto3" json:"update_at" bson:"update_at"`
	// 创建人
	CreateBy string `protobuf:"bytes,6,opt,name=create_by,json=createBy,proto3" json:"create_by" bson:"create_by"`
	// 部门所属域
	Domain string `protobuf:"bytes,7,opt,name=domain,proto3" json:"domain" bson:"domain"`
	// 第几级部门, 由层数决定
	Grade int32 `protobuf:"varint,8,opt,name=grade,proto3" json:"grade" bson:"grade"`
	// 子部门数量
	SubCount int64 `protobuf:"varint,9,opt,name=sub_count,json=subCount,proto3" json:"sub_count" bson:"-"`
	// 部门所有用户数量
	UserCount int64 `protobuf:"varint,10,opt,name=user_count,json=userCount,proto3" json:"user_count" bson:"-"`
	// 部门名称
	Name string `protobuf:"bytes,11,opt,name=name,proto3" json:"name" bson:"name"`
	// 显示名称
	DisplayName string `protobuf:"bytes,12,opt,name=display_name,json=displayName,proto3" json:"display_name" bson:"display_name"`
	// 上级部门ID
	ParentId string `protobuf:"bytes,13,opt,name=parent_id,json=parentId,proto3" json:"parent_id" bson:"parent_id"`
	// 部门管理者account
	Manager string `protobuf:"bytes,14,opt,name=manager,proto3" json:"manager" bson:"manager"`
	// 部门成员默认角色
	DefaultRoleId string `protobuf:"bytes,15,opt,name=default_role_id,json=defaultRoleId,proto3" json:"default_role_id" bson:"default_role_id"`
	// 默认角色
	DefaultRole *role.Role `protobuf:"bytes,16,opt,name=default_role,json=defaultRole,proto3" json:"default_role,omitempty" bson:"-"`
	// contains filtered or unexported fields
}

Department user's department

func NewDefaultDepartment

func NewDefaultDepartment() *Department

NewDefaultDepartment todo

func (*Department) CounterKey added in v0.2.0

func (d *Department) CounterKey() string

CounterKey 编号计算的key

func (*Department) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*Department) Descriptor() ([]byte, []int)

Deprecated: Use Department.ProtoReflect.Descriptor instead.

func (*Department) GetCreateAt added in v0.2.0

func (x *Department) GetCreateAt() int64

func (*Department) GetCreateBy added in v0.5.5

func (x *Department) GetCreateBy() string

func (*Department) GetDefaultRole added in v0.2.0

func (x *Department) GetDefaultRole() *role.Role

func (*Department) GetDefaultRoleId added in v0.2.0

func (x *Department) GetDefaultRoleId() string

func (*Department) GetDisplayName added in v0.2.0

func (x *Department) GetDisplayName() string

func (*Department) GetDomain added in v0.2.0

func (x *Department) GetDomain() string

func (*Department) GetGrade added in v0.2.0

func (x *Department) GetGrade() int32

func (*Department) GetId added in v0.2.0

func (x *Department) GetId() string

func (*Department) GetManager added in v0.2.0

func (x *Department) GetManager() string

func (*Department) GetName added in v0.2.0

func (x *Department) GetName() string

func (*Department) GetNumber added in v0.2.0

func (x *Department) GetNumber() uint64

func (*Department) GetParentId added in v0.2.0

func (x *Department) GetParentId() string

func (*Department) GetParentPath added in v0.2.0

func (x *Department) GetParentPath() string

func (*Department) GetSubCount added in v0.2.0

func (x *Department) GetSubCount() int64

func (*Department) GetUpdateAt added in v0.2.0

func (x *Department) GetUpdateAt() int64

func (*Department) GetUserCount added in v0.2.0

func (x *Department) GetUserCount() int64

func (*Department) HasSubDepartment added in v0.2.0

func (d *Department) HasSubDepartment() bool

HasSubDepartment todo

func (*Department) Patch added in v0.2.0

func (d *Department) Patch(req *CreateDepartmentRequest)

Patch todo

func (*Department) Path

func (d *Department) Path() string

Path 具体路径

func (*Department) ProtoMessage added in v0.2.0

func (*Department) ProtoMessage()

func (*Department) ProtoReflect added in v0.2.0

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

func (*Department) Reset added in v0.2.0

func (x *Department) Reset()

func (*Department) String added in v0.2.0

func (x *Department) String() string

func (*Department) Update added in v0.2.0

func (d *Department) Update(req *CreateDepartmentRequest)

Update todo

type DepartmentServiceClient added in v0.2.0

type DepartmentServiceClient interface {
	QueryDepartment(ctx context.Context, in *QueryDepartmentRequest, opts ...grpc.CallOption) (*Set, error)
	DescribeDepartment(ctx context.Context, in *DescribeDeparmentRequest, opts ...grpc.CallOption) (*Department, error)
	CreateDepartment(ctx context.Context, in *CreateDepartmentRequest, opts ...grpc.CallOption) (*Department, error)
	UpdateDepartment(ctx context.Context, in *UpdateDepartmentRequest, opts ...grpc.CallOption) (*Department, error)
	DeleteDepartment(ctx context.Context, in *DeleteDepartmentRequest, opts ...grpc.CallOption) (*Department, error)
	QueryApplicationForm(ctx context.Context, in *QueryApplicationFormRequet, opts ...grpc.CallOption) (*ApplicationFormSet, error)
	DescribeApplicationForm(ctx context.Context, in *DescribeApplicationFormRequet, opts ...grpc.CallOption) (*ApplicationForm, error)
	JoinDepartment(ctx context.Context, in *JoinDepartmentRequest, opts ...grpc.CallOption) (*ApplicationForm, error)
	DealApplicationForm(ctx context.Context, in *DealApplicationFormRequest, opts ...grpc.CallOption) (*ApplicationForm, error)
}

DepartmentServiceClient is the client API for DepartmentService 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 NewDepartmentServiceClient added in v0.2.0

func NewDepartmentServiceClient(cc grpc.ClientConnInterface) DepartmentServiceClient

type DepartmentServiceServer added in v0.2.0

type DepartmentServiceServer interface {
	QueryDepartment(context.Context, *QueryDepartmentRequest) (*Set, error)
	DescribeDepartment(context.Context, *DescribeDeparmentRequest) (*Department, error)
	CreateDepartment(context.Context, *CreateDepartmentRequest) (*Department, error)
	UpdateDepartment(context.Context, *UpdateDepartmentRequest) (*Department, error)
	DeleteDepartment(context.Context, *DeleteDepartmentRequest) (*Department, error)
	QueryApplicationForm(context.Context, *QueryApplicationFormRequet) (*ApplicationFormSet, error)
	DescribeApplicationForm(context.Context, *DescribeApplicationFormRequet) (*ApplicationForm, error)
	JoinDepartment(context.Context, *JoinDepartmentRequest) (*ApplicationForm, error)
	DealApplicationForm(context.Context, *DealApplicationFormRequest) (*ApplicationForm, error)
	// contains filtered or unexported methods
}

DepartmentServiceServer is the server API for DepartmentService service. All implementations must embed UnimplementedDepartmentServiceServer for forward compatibility

type DescribeApplicationFormRequet added in v0.2.0

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

DescribeApplicationFormRequet todo

func NewDescribeApplicationFormRequetWithID added in v0.2.0

func NewDescribeApplicationFormRequetWithID(id string) *DescribeApplicationFormRequet

NewDescribeApplicationFormRequetWithID todo

func (*DescribeApplicationFormRequet) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*DescribeApplicationFormRequet) Descriptor() ([]byte, []int)

Deprecated: Use DescribeApplicationFormRequet.ProtoReflect.Descriptor instead.

func (*DescribeApplicationFormRequet) GetDomain added in v0.5.5

func (x *DescribeApplicationFormRequet) GetDomain() string

func (*DescribeApplicationFormRequet) GetId added in v0.2.0

func (*DescribeApplicationFormRequet) ProtoMessage added in v0.2.0

func (*DescribeApplicationFormRequet) ProtoMessage()

func (*DescribeApplicationFormRequet) ProtoReflect added in v0.2.0

func (*DescribeApplicationFormRequet) Reset added in v0.2.0

func (x *DescribeApplicationFormRequet) Reset()

func (*DescribeApplicationFormRequet) String added in v0.2.0

type DescribeDeparmentRequest

type DescribeDeparmentRequest struct {
	Id            string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"`
	Name          string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	WithSubCount  bool   `protobuf:"varint,3,opt,name=with_sub_count,json=withSubCount,proto3" json:"with_sub_count"`
	WithUserCount bool   `protobuf:"varint,4,opt,name=with_user_count,json=withUserCount,proto3" json:"with_user_count"`
	WithRole      bool   `protobuf:"varint,5,opt,name=with_role,json=withRole,proto3" json:"with_role"`
	Domain        string `protobuf:"bytes,6,opt,name=domain,proto3" json:"domain" validate:"required"`
	// contains filtered or unexported fields
}

DescribeDeparmentRequest 详情查询

func NewDescribeDepartmentRequest added in v0.2.0

func NewDescribeDepartmentRequest() *DescribeDeparmentRequest

NewDescribeDepartmentRequest new实例

func NewDescribeDepartmentRequestWithID added in v0.2.0

func NewDescribeDepartmentRequestWithID(id string) *DescribeDeparmentRequest

NewDescribeDepartmentRequestWithID new实例

func (*DescribeDeparmentRequest) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*DescribeDeparmentRequest) Descriptor() ([]byte, []int)

Deprecated: Use DescribeDeparmentRequest.ProtoReflect.Descriptor instead.

func (*DescribeDeparmentRequest) GetDomain added in v0.5.5

func (x *DescribeDeparmentRequest) GetDomain() string

func (*DescribeDeparmentRequest) GetId added in v0.2.0

func (x *DescribeDeparmentRequest) GetId() string

func (*DescribeDeparmentRequest) GetName added in v0.2.0

func (x *DescribeDeparmentRequest) GetName() string

func (*DescribeDeparmentRequest) GetWithRole added in v0.2.0

func (x *DescribeDeparmentRequest) GetWithRole() bool

func (*DescribeDeparmentRequest) GetWithSubCount added in v0.2.0

func (x *DescribeDeparmentRequest) GetWithSubCount() bool

func (*DescribeDeparmentRequest) GetWithUserCount added in v0.2.0

func (x *DescribeDeparmentRequest) GetWithUserCount() bool

func (*DescribeDeparmentRequest) ProtoMessage added in v0.2.0

func (*DescribeDeparmentRequest) ProtoMessage()

func (*DescribeDeparmentRequest) ProtoReflect added in v0.2.0

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

func (*DescribeDeparmentRequest) Reset added in v0.2.0

func (x *DescribeDeparmentRequest) Reset()

func (*DescribeDeparmentRequest) String added in v0.2.0

func (x *DescribeDeparmentRequest) String() string

func (*DescribeDeparmentRequest) Validate

func (req *DescribeDeparmentRequest) Validate() error

Validate 参数校验

type JoinDepartmentRequest added in v0.2.0

type JoinDepartmentRequest struct {

	// 申请人
	Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account" validate:"required"`
	// 申请加入的部门
	DepartmentId string `protobuf:"bytes,2,opt,name=department_id,json=departmentId,proto3" json:"department_id" validate:"required"`
	// 留言
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
	// 所属域
	Domain string `protobuf:"bytes,4,opt,name=domain,proto3" json:"domain"`
	// contains filtered or unexported fields
}

JoinDepartmentRequest todo

func NewJoinDepartmentRequest added in v0.2.0

func NewJoinDepartmentRequest() *JoinDepartmentRequest

NewJoinDepartmentRequest todo

func (*JoinDepartmentRequest) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*JoinDepartmentRequest) Descriptor() ([]byte, []int)

Deprecated: Use JoinDepartmentRequest.ProtoReflect.Descriptor instead.

func (*JoinDepartmentRequest) GetAccount added in v0.2.0

func (x *JoinDepartmentRequest) GetAccount() string

func (*JoinDepartmentRequest) GetDepartmentId added in v0.2.0

func (x *JoinDepartmentRequest) GetDepartmentId() string

func (*JoinDepartmentRequest) GetDomain added in v0.5.5

func (x *JoinDepartmentRequest) GetDomain() string

func (*JoinDepartmentRequest) GetMessage added in v0.2.0

func (x *JoinDepartmentRequest) GetMessage() string

func (*JoinDepartmentRequest) ProtoMessage added in v0.2.0

func (*JoinDepartmentRequest) ProtoMessage()

func (*JoinDepartmentRequest) ProtoReflect added in v0.2.0

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

func (*JoinDepartmentRequest) Reset added in v0.2.0

func (x *JoinDepartmentRequest) Reset()

func (*JoinDepartmentRequest) String added in v0.2.0

func (x *JoinDepartmentRequest) String() string

func (*JoinDepartmentRequest) UpdateOwner added in v0.5.5

func (req *JoinDepartmentRequest) UpdateOwner(tk *token.Token)

func (*JoinDepartmentRequest) Validate added in v0.2.0

func (req *JoinDepartmentRequest) Validate() error

Validate todo

type QueryApplicationFormRequet added in v0.2.0

type QueryApplicationFormRequet struct {
	Page         *page.PageRequest     `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	Account      string                `protobuf:"bytes,2,opt,name=account,proto3" json:"account"`
	DepartmentId string                `protobuf:"bytes,3,opt,name=department_id,json=departmentId,proto3" json:"department_id"`
	Status       ApplicationFormStatus `protobuf:"varint,4,opt,name=status,proto3,enum=keyauth.department.ApplicationFormStatus" json:"status"`
	SkipItems    bool                  `protobuf:"varint,5,opt,name=skip_items,json=skipItems,proto3" json:"skip_items"`
	Domain       string                `protobuf:"bytes,6,opt,name=domain,proto3" json:"domain" validate:"required"`
	// contains filtered or unexported fields
}

QueryApplicationFormRequet todo

func NewQueryApplicationFormRequestFromHTTP added in v0.2.0

func NewQueryApplicationFormRequestFromHTTP(r *http.Request) (*QueryApplicationFormRequet, error)

NewQueryApplicationFormRequestFromHTTP todo

func NewQueryApplicationFormRequet added in v0.2.0

func NewQueryApplicationFormRequet() *QueryApplicationFormRequet

NewQueryApplicationFormRequet todo

func (*QueryApplicationFormRequet) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*QueryApplicationFormRequet) Descriptor() ([]byte, []int)

Deprecated: Use QueryApplicationFormRequet.ProtoReflect.Descriptor instead.

func (*QueryApplicationFormRequet) GetAccount added in v0.2.0

func (x *QueryApplicationFormRequet) GetAccount() string

func (*QueryApplicationFormRequet) GetDepartmentId added in v0.2.0

func (x *QueryApplicationFormRequet) GetDepartmentId() string

func (*QueryApplicationFormRequet) GetDomain added in v0.5.5

func (x *QueryApplicationFormRequet) GetDomain() string

func (*QueryApplicationFormRequet) GetPage added in v0.2.0

func (*QueryApplicationFormRequet) GetSkipItems added in v0.2.0

func (x *QueryApplicationFormRequet) GetSkipItems() bool

func (*QueryApplicationFormRequet) GetStatus added in v0.2.0

func (*QueryApplicationFormRequet) ProtoMessage added in v0.2.0

func (*QueryApplicationFormRequet) ProtoMessage()

func (*QueryApplicationFormRequet) ProtoReflect added in v0.2.0

func (*QueryApplicationFormRequet) Reset added in v0.2.0

func (x *QueryApplicationFormRequet) Reset()

func (*QueryApplicationFormRequet) String added in v0.2.0

func (x *QueryApplicationFormRequet) String() string

func (*QueryApplicationFormRequet) Validate added in v0.2.0

func (req *QueryApplicationFormRequet) Validate() error

Validate 请求参数校验

type QueryDepartmentRequest

type QueryDepartmentRequest struct {
	Page          *page.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	ParentId      string            `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id"`
	Keywords      string            `protobuf:"bytes,3,opt,name=keywords,proto3" json:"keywords"`
	SkipItems     bool              `protobuf:"varint,4,opt,name=skip_items,json=skipItems,proto3" json:"skip_items"`
	WithSubCount  bool              `protobuf:"varint,5,opt,name=with_sub_count,json=withSubCount,proto3" json:"with_sub_count"`
	WithUserCount bool              `protobuf:"varint,6,opt,name=with_user_count,json=withUserCount,proto3" json:"with_user_count"`
	WithRole      bool              `protobuf:"varint,7,opt,name=with_role,json=withRole,proto3" json:"with_role"`
	Domain        string            `protobuf:"bytes,8,opt,name=domain,proto3" json:"domain" validate:"required"`
	// contains filtered or unexported fields
}

QueryDepartmentRequest todo

func NewQueryDepartmentRequest

func NewQueryDepartmentRequest() *QueryDepartmentRequest

NewQueryDepartmentRequest todo

func NewQueryDepartmentRequestFromHTTP added in v0.2.0

func NewQueryDepartmentRequestFromHTTP(r *http.Request) *QueryDepartmentRequest

NewQueryDepartmentRequestFromHTTP 列表查询请求

func (*QueryDepartmentRequest) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*QueryDepartmentRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryDepartmentRequest.ProtoReflect.Descriptor instead.

func (*QueryDepartmentRequest) GetDomain added in v0.5.5

func (x *QueryDepartmentRequest) GetDomain() string

func (*QueryDepartmentRequest) GetKeywords added in v0.2.0

func (x *QueryDepartmentRequest) GetKeywords() string

func (*QueryDepartmentRequest) GetPage added in v0.2.0

func (x *QueryDepartmentRequest) GetPage() *page.PageRequest

func (*QueryDepartmentRequest) GetParentId added in v0.2.0

func (x *QueryDepartmentRequest) GetParentId() string

func (*QueryDepartmentRequest) GetSkipItems added in v0.2.0

func (x *QueryDepartmentRequest) GetSkipItems() bool

func (*QueryDepartmentRequest) GetWithRole added in v0.2.0

func (x *QueryDepartmentRequest) GetWithRole() bool

func (*QueryDepartmentRequest) GetWithSubCount added in v0.2.0

func (x *QueryDepartmentRequest) GetWithSubCount() bool

func (*QueryDepartmentRequest) GetWithUserCount added in v0.2.0

func (x *QueryDepartmentRequest) GetWithUserCount() bool

func (*QueryDepartmentRequest) ProtoMessage added in v0.2.0

func (*QueryDepartmentRequest) ProtoMessage()

func (*QueryDepartmentRequest) ProtoReflect added in v0.2.0

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

func (*QueryDepartmentRequest) Reset added in v0.2.0

func (x *QueryDepartmentRequest) Reset()

func (*QueryDepartmentRequest) String added in v0.2.0

func (x *QueryDepartmentRequest) String() string

func (*QueryDepartmentRequest) Validate added in v0.2.0

func (req *QueryDepartmentRequest) Validate() error

Validate todo

type Set

type Set struct {
	Total int64         `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"`
	Items []*Department `protobuf:"bytes,2,rep,name=items,proto3" json:"items" bson:"items"`
	// contains filtered or unexported fields
}

func NewDepartmentSet

func NewDepartmentSet() *Set

NewDepartmentSet 实例化

func (*Set) Add

func (s *Set) Add(item *Department)

Add 添加应用

func (*Set) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*Set) Descriptor() ([]byte, []int)

Deprecated: Use Set.ProtoReflect.Descriptor instead.

func (*Set) GetItems added in v0.2.0

func (x *Set) GetItems() []*Department

func (*Set) GetTotal added in v0.2.0

func (x *Set) GetTotal() int64

func (*Set) ProtoMessage added in v0.2.0

func (*Set) ProtoMessage()

func (*Set) ProtoReflect added in v0.2.0

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

func (*Set) Reset added in v0.2.0

func (x *Set) Reset()

func (*Set) String added in v0.2.0

func (x *Set) String() string

type UnimplementedDepartmentServiceServer added in v0.2.0

type UnimplementedDepartmentServiceServer struct {
}

UnimplementedDepartmentServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDepartmentServiceServer) CreateDepartment added in v0.2.0

func (UnimplementedDepartmentServiceServer) DealApplicationForm added in v0.2.0

func (UnimplementedDepartmentServiceServer) DeleteDepartment added in v0.2.0

func (UnimplementedDepartmentServiceServer) DescribeApplicationForm added in v0.2.0

func (UnimplementedDepartmentServiceServer) DescribeDepartment added in v0.2.0

func (UnimplementedDepartmentServiceServer) JoinDepartment added in v0.2.0

func (UnimplementedDepartmentServiceServer) QueryApplicationForm added in v0.2.0

func (UnimplementedDepartmentServiceServer) QueryDepartment added in v0.2.0

func (UnimplementedDepartmentServiceServer) UpdateDepartment added in v0.2.0

type UnsafeDepartmentServiceServer added in v0.2.0

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

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

type UpdateDepartmentRequest added in v0.2.0

type UpdateDepartmentRequest struct {

	// 更新模式
	UpdateMode types.UpdateMode         `protobuf:"varint,1,opt,name=update_mode,json=updateMode,proto3,enum=keyauth.common.types.UpdateMode" json:"update_mode"`
	Id         string                   `protobuf:"bytes,2,opt,name=id,proto3" json:"id"`
	Data       *CreateDepartmentRequest `protobuf:"bytes,3,opt,name=data,proto3" json:"data"`
	// contains filtered or unexported fields
}

UpdateDepartmentRequest todo

func NewPatchUpdateDepartmentRequest added in v0.2.0

func NewPatchUpdateDepartmentRequest(id string) *UpdateDepartmentRequest

NewPatchUpdateDepartmentRequest todo

func NewPutUpdateDepartmentRequest added in v0.2.0

func NewPutUpdateDepartmentRequest(id string) *UpdateDepartmentRequest

NewPutUpdateDepartmentRequest todo

func (*UpdateDepartmentRequest) Descriptor deprecated added in v0.2.0

This method has been deprecated.
func (*UpdateDepartmentRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateDepartmentRequest.ProtoReflect.Descriptor instead.

func (*UpdateDepartmentRequest) GetData added in v0.2.0

func (*UpdateDepartmentRequest) GetId added in v0.2.0

func (x *UpdateDepartmentRequest) GetId() string

func (*UpdateDepartmentRequest) GetUpdateMode added in v0.2.0

func (x *UpdateDepartmentRequest) GetUpdateMode() types.UpdateMode

func (*UpdateDepartmentRequest) ProtoMessage added in v0.2.0

func (*UpdateDepartmentRequest) ProtoMessage()

func (*UpdateDepartmentRequest) ProtoReflect added in v0.2.0

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

func (*UpdateDepartmentRequest) Reset added in v0.2.0

func (x *UpdateDepartmentRequest) Reset()

func (*UpdateDepartmentRequest) String added in v0.2.0

func (x *UpdateDepartmentRequest) String() string

func (*UpdateDepartmentRequest) Validate added in v0.2.0

func (req *UpdateDepartmentRequest) Validate() error

Validate 校验入参

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL