department

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "department"
)
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 File_apps_department_pb_department_proto protoreflect.FileDescriptor
View Source
var File_apps_department_pb_enum_proto protoreflect.FileDescriptor
View Source
var File_apps_department_pb_request_proto protoreflect.FileDescriptor
View Source
var File_apps_department_pb_service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "infraboard.keyauth.department.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "QueryDepartment",
			Handler:    _Service_QueryDepartment_Handler,
		},
		{
			MethodName: "DescribeDepartment",
			Handler:    _Service_DescribeDepartment_Handler,
		},
		{
			MethodName: "CreateDepartment",
			Handler:    _Service_CreateDepartment_Handler,
		},
		{
			MethodName: "UpdateDepartment",
			Handler:    _Service_UpdateDepartment_Handler,
		},
		{
			MethodName: "DeleteDepartment",
			Handler:    _Service_DeleteDepartment_Handler,
		},
		{
			MethodName: "QueryApplicationForm",
			Handler:    _Service_QueryApplicationForm_Handler,
		},
		{
			MethodName: "DescribeApplicationForm",
			Handler:    _Service_DescribeApplicationForm_Handler,
		},
		{
			MethodName: "JoinDepartment",
			Handler:    _Service_JoinDepartment_Handler,
		},
		{
			MethodName: "DealApplicationForm",
			Handler:    _Service_DealApplicationForm_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "apps/department/pb/service.proto",
}

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

Functions

func HttpEntry

func HttpEntry() *http.EntrySet

HttpEntry todo

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type ApplicationForm

