__

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CompanyRole_name = map[int32]string{
		0: "unknown_role",
		1: "manager_role",
		2: "member_role",
	}
	CompanyRole_value = map[string]int32{
		"unknown_role": 0,
		"manager_role": 1,
		"member_role":  2,
	}
)

Enum value maps for CompanyRole.

View Source
var (
	SAEvent_name = map[int32]string{
		0: "unknown_ev",
		1: "del_department_ev",
		2: "del_user_ev",
	}
	SAEvent_value = map[string]int32{
		"unknown_ev":        0,
		"del_department_ev": 1,
		"del_user_ev":       2,
	}
)

Enum value maps for SAEvent.

View Source
var (
	AreaType_name = map[int32]string{
		0: "unknown_type",
		1: "home_type",
		2: "company_type",
	}
	AreaType_value = map[string]int32{
		"unknown_type": 0,
		"home_type":    1,
		"company_type": 2,
	}
)

Enum value maps for AreaType.

View Source
var File_extension_proto protoreflect.FileDescriptor

Functions

func RegisterExtensionServer

func RegisterExtensionServer(s *grpc.Server, srv ExtensionServer)

Types

type Area

type Area struct {
	AreaId   uint64   `protobuf:"varint,1,opt,name=area_id,json=areaId,proto3" json:"area_id,omitempty"`
	Name     string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	AreaType AreaType `protobuf:"varint,3,opt,name=area_type,json=areaType,proto3,enum=proto.AreaType" json:"area_type,omitempty"`
	// contains filtered or unexported fields
}

func (*Area) Descriptor deprecated

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

Deprecated: Use Area.ProtoReflect.Descriptor instead.

func (*Area) GetAreaId

func (x *Area) GetAreaId() uint64

func (*Area) GetAreaType

func (x *Area) GetAreaType() AreaType

func (*Area) GetName

func (x *Area) GetName() string

func (*Area) ProtoMessage

func (*Area) ProtoMessage()

func (*Area) ProtoReflect

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

func (*Area) Reset

func (x *Area) Reset()

func (*Area) String

func (x *Area) String() string

type AreaType

type AreaType int32
const (
	AreaType_unknown_type AreaType = 0
	AreaType_home_type    AreaType = 1 // 家庭
	AreaType_company_type AreaType = 2 // 公司
)

func (AreaType) Descriptor

func (AreaType) Descriptor() protoreflect.EnumDescriptor

func (AreaType) Enum

func (x AreaType) Enum() *AreaType

func (AreaType) EnumDescriptor deprecated

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

Deprecated: Use AreaType.Descriptor instead.

func (AreaType) Number

func (x AreaType) Number() protoreflect.EnumNumber

func (AreaType) String

func (x AreaType) String() string

func (AreaType) Type

type BaseUserInfosReq

