Documentation
¶
Index ¶
- Variables
- func RegisterExtensionServer(s *grpc.Server, srv ExtensionServer)
- type Area
- type AreaType
- type BaseUserInfosReq
- func (*BaseUserInfosReq) Descriptor() ([]byte, []int)deprecated
- func (x *BaseUserInfosReq) GetToken() string
- func (x *BaseUserInfosReq) GetUserIds() []int32
- func (*BaseUserInfosReq) ProtoMessage()
- func (x *BaseUserInfosReq) ProtoReflect() protoreflect.Message
- func (x *BaseUserInfosReq) Reset()
- func (x *BaseUserInfosReq) String() string
- type CompanyRole
- func (CompanyRole) Descriptor() protoreflect.EnumDescriptor
- func (x CompanyRole) Enum() *CompanyRole
- func (CompanyRole) EnumDescriptor() ([]byte, []int)deprecated
- func (x CompanyRole) Number() protoreflect.EnumNumber
- func (x CompanyRole) String() string
- func (CompanyRole) Type() protoreflect.EnumType
- type DepartmentBaseInfo
- func (*DepartmentBaseInfo) Descriptor() ([]byte, []int)deprecated
- func (x *DepartmentBaseInfo) GetCompanyRole() CompanyRole
- func (x *DepartmentBaseInfo) GetDepartmentId() int32
- func (x *DepartmentBaseInfo) GetName() string
- func (*DepartmentBaseInfo) ProtoMessage()
- func (x *DepartmentBaseInfo) ProtoReflect() protoreflect.Message
- func (x *DepartmentBaseInfo) Reset()
- func (x *DepartmentBaseInfo) String() string
- type DepartmentInfo
- func (*DepartmentInfo) Descriptor() ([]byte, []int)deprecated
- func (x *DepartmentInfo) GetChildDepartments() []*DepartmentInfo
- func (x *DepartmentInfo) GetDepartmentId() int32
- func (x *DepartmentInfo) GetName() string
- func (*DepartmentInfo) ProtoMessage()
- func (x *DepartmentInfo) ProtoReflect() protoreflect.Message
- func (x *DepartmentInfo) Reset()
- func (x *DepartmentInfo) String() string
- type DepartmentUsers
- type EmptyReq
- type ExtensionClient
- type ExtensionServer
- type Extension_SANotifyEventClient
- type Extension_SANotifyEventServer
- type GetAreaInfoReq
- type GetDepartmentUsersReq
- func (*GetDepartmentUsersReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetDepartmentUsersReq) GetDepartmentIds() []int32
- func (x *GetDepartmentUsersReq) GetToken() string
- func (*GetDepartmentUsersReq) ProtoMessage()
- func (x *GetDepartmentUsersReq) ProtoReflect() protoreflect.Message
- func (x *GetDepartmentUsersReq) Reset()
- func (x *GetDepartmentUsersReq) String() string
- type GetDepartmentUsersResp
- func (*GetDepartmentUsersResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetDepartmentUsersResp) GetDepartmentUsers() map[int32]*DepartmentUsers
- func (*GetDepartmentUsersResp) ProtoMessage()
- func (x *GetDepartmentUsersResp) ProtoReflect() protoreflect.Message
- func (x *GetDepartmentUsersResp) Reset()
- func (x *GetDepartmentUsersResp) String() string
- type GetUserInfoResp
- func (*GetUserInfoResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserInfoResp) GetAreaInfo() *Area
- func (x *GetUserInfoResp) GetDepartmentInfos() []*DepartmentBaseInfo
- func (x *GetUserInfoResp) GetUserInfo() *UserInfo
- func (*GetUserInfoResp) ProtoMessage()
- func (x *GetUserInfoResp) ProtoReflect() protoreflect.Message
- func (x *GetUserInfoResp) Reset()
- func (x *GetUserInfoResp) String() string
- type SAEvent
- type SAEventInfo
- type UnimplementedExtensionServer
- func (*UnimplementedExtensionServer) GetBaseUserInfos(context.Context, *BaseUserInfosReq) (*DepartmentUsers, error)
- func (*UnimplementedExtensionServer) GetDepartmentUsers(context.Context, *GetDepartmentUsersReq) (*GetDepartmentUsersResp, error)
- func (*UnimplementedExtensionServer) GetUserInfo(context.Context, *GetAreaInfoReq) (*GetUserInfoResp, error)
- func (*UnimplementedExtensionServer) SANotifyEvent(*EmptyReq, Extension_SANotifyEventServer) error
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfo) GetAccountName() string
- func (x *UserInfo) GetIsOwner() bool
- func (x *UserInfo) GetNickName() string
- func (x *UserInfo) GetUserId() int32
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
Constants ¶
This section is empty.
Variables ¶
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.
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.
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.
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) GetAreaType ¶
func (*Area) ProtoMessage ¶
func (*Area) ProtoMessage()
func (*Area) ProtoReflect ¶
func (x *Area) ProtoReflect() protoreflect.Message
type AreaType ¶
type AreaType int32
func (AreaType) Descriptor ¶
func (AreaType) Descriptor() protoreflect.EnumDescriptor
func (AreaType) EnumDescriptor
deprecated
func (AreaType) Number ¶
func (x AreaType) Number() protoreflect.EnumNumber
func (AreaType) Type ¶
func (AreaType) Type() protoreflect.EnumType
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) Descriptor() protoreflect.EnumDescriptor
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 ¶
func (CompanyRole) Type() protoreflect.EnumType
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) ProtoMessage ¶
func (*EmptyReq) ProtoMessage()
func (*EmptyReq) ProtoReflect ¶
func (x *EmptyReq) ProtoReflect() protoreflect.Message
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
func (SAEvent) Descriptor ¶
func (SAEvent) Descriptor() protoreflect.EnumDescriptor
func (SAEvent) EnumDescriptor
deprecated
func (SAEvent) Number ¶
func (x SAEvent) Number() protoreflect.EnumNumber
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) GetBaseUserInfos(context.Context, *BaseUserInfosReq) (*DepartmentUsers, error)
func (*UnimplementedExtensionServer) GetDepartmentUsers ¶
func (*UnimplementedExtensionServer) GetDepartmentUsers(context.Context, *GetDepartmentUsersReq) (*GetDepartmentUsersResp, error)
func (*UnimplementedExtensionServer) GetUserInfo ¶
func (*UnimplementedExtensionServer) GetUserInfo(context.Context, *GetAreaInfoReq) (*GetUserInfoResp, error)
func (*UnimplementedExtensionServer) SANotifyEvent ¶
func (*UnimplementedExtensionServer) SANotifyEvent(*EmptyReq, Extension_SANotifyEventServer) error
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) GetAccountName ¶
func (*UserInfo) GetIsOwner ¶
func (*UserInfo) GetNickName ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message