type ApplicationForm struct {

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

ApplicationForm todo

func NewApplicationForm

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

NewApplicationForm todo

func NewDeafultApplicationForm

func NewDeafultApplicationForm() *ApplicationForm

NewDeafultApplicationForm todo

func (*ApplicationForm) Descriptor deprecated

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

Deprecated: Use ApplicationForm.ProtoReflect.Descriptor instead.

func (*ApplicationForm) GetAccount

func (x *ApplicationForm) GetAccount() string

func (*ApplicationForm) GetCreateAt

func (x *ApplicationForm) GetCreateAt() int64

func (*ApplicationForm) GetCreater

func (x *ApplicationForm) GetCreater() string

func (*ApplicationForm) GetDepartmentId

func (x *ApplicationForm) GetDepartmentId() string

func (*ApplicationForm) GetDomain

func (x *ApplicationForm) GetDomain() string

func (*ApplicationForm) GetId

func (x *ApplicationForm) GetId() string

func (*ApplicationForm) GetMessage

func (x *ApplicationForm) GetMessage() string

func (*ApplicationForm) GetStatus

func (x *ApplicationForm) GetStatus() ApplicationFormStatus

func (*ApplicationForm) GetUpdateAt

func (x *ApplicationForm) GetUpdateAt() int64

func (*ApplicationForm) ProtoMessage

func (*ApplicationForm) ProtoMessage()

func (*ApplicationForm) ProtoReflect

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

func (*ApplicationForm) Reset

func (x *ApplicationForm) Reset()

func (*ApplicationForm) String

func (x *ApplicationForm) String() string

type ApplicationFormSet

type ApplicationFormSet struct {

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

func NewDApplicationFormSet

func NewDApplicationFormSet() *ApplicationFormSet

NewDApplicationFormSet 实例化

func (*ApplicationFormSet) Add

Add 添加

func (*ApplicationFormSet) Descriptor deprecated

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

Deprecated: Use ApplicationFormSet.ProtoReflect.Descriptor instead.

func (*ApplicationFormSet) GetItems

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

func (*ApplicationFormSet) GetTotal

func (x *ApplicationFormSet) GetTotal() int64

func (*ApplicationFormSet) Length

func (s *ApplicationFormSet) Length() int

Length 个数

func (*ApplicationFormSet) ProtoMessage

func (*ApplicationFormSet) ProtoMessage()

func (*ApplicationFormSet) ProtoReflect

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

func (*ApplicationFormSet) Reset

func (x *ApplicationFormSet) Reset()

func (*ApplicationFormSet) String

func (x *ApplicationFormSet) String() string

type ApplicationFormStatus

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

func ParseApplicationFormStatusFromString(str string) (ApplicationFormStatus, error)

ParseApplicationFormStatusFromString Parse ApplicationFormStatus from string

func (ApplicationFormStatus) Descriptor

func (ApplicationFormStatus) Enum

func (ApplicationFormStatus) EnumDescriptor deprecated

func (ApplicationFormStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ApplicationFormStatus.Descriptor instead.

func (ApplicationFormStatus) Equal

Equal type compare

func (ApplicationFormStatus) IsIn

IsIn todo

func (ApplicationFormStatus) MarshalJSON

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

MarshalJSON todo

func (ApplicationFormStatus) Number

func (ApplicationFormStatus) String

func (x ApplicationFormStatus) String() string

func (ApplicationFormStatus) Type

func (*ApplicationFormStatus) UnmarshalJSON

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

UnmarshalJSON todo

type CreateDepartmentRequest

type CreateDepartmentRequest struct {

	// 部门名称
	// @gotags: json:"name" validate:"required,lte=60"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" validate:"required,lte=60"`
	// 显示名称
	// @gotags: json:"display_name"
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name"`
	// 上级部门ID
	// @gotags: json:"parent_id" validate:"lte=200"
	ParentId string `protobuf:"bytes,3,opt,name=parent_id,json=parentId,proto3" json:"parent_id" validate:"lte=200"`
	// 部门管理者account
	// @gotags: json:"manager" validate:"required,lte=200"
	Manager string `protobuf:"bytes,4,opt,name=manager,proto3" json:"manager" validate:"required,lte=200"`
	// 部门成员默认角色
	// @gotags: json:"default_role_id" validate:"lte=200"
	DefaultRoleId string `protobuf:"bytes,5,opt,name=default_role_id,json=defaultRoleId,proto3" json:"default_role_id" validate:"lte=200"`
	// 部门所属域
	// @gotags: json:"domain"
	Domain string `protobuf:"bytes,6,opt,name=domain,proto3" json:"domain"`
	// 创建人
	// @gotags: json:"create_by"
	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

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

Deprecated: Use CreateDepartmentRequest.ProtoReflect.Descriptor instead.

func (*CreateDepartmentRequest) GetCreateBy

func (x *CreateDepartmentRequest) GetCreateBy() string

func (*CreateDepartmentRequest) GetDefaultRoleId

func (x *CreateDepartmentRequest) GetDefaultRoleId() string

func (*CreateDepartmentRequest) GetDisplayName

func (x *CreateDepartmentRequest) GetDisplayName() string

func (*CreateDepartmentRequest) GetDomain

func (x *CreateDepartmentRequest) GetDomain() string

func (*CreateDepartmentRequest) GetManager

func (x *CreateDepartmentRequest) GetManager() string

func (*CreateDepartmentRequest) GetName

func (x *CreateDepartmentRequest) GetName() string

func (*CreateDepartmentRequest) GetParentId

func (x *CreateDepartmentRequest) GetParentId() string

func (*CreateDepartmentRequest) Patch

Patch todo

func (*CreateDepartmentRequest) ProtoMessage

func (*CreateDepartmentRequest) ProtoMessage()

func (*CreateDepartmentRequest) ProtoReflect

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

func (*CreateDepartmentRequest) Reset

func (x *CreateDepartmentRequest) Reset()

func (*CreateDepartmentRequest) String

func (x *CreateDepartmentRequest) String() string

func (*CreateDepartmentRequest) UpdateOwner

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

func (*CreateDepartmentRequest) Validate

func (req *CreateDepartmentRequest) Validate() error

Validate 校验参数的合法性

type DealApplicationFormRequest

type DealApplicationFormRequest struct {

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

DealApplicationFormRequest todo

func NewDefaultDealApplicationFormRequest

func NewDefaultDealApplicationFormRequest() *DealApplicationFormRequest

NewDefaultDealApplicationFormRequest todo

func (*DealApplicationFormRequest) Descriptor deprecated

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

Deprecated: Use DealApplicationFormRequest.ProtoReflect.Descriptor instead.

func (*DealApplicationFormRequest) GetId

func (*DealApplicationFormRequest) GetMessage

func (x *DealApplicationFormRequest) GetMessage() string

func (*DealApplicationFormRequest) GetStatus

func (*DealApplicationFormRequest) ProtoMessage

func (*DealApplicationFormRequest) ProtoMessage()

func (*DealApplicationFormRequest) ProtoReflect

func (*DealApplicationFormRequest) Reset

func (x *DealApplicationFormRequest) Reset()

func (*DealApplicationFormRequest) String

func (x *DealApplicationFormRequest) String() string

func (*DealApplicationFormRequest) Validate

func (req *DealApplicationFormRequest) Validate() error

Validate todo

type DeleteDepartmentRequest

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

DeleteDepartmentRequest todo

func NewDeleteDepartmentRequestWithID

func NewDeleteDepartmentRequestWithID(id string) *DeleteDepartmentRequest

NewDeleteDepartmentRequestWithID todo

func (*DeleteDepartmentRequest) Descriptor deprecated

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

Deprecated: Use DeleteDepartmentRequest.ProtoReflect.Descriptor instead.

func (*DeleteDepartmentRequest) GetId

func (x *DeleteDepartmentRequest) GetId() string

func (*DeleteDepartmentRequest) ProtoMessage

func (*DeleteDepartmentRequest) ProtoMessage()

func (*DeleteDepartmentRequest) ProtoReflect

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

func (*DeleteDepartmentRequest) Reset

func (x *DeleteDepartmentRequest) Reset()

func (*DeleteDepartmentRequest) String

func (x *DeleteDepartmentRequest) String() string

func (*DeleteDepartmentRequest) Validate

func (req *DeleteDepartmentRequest) Validate() error

Validate todo

type Department

type Department struct {

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

func (d *Department) CounterKey() string

CounterKey 编号计算的key

func (*Department) Descriptor deprecated

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

Deprecated: Use Department.ProtoReflect.Descriptor instead.

func (*Department) GetCreateAt

func (x *Department) GetCreateAt() int64

func (*Department) GetCreateBy

func (x *Department) GetCreateBy() string

func (*Department) GetDefaultRole

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

func (*Department) GetDefaultRoleId

func (x *Department) GetDefaultRoleId() string

func (*Department) GetDisplayName

func (x *Department) GetDisplayName() string

func (*Department) GetDomain

func (x *Department) GetDomain() string

func (*Department) GetGrade

func (x *Department) GetGrade() int32

func (*Department) GetId

func (x *Department) GetId() string

func (*Department) GetManager

func (x *Department) GetManager() string

func (*Department) GetName

func (x *Department) GetName() string

func (*Department) GetNumber

func (x *Department) GetNumber() uint64

func (*Department) GetParentId

func (x *Department) GetParentId() string

func (*Department) GetParentPath

func (x *Department) GetParentPath() string

func (*Department) GetSubCount

func (x *Department) GetSubCount() int64

func (*Department) GetUpdateAt

func (x *Department) GetUpdateAt() int64

func (*Department) GetUserCount

func (x *Department) GetUserCount() int64

func (*Department) HasSubDepartment

func (d *Department) HasSubDepartment() bool

HasSubDepartment todo

func (*Department) Patch

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

Patch todo

func (*Department) Path

func (d *Department) Path() string

Path 具体路径

func (*Department) ProtoMessage

func (*Department) ProtoMessage()

func (*Department) ProtoReflect

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

func (*Department) Reset

func (x *Department) Reset()

func (*Department) String

func (x *Department) String() string

func (*Department) Update

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

Update todo

type DescribeApplicationFormRequet

type DescribeApplicationFormRequet struct {

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

DescribeApplicationFormRequet todo

func NewDescribeApplicationFormRequetWithID

func NewDescribeApplicationFormRequetWithID(id string) *DescribeApplicationFormRequet

NewDescribeApplicationFormRequetWithID todo

func (*DescribeApplicationFormRequet) Descriptor deprecated

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

Deprecated: Use DescribeApplicationFormRequet.ProtoReflect.Descriptor instead.

func (*DescribeApplicationFormRequet) GetDomain

func (x *DescribeApplicationFormRequet) GetDomain() string

func (*DescribeApplicationFormRequet) GetId

func (*DescribeApplicationFormRequet) ProtoMessage

func (*DescribeApplicationFormRequet) ProtoMessage()

func (*DescribeApplicationFormRequet) ProtoReflect

func (*DescribeApplicationFormRequet) Reset

func (x *DescribeApplicationFormRequet) Reset()

func (*DescribeApplicationFormRequet) String

type DescribeDeparmentRequest

type DescribeDeparmentRequest struct {

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

DescribeDeparmentRequest 详情查询

func NewDescribeDepartmentRequest

func NewDescribeDepartmentRequest() *DescribeDeparmentRequest

NewDescribeDepartmentRequest new实例

func NewDescribeDepartmentRequestWithID

func NewDescribeDepartmentRequestWithID(id string) *DescribeDeparmentRequest

NewDescribeDepartmentRequestWithID new实例

func (*DescribeDeparmentRequest) Descriptor deprecated

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

Deprecated: Use DescribeDeparmentRequest.ProtoReflect.Descriptor instead.

func (*DescribeDeparmentRequest) GetDomain

func (x *DescribeDeparmentRequest) GetDomain() string

func (*DescribeDeparmentRequest) GetId

func (x *DescribeDeparmentRequest) GetId() string

func (*DescribeDeparmentRequest) GetName

func (x *DescribeDeparmentRequest) GetName() string

func (*DescribeDeparmentRequest) GetWithRole

func (x *DescribeDeparmentRequest) GetWithRole() bool

func (*DescribeDeparmentRequest) GetWithSubCount

func (x *DescribeDeparmentRequest) GetWithSubCount() bool

func (*DescribeDeparmentRequest) GetWithUserCount

func (x *DescribeDeparmentRequest) GetWithUserCount() bool

func (*DescribeDeparmentRequest) ProtoMessage

func (*DescribeDeparmentRequest) ProtoMessage()

func (*DescribeDeparmentRequest) ProtoReflect

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

func (*DescribeDeparmentRequest) Reset

func (x *DescribeDeparmentRequest) Reset()

func (*DescribeDeparmentRequest) String

func (x *DescribeDeparmentRequest) String() string

func (*DescribeDeparmentRequest) Validate

func (req *DescribeDeparmentRequest) Validate() error

Validate 参数校验

type JoinDepartmentRequest

type JoinDepartmentRequest struct {

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

JoinDepartmentRequest todo

func NewJoinDepartmentRequest

func NewJoinDepartmentRequest() *JoinDepartmentRequest

NewJoinDepartmentRequest todo

func (*JoinDepartmentRequest) Descriptor deprecated

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

Deprecated: Use JoinDepartmentRequest.ProtoReflect.Descriptor instead.

func (*JoinDepartmentRequest) GetAccount

func (x *JoinDepartmentRequest) GetAccount() string

func (*JoinDepartmentRequest) GetDepartmentId

func (x *JoinDepartmentRequest) GetDepartmentId() string

func (*JoinDepartmentRequest) GetDomain

func (x *JoinDepartmentRequest) GetDomain() string

func (*JoinDepartmentRequest) GetMessage

func (x *JoinDepartmentRequest) GetMessage() string

func (*JoinDepartmentRequest) ProtoMessage

func (*JoinDepartmentRequest) ProtoMessage()

func (*JoinDepartmentRequest) ProtoReflect

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

func (*JoinDepartmentRequest) Reset

func (x *JoinDepartmentRequest) Reset()

func (*JoinDepartmentRequest) String

func (x *JoinDepartmentRequest) String() string

func (*JoinDepartmentRequest) UpdateOwner

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

func (*JoinDepartmentRequest) Validate

func (req *JoinDepartmentRequest) Validate() error

Validate todo

type QueryApplicationFormRequet

type QueryApplicationFormRequet struct {

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

QueryApplicationFormRequet todo

func NewQueryApplicationFormRequestFromHTTP

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

NewQueryApplicationFormRequestFromHTTP todo

func NewQueryApplicationFormRequet

func NewQueryApplicationFormRequet() *QueryApplicationFormRequet

NewQueryApplicationFormRequet todo

func (*QueryApplicationFormRequet) Descriptor deprecated

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

Deprecated: Use QueryApplicationFormRequet.ProtoReflect.Descriptor instead.

func (*QueryApplicationFormRequet) GetAccount

func (x *QueryApplicationFormRequet) GetAccount() string

func (*QueryApplicationFormRequet) GetDepartmentId

func (x *QueryApplicationFormRequet) GetDepartmentId() string

func (*QueryApplicationFormRequet) GetDomain

func (x *QueryApplicationFormRequet) GetDomain() string

func (*QueryApplicationFormRequet) GetPage

func (*QueryApplicationFormRequet) GetSkipItems

func (x *QueryApplicationFormRequet) GetSkipItems() bool

func (*QueryApplicationFormRequet) GetStatus

func (*QueryApplicationFormRequet) ProtoMessage

func (*QueryApplicationFormRequet) ProtoMessage()

func (*QueryApplicationFormRequet) ProtoReflect

func (*QueryApplicationFormRequet) Reset

func (x *QueryApplicationFormRequet) Reset()

func (*QueryApplicationFormRequet) String

func (x *QueryApplicationFormRequet) String() string

func (*QueryApplicationFormRequet) Validate

func (req *QueryApplicationFormRequet) Validate() error

Validate 请求参数校验

type QueryDepartmentRequest

type QueryDepartmentRequest struct {

	// @gotags: json:"page"
	Page *request.PageRequest `protobuf:"bytes,1,opt,name=page,proto3" json:"page"`
	// @gotags: json:"parent_id"
	ParentId string `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id"`
	// @gotags: json:"keywords"
	Keywords string `protobuf:"bytes,3,opt,name=keywords,proto3" json:"keywords"`
	// @gotags: json:"skip_items"
	SkipItems bool `protobuf:"varint,4,opt,name=skip_items,json=skipItems,proto3" json:"skip_items"`
	// @gotags: json:"with_sub_count"
	WithSubCount bool `protobuf:"varint,5,opt,name=with_sub_count,json=withSubCount,proto3" json:"with_sub_count"`
	// @gotags: json:"with_user_count"
	WithUserCount bool `protobuf:"varint,6,opt,name=with_user_count,json=withUserCount,proto3" json:"with_user_count"`
	// @gotags: json:"with_role"
	WithRole bool `protobuf:"varint,7,opt,name=with_role,json=withRole,proto3" json:"with_role"`
	// @gotags: json:"domain" validate:"required"
	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

func NewQueryDepartmentRequestFromHTTP(r *http.Request) *QueryDepartmentRequest

NewQueryDepartmentRequestFromHTTP 列表查询请求

func (*QueryDepartmentRequest) Descriptor deprecated

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

Deprecated: Use QueryDepartmentRequest.ProtoReflect.Descriptor instead.

func (*QueryDepartmentRequest) GetDomain

func (x *QueryDepartmentRequest) GetDomain() string

func (*QueryDepartmentRequest) GetKeywords

func (x *QueryDepartmentRequest) GetKeywords() string

func (*QueryDepartmentRequest) GetPage

func (*QueryDepartmentRequest) GetParentId

func (x *QueryDepartmentRequest) GetParentId() string

func (*QueryDepartmentRequest) GetSkipItems

func (x *QueryDepartmentRequest) GetSkipItems() bool

func (*QueryDepartmentRequest) GetWithRole

func (x *QueryDepartmentRequest) GetWithRole() bool

func (*QueryDepartmentRequest) GetWithSubCount

func (x *QueryDepartmentRequest) GetWithSubCount() bool

func (*QueryDepartmentRequest) GetWithUserCount

func (x *QueryDepartmentRequest) GetWithUserCount() bool

func (*QueryDepartmentRequest) ProtoMessage

func (*QueryDepartmentRequest) ProtoMessage()

func (*QueryDepartmentRequest) ProtoReflect

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

func (*QueryDepartmentRequest) Reset

func (x *QueryDepartmentRequest) Reset()

func (*QueryDepartmentRequest) String

func (x *QueryDepartmentRequest) String() string

func (*QueryDepartmentRequest) Validate

func (req *QueryDepartmentRequest) Validate() error

Validate todo

type ServiceClient

type ServiceClient 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)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

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

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type Set

type Set struct {

	// @gotags: bson:"total" json:"total"
	Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total" bson:"total"`
	// @gotags: bson:"items" json:"items"
	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

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

Deprecated: Use Set.ProtoReflect.Descriptor instead.

func (*Set) GetItems

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

func (*Set) GetTotal

func (x *Set) GetTotal() int64

func (*Set) ProtoMessage

func (*Set) ProtoMessage()

func (*Set) ProtoReflect

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

func (*Set) Reset

func (x *Set) Reset()

func (*Set) String

func (x *Set) String() string

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) CreateDepartment

func (UnimplementedServiceServer) DealApplicationForm

func (UnimplementedServiceServer) DeleteDepartment

func (UnimplementedServiceServer) DescribeApplicationForm

func (UnimplementedServiceServer) DescribeDepartment

func (UnimplementedServiceServer) JoinDepartment

func (UnimplementedServiceServer) QueryApplicationForm

func (UnimplementedServiceServer) QueryDepartment

func (UnimplementedServiceServer) UpdateDepartment

type UnsafeServiceServer

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

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

type UpdateDepartmentRequest

type UpdateDepartmentRequest struct {

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

UpdateDepartmentRequest todo

func NewPatchUpdateDepartmentRequest

func NewPatchUpdateDepartmentRequest(id string) *UpdateDepartmentRequest

NewPatchUpdateDepartmentRequest todo

func NewPutUpdateDepartmentRequest

func NewPutUpdateDepartmentRequest(id string) *UpdateDepartmentRequest

NewPutUpdateDepartmentRequest todo

func (*UpdateDepartmentRequest) Descriptor deprecated

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

Deprecated: Use UpdateDepartmentRequest.ProtoReflect.Descriptor instead.

func (*UpdateDepartmentRequest) GetData

func (*UpdateDepartmentRequest) GetId

func (x *UpdateDepartmentRequest) GetId() string

func (*UpdateDepartmentRequest) GetUpdateMode

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

func (*UpdateDepartmentRequest) ProtoMessage

func (*UpdateDepartmentRequest) ProtoMessage()

func (*UpdateDepartmentRequest) ProtoReflect

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

func (*UpdateDepartmentRequest) Reset

func (x *UpdateDepartmentRequest) Reset()

func (*UpdateDepartmentRequest) String

func (x *UpdateDepartmentRequest) String() string

func (*UpdateDepartmentRequest) Validate

func (req *UpdateDepartmentRequest) Validate() error

Validate 校验入参

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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