type BaseUserInfosReq struct {
	Token   string  `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	UserIds []int32 `protobuf:"varint,2,rep,packed,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*BaseUserInfosReq) Descriptor deprecated

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

Deprecated: Use BaseUserInfosReq.ProtoReflect.Descriptor instead.

func (*BaseUserInfosReq) GetToken

func (x *BaseUserInfosReq) GetToken() string

func (*BaseUserInfosReq) GetUserIds

func (x *BaseUserInfosReq) GetUserIds() []int32

func (*BaseUserInfosReq) ProtoMessage

func (*BaseUserInfosReq) ProtoMessage()

func (*BaseUserInfosReq) ProtoReflect

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

func (*BaseUserInfosReq) Reset

func (x *BaseUserInfosReq) Reset()

func (*BaseUserInfosReq) String

func (x *BaseUserInfosReq) String() string

type CompanyRole

type CompanyRole int32
const (
	CompanyRole_unknown_role CompanyRole = 0
	CompanyRole_manager_role CompanyRole = 1 // 主管
	CompanyRole_member_role  CompanyRole = 2 // 普通成员
)

func (CompanyRole) Descriptor

func (CompanyRole) Enum

func (x CompanyRole) Enum() *CompanyRole

func (CompanyRole) EnumDescriptor deprecated

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

Deprecated: Use CompanyRole.Descriptor instead.

func (CompanyRole) Number

func (x CompanyRole) Number() protoreflect.EnumNumber

func (CompanyRole) String

func (x CompanyRole) String() string

func (CompanyRole) Type

type DepartmentBaseInfo

type DepartmentBaseInfo struct {
	DepartmentId int32       `protobuf:"varint,1,opt,name=department_id,json=departmentId,proto3" json:"department_id,omitempty"`
	Name         string      `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	CompanyRole  CompanyRole `protobuf:"varint,3,opt,name=company_role,json=companyRole,proto3,enum=proto.CompanyRole" json:"company_role,omitempty"`
	// contains filtered or unexported fields
}

func (*DepartmentBaseInfo) Descriptor deprecated

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

Deprecated: Use DepartmentBaseInfo.ProtoReflect.Descriptor instead.

func (*DepartmentBaseInfo) GetCompanyRole

func (x *DepartmentBaseInfo) GetCompanyRole() CompanyRole

func (*DepartmentBaseInfo) GetDepartmentId

func (x *DepartmentBaseInfo) GetDepartmentId() int32

func (*DepartmentBaseInfo) GetName

func (x *DepartmentBaseInfo) GetName() string

func (*DepartmentBaseInfo) ProtoMessage

func (*DepartmentBaseInfo) ProtoMessage()

func (*DepartmentBaseInfo) ProtoReflect

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

func (*DepartmentBaseInfo) Reset

func (x *DepartmentBaseInfo) Reset()

func (*DepartmentBaseInfo) String

func (x *DepartmentBaseInfo) String() string

type DepartmentInfo

type DepartmentInfo struct {
	DepartmentId     int32             `protobuf:"varint,1,opt,name=department_id,json=departmentId,proto3" json:"department_id,omitempty"`
	Name             string            `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	ChildDepartments []*DepartmentInfo `protobuf:"bytes,3,rep,name=child_departments,json=childDepartments,proto3" json:"child_departments,omitempty"`
	// contains filtered or unexported fields
}

func (*DepartmentInfo) Descriptor deprecated

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

Deprecated: Use DepartmentInfo.ProtoReflect.Descriptor instead.

func (*DepartmentInfo) GetChildDepartments

func (x *DepartmentInfo) GetChildDepartments() []*DepartmentInfo

func (*DepartmentInfo) GetDepartmentId

func (x *DepartmentInfo) GetDepartmentId() int32

func (*DepartmentInfo) GetName

func (x *DepartmentInfo) GetName() string

func (*DepartmentInfo) ProtoMessage

func (*DepartmentInfo) ProtoMessage()

func (*DepartmentInfo) ProtoReflect

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

func (*DepartmentInfo) Reset

func (x *DepartmentInfo) Reset()

func (*DepartmentInfo) String

func (x *DepartmentInfo) String() string

type DepartmentUsers

type DepartmentUsers struct {
	Users []*UserInfo `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*DepartmentUsers) Descriptor deprecated

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

Deprecated: Use DepartmentUsers.ProtoReflect.Descriptor instead.

func (*DepartmentUsers) GetUsers

func (x *DepartmentUsers) GetUsers() []*UserInfo

func (*DepartmentUsers) ProtoMessage

func (*DepartmentUsers) ProtoMessage()

func (*DepartmentUsers) ProtoReflect

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

func (*DepartmentUsers) Reset

func (x *DepartmentUsers) Reset()

func (*DepartmentUsers) String

func (x *DepartmentUsers) String() string

type EmptyReq

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

func (*EmptyReq) Descriptor deprecated

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

Deprecated: Use EmptyReq.ProtoReflect.Descriptor instead.

func (*EmptyReq) ProtoMessage

func (*EmptyReq) ProtoMessage()

func (*EmptyReq) ProtoReflect

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

func (*EmptyReq) Reset

func (x *EmptyReq) Reset()

func (*EmptyReq) String

func (x *EmptyReq) String() string

type ExtensionClient

type ExtensionClient interface {
	// 获取用户数据
	GetUserInfo(ctx context.Context, in *GetAreaInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error)
	// 获取部门下所有成员
	GetDepartmentUsers(ctx context.Context, in *GetDepartmentUsersReq, opts ...grpc.CallOption) (*GetDepartmentUsersResp, error)
	// 根据用户id获取基础数据
	GetBaseUserInfos(ctx context.Context, in *BaseUserInfosReq, opts ...grpc.CallOption) (*DepartmentUsers, error)
	// Sa通知事件
	SANotifyEvent(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (Extension_SANotifyEventClient, error)
}

ExtensionClient is the client API for Extension service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewExtensionClient

func NewExtensionClient(cc grpc.ClientConnInterface) ExtensionClient

type ExtensionServer

type ExtensionServer interface {
	// 获取用户数据
	GetUserInfo(context.Context, *GetAreaInfoReq) (*GetUserInfoResp, error)
	// 获取部门下所有成员
	GetDepartmentUsers(context.Context, *GetDepartmentUsersReq) (*GetDepartmentUsersResp, error)
	// 根据用户id获取基础数据
	GetBaseUserInfos(context.Context, *BaseUserInfosReq) (*DepartmentUsers, error)
	// Sa通知事件
	SANotifyEvent(*EmptyReq, Extension_SANotifyEventServer) error
}

ExtensionServer is the server API for Extension service.

type Extension_SANotifyEventClient

type Extension_SANotifyEventClient interface {
	Recv() (*SAEventInfo, error)
	grpc.ClientStream
}

type Extension_SANotifyEventServer

type Extension_SANotifyEventServer interface {
	Send(*SAEventInfo) error
	grpc.ServerStream
}

type GetAreaInfoReq

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

func (*GetAreaInfoReq) Descriptor deprecated

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

Deprecated: Use GetAreaInfoReq.ProtoReflect.Descriptor instead.

func (*GetAreaInfoReq) GetToken

func (x *GetAreaInfoReq) GetToken() string

func (*GetAreaInfoReq) ProtoMessage

func (*GetAreaInfoReq) ProtoMessage()

func (*GetAreaInfoReq) ProtoReflect

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

func (*GetAreaInfoReq) Reset

func (x *GetAreaInfoReq) Reset()

func (*GetAreaInfoReq) String

func (x *GetAreaInfoReq) String() string

type GetDepartmentUsersReq

type GetDepartmentUsersReq struct {
	Token         string  `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	DepartmentIds []int32 `protobuf:"varint,2,rep,packed,name=department_ids,json=departmentIds,proto3" json:"department_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDepartmentUsersReq) Descriptor deprecated

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

Deprecated: Use GetDepartmentUsersReq.ProtoReflect.Descriptor instead.

func (*GetDepartmentUsersReq) GetDepartmentIds

func (x *GetDepartmentUsersReq) GetDepartmentIds() []int32

func (*GetDepartmentUsersReq) GetToken

func (x *GetDepartmentUsersReq) GetToken() string

func (*GetDepartmentUsersReq) ProtoMessage

func (*GetDepartmentUsersReq) ProtoMessage()

func (*GetDepartmentUsersReq) ProtoReflect

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

func (*GetDepartmentUsersReq) Reset

func (x *GetDepartmentUsersReq) Reset()

func (*GetDepartmentUsersReq) String

func (x *GetDepartmentUsersReq) String() string

type GetDepartmentUsersResp

type GetDepartmentUsersResp struct {
	DepartmentUsers map[int32]*DepartmentUsers `` /* 195-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetDepartmentUsersResp) Descriptor deprecated

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

Deprecated: Use GetDepartmentUsersResp.ProtoReflect.Descriptor instead.

func (*GetDepartmentUsersResp) GetDepartmentUsers

func (x *GetDepartmentUsersResp) GetDepartmentUsers() map[int32]*DepartmentUsers

func (*GetDepartmentUsersResp) ProtoMessage

func (*GetDepartmentUsersResp) ProtoMessage()

func (*GetDepartmentUsersResp) ProtoReflect

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

func (*GetDepartmentUsersResp) Reset

func (x *GetDepartmentUsersResp) Reset()

func (*GetDepartmentUsersResp) String

func (x *GetDepartmentUsersResp) String() string

type GetUserInfoResp

type GetUserInfoResp struct {
	UserInfo        *UserInfo             `protobuf:"bytes,1,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
	DepartmentInfos []*DepartmentBaseInfo `protobuf:"bytes,2,rep,name=department_infos,json=departmentInfos,proto3" json:"department_infos,omitempty"` // 所在部门
	AreaInfo        *Area                 `protobuf:"bytes,3,opt,name=area_info,json=areaInfo,proto3" json:"area_info,omitempty"`
	// contains filtered or unexported fields
}

func (*GetUserInfoResp) Descriptor deprecated

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

Deprecated: Use GetUserInfoResp.ProtoReflect.Descriptor instead.

func (*GetUserInfoResp) GetAreaInfo

func (x *GetUserInfoResp) GetAreaInfo() *Area

func (*GetUserInfoResp) GetDepartmentInfos

func (x *GetUserInfoResp) GetDepartmentInfos() []*DepartmentBaseInfo

func (*GetUserInfoResp) GetUserInfo

func (x *GetUserInfoResp) GetUserInfo() *UserInfo

func (*GetUserInfoResp) ProtoMessage

func (*GetUserInfoResp) ProtoMessage()

func (*GetUserInfoResp) ProtoReflect

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

func (*GetUserInfoResp) Reset

func (x *GetUserInfoResp) Reset()

func (*GetUserInfoResp) String

func (x *GetUserInfoResp) String() string

type SAEvent

type SAEvent int32
const (
	SAEvent_unknown_ev        SAEvent = 0
	SAEvent_del_department_ev SAEvent = 1 // 删除部门
	SAEvent_del_user_ev       SAEvent = 2 // 删除成员
)

func (SAEvent) Descriptor

func (SAEvent) Descriptor() protoreflect.EnumDescriptor

func (SAEvent) Enum

func (x SAEvent) Enum() *SAEvent

func (SAEvent) EnumDescriptor deprecated

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

Deprecated: Use SAEvent.Descriptor instead.

func (SAEvent) Number

func (x SAEvent) Number() protoreflect.EnumNumber

func (SAEvent) String

func (x SAEvent) String() string

func (SAEvent) Type

func (SAEvent) Type() protoreflect.EnumType

type SAEventInfo

type SAEventInfo struct {
	Event SAEvent `protobuf:"varint,1,opt,name=event,proto3,enum=proto.SAEvent" json:"event,omitempty"`
	Data  []byte  `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*SAEventInfo) Descriptor deprecated

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

Deprecated: Use SAEventInfo.ProtoReflect.Descriptor instead.

func (*SAEventInfo) GetData

func (x *SAEventInfo) GetData() []byte

func (*SAEventInfo) GetEvent

func (x *SAEventInfo) GetEvent() SAEvent

func (*SAEventInfo) ProtoMessage

func (*SAEventInfo) ProtoMessage()

func (*SAEventInfo) ProtoReflect

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

func (*SAEventInfo) Reset

func (x *SAEventInfo) Reset()

func (*SAEventInfo) String

func (x *SAEventInfo) String() string

type UnimplementedExtensionServer

type UnimplementedExtensionServer struct {
}

UnimplementedExtensionServer can be embedded to have forward compatible implementations.

func (*UnimplementedExtensionServer) GetBaseUserInfos

func (*UnimplementedExtensionServer) GetDepartmentUsers

func (*UnimplementedExtensionServer) GetUserInfo

func (*UnimplementedExtensionServer) SANotifyEvent

type UserInfo

type UserInfo struct {
	UserId      int32  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	AccountName string `protobuf:"bytes,2,opt,name=account_name,json=accountName,proto3" json:"account_name,omitempty"`
	NickName    string `protobuf:"bytes,3,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"`
	IsOwner     bool   `protobuf:"varint,4,opt,name=is_owner,json=isOwner,proto3" json:"is_owner,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfo) Descriptor deprecated

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

Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.

func (*UserInfo) GetAccountName

func (x *UserInfo) GetAccountName() string

func (*UserInfo) GetIsOwner

func (x *UserInfo) GetIsOwner() bool

func (*UserInfo) GetNickName

func (x *UserInfo) GetNickName() string

func (*UserInfo) GetUserId

func (x *UserInfo) GetUserId() int32

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) ProtoReflect

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

func (*UserInfo) Reset

func (x *UserInfo) Reset()

func (*UserInfo) String

func (x *UserInfo) String() string

Jump to

Keyboard shortcuts

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