Documentation ¶
Index ¶
- Variables
- type SchoolDate
- type SchoolDateToDater
- type SchoolYear
- func (*SchoolYear) Descriptor() ([]byte, []int)deprecated
- func (x *SchoolYear) FullName() string
- func (x *SchoolYear) GetYear() int32
- func (*SchoolYear) GormDataType() string
- func (x *SchoolYear) IsZero() bool
- func (x *SchoolYear) MarshalJSON() ([]byte, error)
- func (*SchoolYear) ProtoMessage()
- func (x *SchoolYear) ProtoReflect() protoreflect.Message
- func (x *SchoolYear) Reset()
- func (x *SchoolYear) Scan(src interface{}) error
- func (x *SchoolYear) ShortName() string
- func (x *SchoolYear) String() string
- func (x *SchoolYear) UnmarshalJSON(data []byte) error
- func (x *SchoolYear) Value() (driver.Value, error)
- type Section
- func (*Section) Descriptor() ([]byte, []int)deprecated
- func (x *Section) GetEndTime() *timestamppb.Timestamp
- func (x *Section) GetSection() int32
- func (x *Section) GetStartTime() *timestamppb.Timestamp
- func (*Section) ProtoMessage()
- func (x *Section) ProtoReflect() protoreflect.Message
- func (x *Section) Reset()
- func (x *Section) String() string
- type SectionReader
- type Semester
- func (*Semester) Descriptor() ([]byte, []int)deprecated
- func (x *Semester) FullName() string
- func (x *Semester) GetNum() int32
- func (*Semester) GormDataType() string
- func (x *Semester) IsZero() bool
- func (x *Semester) MarshalJSON() ([]byte, error)
- func (*Semester) ProtoMessage()
- func (x *Semester) ProtoReflect() protoreflect.Message
- func (x *Semester) Reset()
- func (x *Semester) Scan(src interface{}) error
- func (x *Semester) ShortName() string
- func (x *Semester) String() string
- func (x *Semester) UnmarshalJSON(data []byte) error
- func (x *Semester) Value() (driver.Value, error)
- type TimeToSchoolDater
- type Timeable
Constants ¶
This section is empty.
Variables ¶
View Source
var File_campusapis_schoolTime_defined_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type SchoolDate ¶
type SchoolDate struct { SchoolYear *SchoolYear Semester *Semester Week int32 // contains filtered or unexported fields }
func (SchoolDate) Date ¶
func (d SchoolDate) Date() *types.Date
func (SchoolDate) FromTime ¶
func (SchoolDate) FromTime(t time.Time, handler TimeToSchoolDater) (*SchoolDate, error)
func (SchoolDate) Time ¶
func (d SchoolDate) Time() time.Time
func (SchoolDate) Valid ¶
func (d SchoolDate) Valid() bool
type SchoolDateToDater ¶
type SchoolDateToDater interface {
GetSchoolDateFrom(schoolDate *SchoolDate, weekDay int32) (*types.Date, error)
}
SchoolDateToDater 从学校日期获得日期
type SchoolYear ¶
type SchoolYear struct { // 学年开始年,如:2021-2022 学年为 2021 Year int32 `protobuf:"varint,1,opt,name=Year,proto3" json:"Year,omitempty"` // contains filtered or unexported fields }
学年
func CastSchoolYear ¶
func CastSchoolYear(in interface{}) *SchoolYear
func (*SchoolYear) Descriptor
deprecated
func (*SchoolYear) Descriptor() ([]byte, []int)
Deprecated: Use SchoolYear.ProtoReflect.Descriptor instead.
func (*SchoolYear) FullName ¶
func (x *SchoolYear) FullName() string
func (*SchoolYear) GetYear ¶
func (x *SchoolYear) GetYear() int32
func (*SchoolYear) GormDataType ¶
func (*SchoolYear) GormDataType() string
func (*SchoolYear) IsZero ¶
func (x *SchoolYear) IsZero() bool
func (*SchoolYear) MarshalJSON ¶
func (x *SchoolYear) MarshalJSON() ([]byte, error)
func (*SchoolYear) ProtoMessage ¶
func (*SchoolYear) ProtoMessage()
func (*SchoolYear) ProtoReflect ¶
func (x *SchoolYear) ProtoReflect() protoreflect.Message
func (*SchoolYear) Reset ¶
func (x *SchoolYear) Reset()
func (*SchoolYear) Scan ¶
func (x *SchoolYear) Scan(src interface{}) error
func (*SchoolYear) ShortName ¶
func (x *SchoolYear) ShortName() string
func (*SchoolYear) String ¶
func (x *SchoolYear) String() string
func (*SchoolYear) UnmarshalJSON ¶
func (x *SchoolYear) UnmarshalJSON(data []byte) error
type Section ¶
type Section struct { // 第几节 Section int32 `protobuf:"varint,1,opt,name=Section,proto3" json:"Section,omitempty"` // 本节开始时间 StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=StartTime,proto3" json:"StartTime,omitempty"` // 本节结束时间 EndTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=EndTime,proto3" json:"EndTime,omitempty"` // contains filtered or unexported fields }
节次信息
func (*Section) Descriptor
deprecated
func (*Section) GetEndTime ¶
func (x *Section) GetEndTime() *timestamppb.Timestamp
func (*Section) GetSection ¶
func (*Section) GetStartTime ¶
func (x *Section) GetStartTime() *timestamppb.Timestamp
func (*Section) ProtoMessage ¶
func (*Section) ProtoMessage()
func (*Section) ProtoReflect ¶
func (x *Section) ProtoReflect() protoreflect.Message
type SectionReader ¶
type Semester ¶
type Semester struct { Num int32 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` // contains filtered or unexported fields }
学期
func CastSemester ¶
func CastSemester(in interface{}) *Semester
func (*Semester) Descriptor
deprecated
func (*Semester) GormDataType ¶
func (*Semester) MarshalJSON ¶
func (*Semester) ProtoMessage ¶
func (*Semester) ProtoMessage()
func (*Semester) ProtoReflect ¶
func (x *Semester) ProtoReflect() protoreflect.Message
func (*Semester) UnmarshalJSON ¶
type TimeToSchoolDater ¶
type TimeToSchoolDater interface {
GetSchoolDateFromTime(t time.Time) *SchoolDate
}
TimeToSchoolDater 学校日期接口,从时间获得学年、学期
type Timeable ¶
type Timeable interface { GetSchoolDate() *SchoolDate GetSectionReader() SectionReader GetSchoolDateToDater() SchoolDateToDater }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.