Documentation
¶
Index ¶
- Variables
- func GetSchool(c *gin.Context) string
- func GetStaffID(c *gin.Context) string
- type ErrInvalidStaffID
- type Info
- func (*Info) Descriptor() ([]byte, []int)deprecated
- func (x *Info) GetStaffID() string
- func (x *Info) GetStaffName() string
- func (x *Info) GetStaffState() string
- func (x *Info) GetStaffType() Type
- func (x *Info) GetUnitCode() string
- func (x *Info) GetUnitName() string
- func (*Info) ProtoMessage()
- func (x *Info) ProtoReflect() protoreflect.Message
- func (x *Info) Reset()
- func (x *Info) String() string
- type InfoMapList
- func (x *InfoMapList) Append(list ...*Info)
- func (*InfoMapList) Descriptor() ([]byte, []int)deprecated
- func (x *InfoMapList) GetItems() map[string]*Info
- func (x *InfoMapList) MarshalJSON() ([]byte, error)
- func (*InfoMapList) ProtoMessage()
- func (x *InfoMapList) ProtoReflect() protoreflect.Message
- func (x *InfoMapList) Reset()
- func (x *InfoMapList) String() string
- func (x *InfoMapList) UnmarshalJSON(bytes []byte) error
- type Staff
- type StaffID
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Type_name = map[int32]string{ 0: "UNKNOWN", 1: "UNDERGRADUATE", 2: "POSTGRADUATE", 3: "TEACHER", } Type_value = map[string]int32{ "UNKNOWN": 0, "UNDERGRADUATE": 1, "POSTGRADUATE": 2, "TEACHER": 3, } )
Enum value maps for Type.
View Source
var File_campusapis_staff_base_proto protoreflect.FileDescriptor
Functions ¶
func GetStaffID ¶
Types ¶
type ErrInvalidStaffID ¶
type ErrInvalidStaffID struct {
// contains filtered or unexported fields
}
func (ErrInvalidStaffID) Error ¶
func (e ErrInvalidStaffID) Error() string
type Info ¶
type Info struct {
// 学工号
StaffID string `protobuf:"bytes,1,opt,name=staffID,proto3" json:"staffID,omitempty"`
// 姓名
StaffName string `protobuf:"bytes,2,opt,name=staffName,proto3" json:"staffName,omitempty"`
// 人员类型
StaffType Type `protobuf:"varint,3,opt,name=staffType,proto3,enum=campusapis.staff.Type" json:"staffType,omitempty"`
// 人员状态
StaffState string `protobuf:"bytes,4,opt,name=staffState,proto3" json:"staffState,omitempty"`
// 学院编码
UnitCode string `protobuf:"bytes,5,opt,name=unitCode,proto3" json:"unitCode,omitempty"`
// 学院名称
UnitName string `protobuf:"bytes,6,opt,name=unitName,proto3" json:"unitName,omitempty"`
// contains filtered or unexported fields
}
人员信息
func (*Info) Descriptor
deprecated
func (*Info) GetStaffID ¶
func (*Info) GetStaffName ¶
func (*Info) GetStaffState ¶
func (*Info) GetStaffType ¶
func (*Info) GetUnitCode ¶
func (*Info) GetUnitName ¶
func (*Info) ProtoMessage ¶
func (*Info) ProtoMessage()
func (*Info) ProtoReflect ¶
func (x *Info) ProtoReflect() protoreflect.Message
type InfoMapList ¶
type InfoMapList struct {
Items map[string]*Info `` /* 137-byte string literal not displayed */
// contains filtered or unexported fields
}
人员列表
func (*InfoMapList) Append ¶
func (x *InfoMapList) Append(list ...*Info)
func (*InfoMapList) Descriptor
deprecated
func (*InfoMapList) Descriptor() ([]byte, []int)
Deprecated: Use InfoMapList.ProtoReflect.Descriptor instead.
func (*InfoMapList) GetItems ¶
func (x *InfoMapList) GetItems() map[string]*Info
func (*InfoMapList) MarshalJSON ¶
func (x *InfoMapList) MarshalJSON() ([]byte, error)
func (*InfoMapList) ProtoMessage ¶
func (*InfoMapList) ProtoMessage()
func (*InfoMapList) ProtoReflect ¶
func (x *InfoMapList) ProtoReflect() protoreflect.Message
func (*InfoMapList) Reset ¶
func (x *InfoMapList) Reset()
func (*InfoMapList) String ¶
func (x *InfoMapList) String() string
func (*InfoMapList) UnmarshalJSON ¶
func (x *InfoMapList) UnmarshalJSON(bytes []byte) error
type Staff ¶
type Staff struct {
// 学工号
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
// 人员类型
Type Type `protobuf:"varint,2,opt,name=type,proto3,enum=campusapis.staff.Type" json:"type,omitempty"`
// contains filtered or unexported fields
}
人员
func FromContext ¶
func FromMetadata ¶
func Postgraduate ¶
func Undergraduate ¶
func (*Staff) Descriptor
deprecated
func (*Staff) ProtoMessage ¶
func (*Staff) ProtoMessage()
func (*Staff) ProtoReflect ¶
func (x *Staff) ProtoReflect() protoreflect.Message
type Type ¶
type Type int32
人员类型
func GetStaffType ¶
func (Type) Descriptor ¶
func (Type) Descriptor() protoreflect.EnumDescriptor
func (Type) EnumDescriptor
deprecated
func (Type) Number ¶
func (x Type) Number() protoreflect.EnumNumber
func (Type) Type ¶
func (Type) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.