v1

package
v0.0.0-...-361a7e9 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Classer_GetClass_FullMethodName                = "/classer.v1.Classer/GetClass"
	Classer_AddClass_FullMethodName                = "/classer.v1.Classer/AddClass"
	Classer_DeleteClass_FullMethodName             = "/classer.v1.Classer/DeleteClass"
	Classer_UpdateClass_FullMethodName             = "/classer.v1.Classer/UpdateClass"
	Classer_GetRecycleBinClassInfos_FullMethodName = "/classer.v1.Classer/GetRecycleBinClassInfos"
	Classer_RecoverClass_FullMethodName            = "/classer.v1.Classer/RecoverClass"
	Classer_GetAllClassInfo_FullMethodName         = "/classer.v1.Classer/GetAllClassInfo"
)
View Source
const OperationClasserAddClass = "/classer.v1.Classer/AddClass"
View Source
const OperationClasserDeleteClass = "/classer.v1.Classer/DeleteClass"
View Source
const OperationClasserGetClass = "/classer.v1.Classer/GetClass"
View Source
const OperationClasserGetRecycleBinClassInfos = "/classer.v1.Classer/GetRecycleBinClassInfos"
View Source
const OperationClasserRecoverClass = "/classer.v1.Classer/RecoverClass"
View Source
const OperationClasserUpdateClass = "/classer.v1.Classer/UpdateClass"

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0:  "DB_NOTFOUND",
		1:  "DB_FINDERR",
		2:  "DB_UPDATEERR",
		3:  "Param_Err",
		4:  "DB_SAVEERROR",
		5:  "DB_DELETEERROR",
		6:  "Crawler_Error",
		7:  "CCNULogin_Error",
		8:  "SCIDNOTEXIST_Erroe",
		9:  "RECYCLEBINDONOTHAVETHECLASS",
		10: "RECOVERFAILED",
	}
	ErrorReason_value = map[string]int32{
		"DB_NOTFOUND":                 0,
		"DB_FINDERR":                  1,
		"DB_UPDATEERR":                2,
		"Param_Err":                   3,
		"DB_SAVEERROR":                4,
		"DB_DELETEERROR":              5,
		"Crawler_Error":               6,
		"CCNULogin_Error":             7,
		"SCIDNOTEXIST_Erroe":          8,
		"RECYCLEBINDONOTHAVETHECLASS": 9,
		"RECOVERFAILED":               10,
	}
)

Enum value maps for ErrorReason.

View Source
var Classer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "classer.v1.Classer",
	HandlerType: (*ClasserServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetClass",
			Handler:    _Classer_GetClass_Handler,
		},
		{
			MethodName: "AddClass",
			Handler:    _Classer_AddClass_Handler,
		},
		{
			MethodName: "DeleteClass",
			Handler:    _Classer_DeleteClass_Handler,
		},
		{
			MethodName: "UpdateClass",
			Handler:    _Classer_UpdateClass_Handler,
		},
		{
			MethodName: "GetRecycleBinClassInfos",
			Handler:    _Classer_GetRecycleBinClassInfos_Handler,
		},
		{
			MethodName: "RecoverClass",
			Handler:    _Classer_RecoverClass_Handler,
		},
		{
			MethodName: "GetAllClassInfo",
			Handler:    _Classer_GetAllClassInfo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "classer/v1/classer.proto",
}

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

View Source
var File_classer_v1_classer_proto protoreflect.FileDescriptor
View Source
var File_classer_v1_error_reason_proto protoreflect.FileDescriptor

Functions

func ErrorCCNULoginError

func ErrorCCNULoginError(format string, args ...interface{}) *errors.Error

func ErrorCrawlerError

func ErrorCrawlerError(format string, args ...interface{}) *errors.Error

func ErrorDbDeleteerror

func ErrorDbDeleteerror(format string, args ...interface{}) *errors.Error

func ErrorDbFinderr

func ErrorDbFinderr(format string, args ...interface{}) *errors.Error

func ErrorDbNotfound

func ErrorDbNotfound(format string, args ...interface{}) *errors.Error

func ErrorDbSaveerror

func ErrorDbSaveerror(format string, args ...interface{}) *errors.Error

func ErrorDbUpdateerr

func ErrorDbUpdateerr(format string, args ...interface{}) *errors.Error

func ErrorParamErr

func ErrorParamErr(format string, args ...interface{}) *errors.Error

func ErrorRecoverfailed

func ErrorRecoverfailed(format string, args ...interface{}) *errors.Error

func ErrorRecyclebindonothavetheclass

func ErrorRecyclebindonothavetheclass(format string, args ...interface{}) *errors.Error

func ErrorScidnotexistErroe

func ErrorScidnotexistErroe(format string, args ...interface{}) *errors.Error

func IsCCNULoginError

func IsCCNULoginError(err error) bool

func IsCrawlerError

func IsCrawlerError(err error) bool

func IsDbDeleteerror

func IsDbDeleteerror(err error) bool

func IsDbFinderr

func IsDbFinderr(err error) bool

func IsDbNotfound

func IsDbNotfound(err error) bool

func IsDbSaveerror

func IsDbSaveerror(err error) bool

func IsDbUpdateerr

func IsDbUpdateerr(err error) bool

func IsParamErr

func IsParamErr(err error) bool

func IsRecoverfailed

func IsRecoverfailed(err error) bool

func IsRecyclebindonothavetheclass

func IsRecyclebindonothavetheclass(err error) bool

func IsScidnotexistErroe

func IsScidnotexistErroe(err error) bool

func RegisterClasserHTTPServer

func RegisterClasserHTTPServer(s *http.Server, srv ClasserHTTPServer)

func RegisterClasserServer

func RegisterClasserServer(s grpc.ServiceRegistrar, srv ClasserServer)

Types

type AddClassRequest

type AddClassRequest struct {

	// 学号
	StuId string `protobuf:"bytes,1,opt,name=stu_id,proto3" json:"stu_id,omitempty"`
	// 课程名称
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// 第几节 '形如 "1-3","1-1"'
	DurClass string `protobuf:"bytes,3,opt,name=dur_class,proto3" json:"dur_class,omitempty"`
	// 地点
	Where string `protobuf:"bytes,4,opt,name=where,proto3" json:"where,omitempty"`
	// 教师
	Teacher string `protobuf:"bytes,5,opt,name=teacher,proto3" json:"teacher,omitempty"`
	// 哪些周
	Weeks int64 `protobuf:"varint,6,opt,name=weeks,proto3" json:"weeks,omitempty"`
	// 学期
	Semester string `protobuf:"bytes,7,opt,name=semester,proto3" json:"semester,omitempty"`
	// 学年
	Year string `protobuf:"bytes,8,opt,name=year,proto3" json:"year,omitempty"`
	// 星期几
	Day int64 `protobuf:"varint,9,opt,name=day,proto3" json:"day,omitempty"`
	// 学分
	Credit *float64 `protobuf:"fixed64,10,opt,name=credit,proto3,oneof" json:"credit,omitempty"`
	// contains filtered or unexported fields
}

func (*AddClassRequest) Descriptor deprecated

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

Deprecated: Use AddClassRequest.ProtoReflect.Descriptor instead.

func (*AddClassRequest) GetCredit

func (x *AddClassRequest) GetCredit() float64

func (*AddClassRequest) GetDay

func (x *AddClassRequest) GetDay() int64

func (*AddClassRequest) GetDurClass

func (x *AddClassRequest) GetDurClass() string

func (*AddClassRequest) GetName

func (x *AddClassRequest) GetName() string

func (*AddClassRequest) GetSemester

func (x *AddClassRequest) GetSemester() string

func (*AddClassRequest) GetStuId

func (x *AddClassRequest) GetStuId() string

func (*AddClassRequest) GetTeacher

func (x *AddClassRequest) GetTeacher() string

func (*AddClassRequest) GetWeeks

func (x *AddClassRequest) GetWeeks() int64

func (*AddClassRequest) GetWhere

func (x *AddClassRequest) GetWhere() string

func (*AddClassRequest) GetYear

func (x *AddClassRequest) GetYear() string

func (*AddClassRequest) ProtoMessage

func (*AddClassRequest) ProtoMessage()

func (*AddClassRequest) ProtoReflect

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

func (*AddClassRequest) Reset

func (x *AddClassRequest) Reset()

func (*AddClassRequest) String

func (x *AddClassRequest) String() string

func (*AddClassRequest) Validate

func (m *AddClassRequest) Validate() error

Validate checks the field values on AddClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*AddClassRequest) ValidateAll

func (m *AddClassRequest) ValidateAll() error

ValidateAll checks the field values on AddClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AddClassRequestMultiError, or nil if none found.

type AddClassRequestMultiError

type AddClassRequestMultiError []error

AddClassRequestMultiError is an error wrapping multiple validation errors returned by AddClassRequest.ValidateAll() if the designated constraints aren't met.

func (AddClassRequestMultiError) AllErrors

func (m AddClassRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AddClassRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type AddClassRequestValidationError

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

AddClassRequestValidationError is the validation error returned by AddClassRequest.Validate if the designated constraints aren't met.

func (AddClassRequestValidationError) Cause

Cause function returns cause value.

func (AddClassRequestValidationError) Error

Error satisfies the builtin error interface

func (AddClassRequestValidationError) ErrorName

func (e AddClassRequestValidationError) ErrorName() string

ErrorName returns error name.

func (AddClassRequestValidationError) Field

Field function returns field value.

func (AddClassRequestValidationError) Key

Key function returns key value.

func (AddClassRequestValidationError) Reason

Reason function returns reason value.

type AddClassResponse

type AddClassResponse struct {

	// 添加的课程ID
	Id  string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*AddClassResponse) Descriptor deprecated

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

Deprecated: Use AddClassResponse.ProtoReflect.Descriptor instead.

func (*AddClassResponse) GetId

func (x *AddClassResponse) GetId() string

func (*AddClassResponse) GetMsg

func (x *AddClassResponse) GetMsg() string

func (*AddClassResponse) ProtoMessage

func (*AddClassResponse) ProtoMessage()

func (*AddClassResponse) ProtoReflect

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

func (*AddClassResponse) Reset

func (x *AddClassResponse) Reset()

func (*AddClassResponse) String

func (x *AddClassResponse) String() string

func (*AddClassResponse) Validate

func (m *AddClassResponse) Validate() error

Validate checks the field values on AddClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*AddClassResponse) ValidateAll

func (m *AddClassResponse) ValidateAll() error

ValidateAll checks the field values on AddClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AddClassResponseMultiError, or nil if none found.

type AddClassResponseMultiError

type AddClassResponseMultiError []error

AddClassResponseMultiError is an error wrapping multiple validation errors returned by AddClassResponse.ValidateAll() if the designated constraints aren't met.

func (AddClassResponseMultiError) AllErrors

func (m AddClassResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AddClassResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type AddClassResponseValidationError

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

AddClassResponseValidationError is the validation error returned by AddClassResponse.Validate if the designated constraints aren't met.

func (AddClassResponseValidationError) Cause

Cause function returns cause value.

func (AddClassResponseValidationError) Error

Error satisfies the builtin error interface

func (AddClassResponseValidationError) ErrorName

ErrorName returns error name.

func (AddClassResponseValidationError) Field

Field function returns field value.

func (AddClassResponseValidationError) Key

Key function returns key value.

func (AddClassResponseValidationError) Reason

Reason function returns reason value.

type Class

type Class struct {

	// 课程信息
	Info *ClassInfo `protobuf:"bytes,1,opt,name=info,json=class_info,proto3" json:"info,omitempty"`
	// 是否是本周
	Thisweek bool `protobuf:"varint,2,opt,name=thisweek,json=this_week,proto3" json:"thisweek,omitempty"`
	// contains filtered or unexported fields
}

func (*Class) Descriptor deprecated

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

Deprecated: Use Class.ProtoReflect.Descriptor instead.

func (*Class) GetInfo

func (x *Class) GetInfo() *ClassInfo

func (*Class) GetThisweek

func (x *Class) GetThisweek() bool

func (*Class) ProtoMessage

func (*Class) ProtoMessage()

func (*Class) ProtoReflect

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

func (*Class) Reset

func (x *Class) Reset()

func (*Class) String

func (x *Class) String() string

func (*Class) Validate

func (m *Class) Validate() error

Validate checks the field values on Class with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Class) ValidateAll

func (m *Class) ValidateAll() error

ValidateAll checks the field values on Class with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ClassMultiError, or nil if none found.

type ClassInfo

type ClassInfo struct {

	// 星期几
	Day int64 `protobuf:"varint,1,opt,name=day,proto3" json:"day,omitempty"`
	// 任课教师
	Teacher string `protobuf:"bytes,2,opt,name=teacher,proto3" json:"teacher,omitempty"`
	// 上课地点
	Where string `protobuf:"bytes,3,opt,name=where,proto3" json:"where,omitempty"`
	// 上课是第几节(如1-2,3,4)
	ClassWhen string `protobuf:"bytes,4,opt,name=class_when,proto3" json:"class_when,omitempty"`
	// 上课的周数(文字描述,如1-9周)
	WeekDuration string `protobuf:"bytes,5,opt,name=week_duration,proto3" json:"week_duration,omitempty"`
	// 课程名称
	Classname string `protobuf:"bytes,6,opt,name=classname,proto3" json:"classname,omitempty"`
	// 学分
	Credit float64 `protobuf:"fixed64,7,opt,name=credit,proto3" json:"credit,omitempty"`
	// 哪些周 这个是一个64位的数字,如果有第一周,那么该数的二进制从右往左的第一位为1,以此类推
	// 比如该数的二进制是000000101,就代表第一周和第三周有课.
	Weeks int64 `protobuf:"varint,9,opt,name=weeks,proto3" json:"weeks,omitempty"`
	// 学期 "1"代表第一学期,"2"代表第二学期,"3"代表第三学期
	Semester string `protobuf:"bytes,10,opt,name=semester,proto3" json:"semester,omitempty"`
	// 学年  "2024" 代表"2024-2025学年"
	Year string `protobuf:"bytes,11,opt,name=year,proto3" json:"year,omitempty"`
	// 课程唯一标识id
	Id string `protobuf:"bytes,12,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*ClassInfo) Descriptor deprecated

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

Deprecated: Use ClassInfo.ProtoReflect.Descriptor instead.

func (*ClassInfo) GetClassWhen

func (x *ClassInfo) GetClassWhen() string

func (*ClassInfo) GetClassname

func (x *ClassInfo) GetClassname() string

func (*ClassInfo) GetCredit

func (x *ClassInfo) GetCredit() float64

func (*ClassInfo) GetDay

func (x *ClassInfo) GetDay() int64

func (*ClassInfo) GetId

func (x *ClassInfo) GetId() string

func (*ClassInfo) GetSemester

func (x *ClassInfo) GetSemester() string

func (*ClassInfo) GetTeacher

func (x *ClassInfo) GetTeacher() string

func (*ClassInfo) GetWeekDuration

func (x *ClassInfo) GetWeekDuration() string

func (*ClassInfo) GetWeeks

func (x *ClassInfo) GetWeeks() int64

func (*ClassInfo) GetWhere

func (x *ClassInfo) GetWhere() string

func (*ClassInfo) GetYear

func (x *ClassInfo) GetYear() string

func (*ClassInfo) ProtoMessage

func (*ClassInfo) ProtoMessage()

func (*ClassInfo) ProtoReflect

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

func (*ClassInfo) Reset

func (x *ClassInfo) Reset()

func (*ClassInfo) String

func (x *ClassInfo) String() string

func (*ClassInfo) Validate

func (m *ClassInfo) Validate() error

Validate checks the field values on ClassInfo with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ClassInfo) ValidateAll

func (m *ClassInfo) ValidateAll() error

ValidateAll checks the field values on ClassInfo with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ClassInfoMultiError, or nil if none found.

type ClassInfoMultiError

type ClassInfoMultiError []error

ClassInfoMultiError is an error wrapping multiple validation errors returned by ClassInfo.ValidateAll() if the designated constraints aren't met.

func (ClassInfoMultiError) AllErrors

func (m ClassInfoMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ClassInfoMultiError) Error

func (m ClassInfoMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ClassInfoValidationError

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

ClassInfoValidationError is the validation error returned by ClassInfo.Validate if the designated constraints aren't met.

func (ClassInfoValidationError) Cause

func (e ClassInfoValidationError) Cause() error

Cause function returns cause value.

func (ClassInfoValidationError) Error

func (e ClassInfoValidationError) Error() string

Error satisfies the builtin error interface

func (ClassInfoValidationError) ErrorName

func (e ClassInfoValidationError) ErrorName() string

ErrorName returns error name.

func (ClassInfoValidationError) Field

func (e ClassInfoValidationError) Field() string

Field function returns field value.

func (ClassInfoValidationError) Key

Key function returns key value.

func (ClassInfoValidationError) Reason

func (e ClassInfoValidationError) Reason() string

Reason function returns reason value.

type ClassMultiError

type ClassMultiError []error

ClassMultiError is an error wrapping multiple validation errors returned by Class.ValidateAll() if the designated constraints aren't met.

func (ClassMultiError) AllErrors

func (m ClassMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ClassMultiError) Error

func (m ClassMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ClassValidationError

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

ClassValidationError is the validation error returned by Class.Validate if the designated constraints aren't met.

func (ClassValidationError) Cause

func (e ClassValidationError) Cause() error

Cause function returns cause value.

func (ClassValidationError) Error

func (e ClassValidationError) Error() string

Error satisfies the builtin error interface

func (ClassValidationError) ErrorName

func (e ClassValidationError) ErrorName() string

ErrorName returns error name.

func (ClassValidationError) Field

func (e ClassValidationError) Field() string

Field function returns field value.

func (ClassValidationError) Key

func (e ClassValidationError) Key() bool

Key function returns key value.

func (ClassValidationError) Reason

func (e ClassValidationError) Reason() string

Reason function returns reason value.

type ClasserClient

type ClasserClient interface {
	// 获取课表
	GetClass(ctx context.Context, in *GetClassRequest, opts ...grpc.CallOption) (*GetClassResponse, error)
	// 添加课程
	AddClass(ctx context.Context, in *AddClassRequest, opts ...grpc.CallOption) (*AddClassResponse, error)
	// 删除课程
	DeleteClass(ctx context.Context, in *DeleteClassRequest, opts ...grpc.CallOption) (*DeleteClassResponse, error)
	// 更新课程
	UpdateClass(ctx context.Context, in *UpdateClassRequest, opts ...grpc.CallOption) (*UpdateClassResponse, error)
	// 获取回收站的课程(回收站的课程只能保存2个月)
	GetRecycleBinClassInfos(ctx context.Context, in *GetRecycleBinClassRequest, opts ...grpc.CallOption) (*GetRecycleBinClassResponse, error)
	// 恢复课程
	RecoverClass(ctx context.Context, in *RecoverClassRequest, opts ...grpc.CallOption) (*RecoverClassResponse, error)
	// 获取所有课程信息(为其他服务设置的)
	GetAllClassInfo(ctx context.Context, in *GetAllClassInfoRequest, opts ...grpc.CallOption) (*GetAllClassInfoResponse, error)
}

ClasserClient is the client API for Classer 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 NewClasserClient

func NewClasserClient(cc grpc.ClientConnInterface) ClasserClient

type ClasserHTTPClient

type ClasserHTTPClient interface {
	AddClass(ctx context.Context, req *AddClassRequest, opts ...http.CallOption) (rsp *AddClassResponse, err error)
	DeleteClass(ctx context.Context, req *DeleteClassRequest, opts ...http.CallOption) (rsp *DeleteClassResponse, err error)
	GetClass(ctx context.Context, req *GetClassRequest, opts ...http.CallOption) (rsp *GetClassResponse, err error)
	GetRecycleBinClassInfos(ctx context.Context, req *GetRecycleBinClassRequest, opts ...http.CallOption) (rsp *GetRecycleBinClassResponse, err error)
	RecoverClass(ctx context.Context, req *RecoverClassRequest, opts ...http.CallOption) (rsp *RecoverClassResponse, err error)
	UpdateClass(ctx context.Context, req *UpdateClassRequest, opts ...http.CallOption) (rsp *UpdateClassResponse, err error)
}

func NewClasserHTTPClient

func NewClasserHTTPClient(client *http.Client) ClasserHTTPClient

type ClasserHTTPClientImpl

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

func (*ClasserHTTPClientImpl) AddClass

func (*ClasserHTTPClientImpl) DeleteClass

func (*ClasserHTTPClientImpl) GetClass

func (*ClasserHTTPClientImpl) GetRecycleBinClassInfos

func (*ClasserHTTPClientImpl) RecoverClass

func (*ClasserHTTPClientImpl) UpdateClass

type ClasserHTTPServer

type ClasserHTTPServer interface {
	// AddClass添加课程
	AddClass(context.Context, *AddClassRequest) (*AddClassResponse, error)
	// DeleteClass删除课程
	DeleteClass(context.Context, *DeleteClassRequest) (*DeleteClassResponse, error)
	// GetClass获取课表
	GetClass(context.Context, *GetClassRequest) (*GetClassResponse, error)
	// GetRecycleBinClassInfos获取回收站的课程(回收站的课程只能保存2个月)
	GetRecycleBinClassInfos(context.Context, *GetRecycleBinClassRequest) (*GetRecycleBinClassResponse, error)
	// RecoverClass恢复课程
	RecoverClass(context.Context, *RecoverClassRequest) (*RecoverClassResponse, error)
	// UpdateClass更新课程
	UpdateClass(context.Context, *UpdateClassRequest) (*UpdateClassResponse, error)
}

type ClasserServer

type ClasserServer interface {
	// 获取课表
	GetClass(context.Context, *GetClassRequest) (*GetClassResponse, error)
	// 添加课程
	AddClass(context.Context, *AddClassRequest) (*AddClassResponse, error)
	// 删除课程
	DeleteClass(context.Context, *DeleteClassRequest) (*DeleteClassResponse, error)
	// 更新课程
	UpdateClass(context.Context, *UpdateClassRequest) (*UpdateClassResponse, error)
	// 获取回收站的课程(回收站的课程只能保存2个月)
	GetRecycleBinClassInfos(context.Context, *GetRecycleBinClassRequest) (*GetRecycleBinClassResponse, error)
	// 恢复课程
	RecoverClass(context.Context, *RecoverClassRequest) (*RecoverClassResponse, error)
	// 获取所有课程信息(为其他服务设置的)
	GetAllClassInfo(context.Context, *GetAllClassInfoRequest) (*GetAllClassInfoResponse, error)
	// contains filtered or unexported methods
}

ClasserServer is the server API for Classer service. All implementations must embed UnimplementedClasserServer for forward compatibility.

type DeleteClassRequest

type DeleteClassRequest struct {

	// 要被删的课程id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// 学号
	StuId string `protobuf:"bytes,2,opt,name=stuId,json=stu_id,proto3" json:"stuId,omitempty"`
	// 学年  "2024" -> 代表"2024-2025学年"
	Year string `protobuf:"bytes,3,opt,name=year,proto3" json:"year,omitempty"`
	// 学期 "1"代表第一学期,"2"代表第二学期,"3"代表第三学期
	Semester string `protobuf:"bytes,4,opt,name=semester,proto3" json:"semester,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteClassRequest) Descriptor deprecated

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

Deprecated: Use DeleteClassRequest.ProtoReflect.Descriptor instead.

func (*DeleteClassRequest) GetId

func (x *DeleteClassRequest) GetId() string

func (*DeleteClassRequest) GetSemester

func (x *DeleteClassRequest) GetSemester() string

func (*DeleteClassRequest) GetStuId

func (x *DeleteClassRequest) GetStuId() string

func (*DeleteClassRequest) GetYear

func (x *DeleteClassRequest) GetYear() string

func (*DeleteClassRequest) ProtoMessage

func (*DeleteClassRequest) ProtoMessage()

func (*DeleteClassRequest) ProtoReflect

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

func (*DeleteClassRequest) Reset

func (x *DeleteClassRequest) Reset()

func (*DeleteClassRequest) String

func (x *DeleteClassRequest) String() string

func (*DeleteClassRequest) Validate

func (m *DeleteClassRequest) Validate() error

Validate checks the field values on DeleteClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DeleteClassRequest) ValidateAll

func (m *DeleteClassRequest) ValidateAll() error

ValidateAll checks the field values on DeleteClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeleteClassRequestMultiError, or nil if none found.

type DeleteClassRequestMultiError

type DeleteClassRequestMultiError []error

DeleteClassRequestMultiError is an error wrapping multiple validation errors returned by DeleteClassRequest.ValidateAll() if the designated constraints aren't met.

func (DeleteClassRequestMultiError) AllErrors

func (m DeleteClassRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeleteClassRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type DeleteClassRequestValidationError

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

DeleteClassRequestValidationError is the validation error returned by DeleteClassRequest.Validate if the designated constraints aren't met.

func (DeleteClassRequestValidationError) Cause

Cause function returns cause value.

func (DeleteClassRequestValidationError) Error

Error satisfies the builtin error interface

func (DeleteClassRequestValidationError) ErrorName

ErrorName returns error name.

func (DeleteClassRequestValidationError) Field

Field function returns field value.

func (DeleteClassRequestValidationError) Key

Key function returns key value.

func (DeleteClassRequestValidationError) Reason

Reason function returns reason value.

type DeleteClassResponse

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

func (*DeleteClassResponse) Descriptor deprecated

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

Deprecated: Use DeleteClassResponse.ProtoReflect.Descriptor instead.

func (*DeleteClassResponse) GetMsg

func (x *DeleteClassResponse) GetMsg() string

func (*DeleteClassResponse) ProtoMessage

func (*DeleteClassResponse) ProtoMessage()

func (*DeleteClassResponse) ProtoReflect

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

func (*DeleteClassResponse) Reset

func (x *DeleteClassResponse) Reset()

func (*DeleteClassResponse) String

func (x *DeleteClassResponse) String() string

func (*DeleteClassResponse) Validate

func (m *DeleteClassResponse) Validate() error

Validate checks the field values on DeleteClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*DeleteClassResponse) ValidateAll

func (m *DeleteClassResponse) ValidateAll() error

ValidateAll checks the field values on DeleteClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeleteClassResponseMultiError, or nil if none found.

type DeleteClassResponseMultiError

type DeleteClassResponseMultiError []error

DeleteClassResponseMultiError is an error wrapping multiple validation errors returned by DeleteClassResponse.ValidateAll() if the designated constraints aren't met.

func (DeleteClassResponseMultiError) AllErrors

func (m DeleteClassResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DeleteClassResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type DeleteClassResponseValidationError

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

DeleteClassResponseValidationError is the validation error returned by DeleteClassResponse.Validate if the designated constraints aren't met.

func (DeleteClassResponseValidationError) Cause

Cause function returns cause value.

func (DeleteClassResponseValidationError) Error

Error satisfies the builtin error interface

func (DeleteClassResponseValidationError) ErrorName

ErrorName returns error name.

func (DeleteClassResponseValidationError) Field

Field function returns field value.

func (DeleteClassResponseValidationError) Key

Key function returns key value.

func (DeleteClassResponseValidationError) Reason

Reason function returns reason value.

type ErrorReason

type ErrorReason int32
const (
	ErrorReason_DB_NOTFOUND                 ErrorReason = 0
	ErrorReason_DB_FINDERR                  ErrorReason = 1
	ErrorReason_DB_UPDATEERR                ErrorReason = 2
	ErrorReason_Param_Err                   ErrorReason = 3
	ErrorReason_DB_SAVEERROR                ErrorReason = 4
	ErrorReason_DB_DELETEERROR              ErrorReason = 5
	ErrorReason_Crawler_Error               ErrorReason = 6
	ErrorReason_CCNULogin_Error             ErrorReason = 7
	ErrorReason_SCIDNOTEXIST_Erroe          ErrorReason = 8
	ErrorReason_RECYCLEBINDONOTHAVETHECLASS ErrorReason = 9
	ErrorReason_RECOVERFAILED               ErrorReason = 10
)

func (ErrorReason) Descriptor

func (ErrorReason) Enum

func (x ErrorReason) Enum() *ErrorReason

func (ErrorReason) EnumDescriptor deprecated

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

Deprecated: Use ErrorReason.Descriptor instead.

func (ErrorReason) Number

func (x ErrorReason) Number() protoreflect.EnumNumber

func (ErrorReason) String

func (x ErrorReason) String() string

func (ErrorReason) Type

type GetAllClassInfoRequest

type GetAllClassInfoRequest struct {

	// 学年  "2024" 代表"2024-2025学年"
	Year string `protobuf:"bytes,3,opt,name=year,proto3" json:"year,omitempty"`
	// 学期 "1"代表第一学期,"2"代表第二学期,"3"代表第三学期
	Semester string `protobuf:"bytes,4,opt,name=semester,proto3" json:"semester,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAllClassInfoRequest) Descriptor deprecated

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

Deprecated: Use GetAllClassInfoRequest.ProtoReflect.Descriptor instead.

func (*GetAllClassInfoRequest) GetSemester

func (x *GetAllClassInfoRequest) GetSemester() string

func (*GetAllClassInfoRequest) GetYear

func (x *GetAllClassInfoRequest) GetYear() string

func (*GetAllClassInfoRequest) ProtoMessage

func (*GetAllClassInfoRequest) ProtoMessage()

func (*GetAllClassInfoRequest) ProtoReflect

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

func (*GetAllClassInfoRequest) Reset

func (x *GetAllClassInfoRequest) Reset()

func (*GetAllClassInfoRequest) String

func (x *GetAllClassInfoRequest) String() string

func (*GetAllClassInfoRequest) Validate

func (m *GetAllClassInfoRequest) Validate() error

Validate checks the field values on GetAllClassInfoRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetAllClassInfoRequest) ValidateAll

func (m *GetAllClassInfoRequest) ValidateAll() error

ValidateAll checks the field values on GetAllClassInfoRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetAllClassInfoRequestMultiError, or nil if none found.

type GetAllClassInfoRequestMultiError

type GetAllClassInfoRequestMultiError []error

GetAllClassInfoRequestMultiError is an error wrapping multiple validation errors returned by GetAllClassInfoRequest.ValidateAll() if the designated constraints aren't met.

func (GetAllClassInfoRequestMultiError) AllErrors

func (m GetAllClassInfoRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetAllClassInfoRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetAllClassInfoRequestValidationError

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

GetAllClassInfoRequestValidationError is the validation error returned by GetAllClassInfoRequest.Validate if the designated constraints aren't met.

func (GetAllClassInfoRequestValidationError) Cause

Cause function returns cause value.

func (GetAllClassInfoRequestValidationError) Error

Error satisfies the builtin error interface

func (GetAllClassInfoRequestValidationError) ErrorName

ErrorName returns error name.

func (GetAllClassInfoRequestValidationError) Field

Field function returns field value.

func (GetAllClassInfoRequestValidationError) Key

Key function returns key value.

func (GetAllClassInfoRequestValidationError) Reason

Reason function returns reason value.

type GetAllClassInfoResponse

type GetAllClassInfoResponse struct {
	ClassInfos []*ClassInfo `protobuf:"bytes,1,rep,name=class_infos,proto3" json:"class_infos,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAllClassInfoResponse) Descriptor deprecated

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

Deprecated: Use GetAllClassInfoResponse.ProtoReflect.Descriptor instead.

func (*GetAllClassInfoResponse) GetClassInfos

func (x *GetAllClassInfoResponse) GetClassInfos() []*ClassInfo

func (*GetAllClassInfoResponse) ProtoMessage

func (*GetAllClassInfoResponse) ProtoMessage()

func (*GetAllClassInfoResponse) ProtoReflect

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

func (*GetAllClassInfoResponse) Reset

func (x *GetAllClassInfoResponse) Reset()

func (*GetAllClassInfoResponse) String

func (x *GetAllClassInfoResponse) String() string

func (*GetAllClassInfoResponse) Validate

func (m *GetAllClassInfoResponse) Validate() error

Validate checks the field values on GetAllClassInfoResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetAllClassInfoResponse) ValidateAll

func (m *GetAllClassInfoResponse) ValidateAll() error

ValidateAll checks the field values on GetAllClassInfoResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetAllClassInfoResponseMultiError, or nil if none found.

type GetAllClassInfoResponseMultiError

type GetAllClassInfoResponseMultiError []error

GetAllClassInfoResponseMultiError is an error wrapping multiple validation errors returned by GetAllClassInfoResponse.ValidateAll() if the designated constraints aren't met.

func (GetAllClassInfoResponseMultiError) AllErrors

func (m GetAllClassInfoResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetAllClassInfoResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetAllClassInfoResponseValidationError

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

GetAllClassInfoResponseValidationError is the validation error returned by GetAllClassInfoResponse.Validate if the designated constraints aren't met.

func (GetAllClassInfoResponseValidationError) Cause

Cause function returns cause value.

func (GetAllClassInfoResponseValidationError) Error

Error satisfies the builtin error interface

func (GetAllClassInfoResponseValidationError) ErrorName

ErrorName returns error name.

func (GetAllClassInfoResponseValidationError) Field

Field function returns field value.

func (GetAllClassInfoResponseValidationError) Key

Key function returns key value.

func (GetAllClassInfoResponseValidationError) Reason

Reason function returns reason value.

type GetClassRequest

type GetClassRequest struct {

	// 周几的课表
	Week int64 `protobuf:"varint,1,opt,name=week,proto3" json:"week,omitempty"`
	// 学号
	StuId string `protobuf:"bytes,2,opt,name=stu_id,proto3" json:"stu_id,omitempty"`
	// 学期
	Semester string `protobuf:"bytes,3,opt,name=semester,proto3" json:"semester,omitempty"`
	// 学年
	Year string `protobuf:"bytes,4,opt,name=year,proto3" json:"year,omitempty"`
	// contains filtered or unexported fields
}

func (*GetClassRequest) Descriptor deprecated

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

Deprecated: Use GetClassRequest.ProtoReflect.Descriptor instead.

func (*GetClassRequest) GetSemester

func (x *GetClassRequest) GetSemester() string

func (*GetClassRequest) GetStuId

func (x *GetClassRequest) GetStuId() string

func (*GetClassRequest) GetWeek

func (x *GetClassRequest) GetWeek() int64

func (*GetClassRequest) GetYear

func (x *GetClassRequest) GetYear() string

func (*GetClassRequest) ProtoMessage

func (*GetClassRequest) ProtoMessage()

func (*GetClassRequest) ProtoReflect

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

func (*GetClassRequest) Reset

func (x *GetClassRequest) Reset()

func (*GetClassRequest) String

func (x *GetClassRequest) String() string

func (*GetClassRequest) Validate

func (m *GetClassRequest) Validate() error

Validate checks the field values on GetClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetClassRequest) ValidateAll

func (m *GetClassRequest) ValidateAll() error

ValidateAll checks the field values on GetClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetClassRequestMultiError, or nil if none found.

type GetClassRequestMultiError

type GetClassRequestMultiError []error

GetClassRequestMultiError is an error wrapping multiple validation errors returned by GetClassRequest.ValidateAll() if the designated constraints aren't met.

func (GetClassRequestMultiError) AllErrors

func (m GetClassRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetClassRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetClassRequestValidationError

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

GetClassRequestValidationError is the validation error returned by GetClassRequest.Validate if the designated constraints aren't met.

func (GetClassRequestValidationError) Cause

Cause function returns cause value.

func (GetClassRequestValidationError) Error

Error satisfies the builtin error interface

func (GetClassRequestValidationError) ErrorName

func (e GetClassRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetClassRequestValidationError) Field

Field function returns field value.

func (GetClassRequestValidationError) Key

Key function returns key value.

func (GetClassRequestValidationError) Reason

Reason function returns reason value.

type GetClassResponse

type GetClassResponse struct {

	// 课表
	Classes []*Class `protobuf:"bytes,1,rep,name=classes,proto3" json:"classes,omitempty"`
	// contains filtered or unexported fields
}

func (*GetClassResponse) Descriptor deprecated

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

Deprecated: Use GetClassResponse.ProtoReflect.Descriptor instead.

func (*GetClassResponse) GetClasses

func (x *GetClassResponse) GetClasses() []*Class

func (*GetClassResponse) ProtoMessage

func (*GetClassResponse) ProtoMessage()

func (*GetClassResponse) ProtoReflect

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

func (*GetClassResponse) Reset

func (x *GetClassResponse) Reset()

func (*GetClassResponse) String

func (x *GetClassResponse) String() string

func (*GetClassResponse) Validate

func (m *GetClassResponse) Validate() error

Validate checks the field values on GetClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetClassResponse) ValidateAll

func (m *GetClassResponse) ValidateAll() error

ValidateAll checks the field values on GetClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetClassResponseMultiError, or nil if none found.

type GetClassResponseMultiError

type GetClassResponseMultiError []error

GetClassResponseMultiError is an error wrapping multiple validation errors returned by GetClassResponse.ValidateAll() if the designated constraints aren't met.

func (GetClassResponseMultiError) AllErrors

func (m GetClassResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetClassResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetClassResponseValidationError

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

GetClassResponseValidationError is the validation error returned by GetClassResponse.Validate if the designated constraints aren't met.

func (GetClassResponseValidationError) Cause

Cause function returns cause value.

func (GetClassResponseValidationError) Error

Error satisfies the builtin error interface

func (GetClassResponseValidationError) ErrorName

ErrorName returns error name.

func (GetClassResponseValidationError) Field

Field function returns field value.

func (GetClassResponseValidationError) Key

Key function returns key value.

func (GetClassResponseValidationError) Reason

Reason function returns reason value.

type GetRecycleBinClassRequest

type GetRecycleBinClassRequest struct {

	// 学号
	StuId string `protobuf:"bytes,1,opt,name=stuId,json=stu_id,proto3" json:"stuId,omitempty"`
	// 学年  "2024" 代表"2024-2025学年"
	Year string `protobuf:"bytes,2,opt,name=year,proto3" json:"year,omitempty"`
	// 学期 "1"代表第一学期,"2"代表第二学期,"3"代表第三学期
	Semester string `protobuf:"bytes,3,opt,name=semester,proto3" json:"semester,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRecycleBinClassRequest) Descriptor deprecated

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

Deprecated: Use GetRecycleBinClassRequest.ProtoReflect.Descriptor instead.

func (*GetRecycleBinClassRequest) GetSemester

func (x *GetRecycleBinClassRequest) GetSemester() string

func (*GetRecycleBinClassRequest) GetStuId

func (x *GetRecycleBinClassRequest) GetStuId() string

func (*GetRecycleBinClassRequest) GetYear

func (x *GetRecycleBinClassRequest) GetYear() string

func (*GetRecycleBinClassRequest) ProtoMessage

func (*GetRecycleBinClassRequest) ProtoMessage()

func (*GetRecycleBinClassRequest) ProtoReflect

func (*GetRecycleBinClassRequest) Reset

func (x *GetRecycleBinClassRequest) Reset()

func (*GetRecycleBinClassRequest) String

func (x *GetRecycleBinClassRequest) String() string

func (*GetRecycleBinClassRequest) Validate

func (m *GetRecycleBinClassRequest) Validate() error

Validate checks the field values on GetRecycleBinClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetRecycleBinClassRequest) ValidateAll

func (m *GetRecycleBinClassRequest) ValidateAll() error

ValidateAll checks the field values on GetRecycleBinClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetRecycleBinClassRequestMultiError, or nil if none found.

type GetRecycleBinClassRequestMultiError

type GetRecycleBinClassRequestMultiError []error

GetRecycleBinClassRequestMultiError is an error wrapping multiple validation errors returned by GetRecycleBinClassRequest.ValidateAll() if the designated constraints aren't met.

func (GetRecycleBinClassRequestMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (GetRecycleBinClassRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetRecycleBinClassRequestValidationError

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

GetRecycleBinClassRequestValidationError is the validation error returned by GetRecycleBinClassRequest.Validate if the designated constraints aren't met.

func (GetRecycleBinClassRequestValidationError) Cause

Cause function returns cause value.

func (GetRecycleBinClassRequestValidationError) Error

Error satisfies the builtin error interface

func (GetRecycleBinClassRequestValidationError) ErrorName

ErrorName returns error name.

func (GetRecycleBinClassRequestValidationError) Field

Field function returns field value.

func (GetRecycleBinClassRequestValidationError) Key

Key function returns key value.

func (GetRecycleBinClassRequestValidationError) Reason

Reason function returns reason value.

type GetRecycleBinClassResponse

type GetRecycleBinClassResponse struct {

	// 回收站的课程
	ClassInfos []*ClassInfo `protobuf:"bytes,1,rep,name=class_infos,proto3" json:"class_infos,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRecycleBinClassResponse) Descriptor deprecated

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

Deprecated: Use GetRecycleBinClassResponse.ProtoReflect.Descriptor instead.

func (*GetRecycleBinClassResponse) GetClassInfos

func (x *GetRecycleBinClassResponse) GetClassInfos() []*ClassInfo

func (*GetRecycleBinClassResponse) ProtoMessage

func (*GetRecycleBinClassResponse) ProtoMessage()

func (*GetRecycleBinClassResponse) ProtoReflect

func (*GetRecycleBinClassResponse) Reset

func (x *GetRecycleBinClassResponse) Reset()

func (*GetRecycleBinClassResponse) String

func (x *GetRecycleBinClassResponse) String() string

func (*GetRecycleBinClassResponse) Validate

func (m *GetRecycleBinClassResponse) Validate() error

Validate checks the field values on GetRecycleBinClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetRecycleBinClassResponse) ValidateAll

func (m *GetRecycleBinClassResponse) ValidateAll() error

ValidateAll checks the field values on GetRecycleBinClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetRecycleBinClassResponseMultiError, or nil if none found.

type GetRecycleBinClassResponseMultiError

type GetRecycleBinClassResponseMultiError []error

GetRecycleBinClassResponseMultiError is an error wrapping multiple validation errors returned by GetRecycleBinClassResponse.ValidateAll() if the designated constraints aren't met.

func (GetRecycleBinClassResponseMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (GetRecycleBinClassResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetRecycleBinClassResponseValidationError

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

GetRecycleBinClassResponseValidationError is the validation error returned by GetRecycleBinClassResponse.Validate if the designated constraints aren't met.

func (GetRecycleBinClassResponseValidationError) Cause

Cause function returns cause value.

func (GetRecycleBinClassResponseValidationError) Error

Error satisfies the builtin error interface

func (GetRecycleBinClassResponseValidationError) ErrorName

ErrorName returns error name.

func (GetRecycleBinClassResponseValidationError) Field

Field function returns field value.

func (GetRecycleBinClassResponseValidationError) Key

Key function returns key value.

func (GetRecycleBinClassResponseValidationError) Reason

Reason function returns reason value.

type RecoverClassRequest

type RecoverClassRequest struct {

	// 学号
	StuId string `protobuf:"bytes,1,opt,name=stuId,json=stu_id,proto3" json:"stuId,omitempty"`
	// 学年  "2024" 代表"2024-2025学年"
	Year string `protobuf:"bytes,2,opt,name=year,proto3" json:"year,omitempty"`
	// 学期 "1"代表第一学期,"2"代表第二学期,"3"代表第三学期
	Semester string `protobuf:"bytes,3,opt,name=semester,proto3" json:"semester,omitempty"`
	// 课程的ID(唯一标识) 更新后这个可能会换,所以响应的时候会把新的ID返回
	ClassId string `protobuf:"bytes,11,opt,name=classId,json=id,proto3" json:"classId,omitempty"`
	// contains filtered or unexported fields
}

func (*RecoverClassRequest) Descriptor deprecated

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

Deprecated: Use RecoverClassRequest.ProtoReflect.Descriptor instead.

func (*RecoverClassRequest) GetClassId

func (x *RecoverClassRequest) GetClassId() string

func (*RecoverClassRequest) GetSemester

func (x *RecoverClassRequest) GetSemester() string

func (*RecoverClassRequest) GetStuId

func (x *RecoverClassRequest) GetStuId() string

func (*RecoverClassRequest) GetYear

func (x *RecoverClassRequest) GetYear() string

func (*RecoverClassRequest) ProtoMessage

func (*RecoverClassRequest) ProtoMessage()

func (*RecoverClassRequest) ProtoReflect

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

func (*RecoverClassRequest) Reset

func (x *RecoverClassRequest) Reset()

func (*RecoverClassRequest) String

func (x *RecoverClassRequest) String() string

func (*RecoverClassRequest) Validate

func (m *RecoverClassRequest) Validate() error

Validate checks the field values on RecoverClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RecoverClassRequest) ValidateAll

func (m *RecoverClassRequest) ValidateAll() error

ValidateAll checks the field values on RecoverClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RecoverClassRequestMultiError, or nil if none found.

type RecoverClassRequestMultiError

type RecoverClassRequestMultiError []error

RecoverClassRequestMultiError is an error wrapping multiple validation errors returned by RecoverClassRequest.ValidateAll() if the designated constraints aren't met.

func (RecoverClassRequestMultiError) AllErrors

func (m RecoverClassRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RecoverClassRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RecoverClassRequestValidationError

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

RecoverClassRequestValidationError is the validation error returned by RecoverClassRequest.Validate if the designated constraints aren't met.

func (RecoverClassRequestValidationError) Cause

Cause function returns cause value.

func (RecoverClassRequestValidationError) Error

Error satisfies the builtin error interface

func (RecoverClassRequestValidationError) ErrorName

ErrorName returns error name.

func (RecoverClassRequestValidationError) Field

Field function returns field value.

func (RecoverClassRequestValidationError) Key

Key function returns key value.

func (RecoverClassRequestValidationError) Reason

Reason function returns reason value.

type RecoverClassResponse

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

func (*RecoverClassResponse) Descriptor deprecated

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

Deprecated: Use RecoverClassResponse.ProtoReflect.Descriptor instead.

func (*RecoverClassResponse) GetMsg

func (x *RecoverClassResponse) GetMsg() string

func (*RecoverClassResponse) ProtoMessage

func (*RecoverClassResponse) ProtoMessage()

func (*RecoverClassResponse) ProtoReflect

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

func (*RecoverClassResponse) Reset

func (x *RecoverClassResponse) Reset()

func (*RecoverClassResponse) String

func (x *RecoverClassResponse) String() string

func (*RecoverClassResponse) Validate

func (m *RecoverClassResponse) Validate() error

Validate checks the field values on RecoverClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RecoverClassResponse) ValidateAll

func (m *RecoverClassResponse) ValidateAll() error

ValidateAll checks the field values on RecoverClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RecoverClassResponseMultiError, or nil if none found.

type RecoverClassResponseMultiError

type RecoverClassResponseMultiError []error

RecoverClassResponseMultiError is an error wrapping multiple validation errors returned by RecoverClassResponse.ValidateAll() if the designated constraints aren't met.

func (RecoverClassResponseMultiError) AllErrors

func (m RecoverClassResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RecoverClassResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RecoverClassResponseValidationError

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

RecoverClassResponseValidationError is the validation error returned by RecoverClassResponse.Validate if the designated constraints aren't met.

func (RecoverClassResponseValidationError) Cause

Cause function returns cause value.

func (RecoverClassResponseValidationError) Error

Error satisfies the builtin error interface

func (RecoverClassResponseValidationError) ErrorName

ErrorName returns error name.

func (RecoverClassResponseValidationError) Field

Field function returns field value.

func (RecoverClassResponseValidationError) Key

Key function returns key value.

func (RecoverClassResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedClasserServer

type UnimplementedClasserServer struct{}

UnimplementedClasserServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedClasserServer) AddClass

func (UnimplementedClasserServer) DeleteClass

func (UnimplementedClasserServer) GetAllClassInfo

func (UnimplementedClasserServer) GetClass

func (UnimplementedClasserServer) GetRecycleBinClassInfos

func (UnimplementedClasserServer) RecoverClass

func (UnimplementedClasserServer) UpdateClass

type UnsafeClasserServer

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

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

type UpdateClassRequest

type UpdateClassRequest struct {

	// 学号
	StuId string `protobuf:"bytes,1,opt,name=stu_id,proto3" json:"stu_id,omitempty"`
	// 课程名称
	Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// 第几节 '形如 "1-3","1-1"'
	DurClass *string `protobuf:"bytes,3,opt,name=dur_class,proto3,oneof" json:"dur_class,omitempty"`
	// 地点
	Where *string `protobuf:"bytes,4,opt,name=where,proto3,oneof" json:"where,omitempty"`
	// 教师
	Teacher *string `protobuf:"bytes,5,opt,name=teacher,proto3,oneof" json:"teacher,omitempty"`
	// 哪些周
	Weeks *int64 `protobuf:"varint,6,opt,name=weeks,proto3,oneof" json:"weeks,omitempty"`
	// 学期
	Semester string `protobuf:"bytes,7,opt,name=semester,proto3" json:"semester,omitempty"`
	// 学年
	Year string `protobuf:"bytes,8,opt,name=year,proto3" json:"year,omitempty"`
	// 星期几
	Day *int64 `protobuf:"varint,9,opt,name=day,proto3,oneof" json:"day,omitempty"`
	// 学分
	Credit *float64 `protobuf:"fixed64,10,opt,name=credit,proto3,oneof" json:"credit,omitempty"`
	// 课程的ID(唯一标识) 更新后这个可能会换,所以响应的时候会把新的ID返回
	ClassId string `protobuf:"bytes,11,opt,name=classId,json=id,proto3" json:"classId,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateClassRequest) Descriptor deprecated

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

Deprecated: Use UpdateClassRequest.ProtoReflect.Descriptor instead.

func (*UpdateClassRequest) GetClassId

func (x *UpdateClassRequest) GetClassId() string

func (*UpdateClassRequest) GetCredit

func (x *UpdateClassRequest) GetCredit() float64

func (*UpdateClassRequest) GetDay

func (x *UpdateClassRequest) GetDay() int64

func (*UpdateClassRequest) GetDurClass

func (x *UpdateClassRequest) GetDurClass() string

func (*UpdateClassRequest) GetName

func (x *UpdateClassRequest) GetName() string

func (*UpdateClassRequest) GetSemester

func (x *UpdateClassRequest) GetSemester() string

func (*UpdateClassRequest) GetStuId

func (x *UpdateClassRequest) GetStuId() string

func (*UpdateClassRequest) GetTeacher

func (x *UpdateClassRequest) GetTeacher() string

func (*UpdateClassRequest) GetWeeks

func (x *UpdateClassRequest) GetWeeks() int64

func (*UpdateClassRequest) GetWhere

func (x *UpdateClassRequest) GetWhere() string

func (*UpdateClassRequest) GetYear

func (x *UpdateClassRequest) GetYear() string

func (*UpdateClassRequest) ProtoMessage

func (*UpdateClassRequest) ProtoMessage()

func (*UpdateClassRequest) ProtoReflect

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

func (*UpdateClassRequest) Reset

func (x *UpdateClassRequest) Reset()

func (*UpdateClassRequest) String

func (x *UpdateClassRequest) String() string

func (*UpdateClassRequest) Validate

func (m *UpdateClassRequest) Validate() error

Validate checks the field values on UpdateClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UpdateClassRequest) ValidateAll

func (m *UpdateClassRequest) ValidateAll() error

ValidateAll checks the field values on UpdateClassRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateClassRequestMultiError, or nil if none found.

type UpdateClassRequestMultiError

type UpdateClassRequestMultiError []error

UpdateClassRequestMultiError is an error wrapping multiple validation errors returned by UpdateClassRequest.ValidateAll() if the designated constraints aren't met.

func (UpdateClassRequestMultiError) AllErrors

func (m UpdateClassRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateClassRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UpdateClassRequestValidationError

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

UpdateClassRequestValidationError is the validation error returned by UpdateClassRequest.Validate if the designated constraints aren't met.

func (UpdateClassRequestValidationError) Cause

Cause function returns cause value.

func (UpdateClassRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateClassRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateClassRequestValidationError) Field

Field function returns field value.

func (UpdateClassRequestValidationError) Key

Key function returns key value.

func (UpdateClassRequestValidationError) Reason

Reason function returns reason value.

type UpdateClassResponse

type UpdateClassResponse struct {
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// 更新后的课程的ID(唯一标识)
	ClassId string `protobuf:"bytes,2,opt,name=classId,json=id,proto3" json:"classId,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateClassResponse) Descriptor deprecated

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

Deprecated: Use UpdateClassResponse.ProtoReflect.Descriptor instead.

func (*UpdateClassResponse) GetClassId

func (x *UpdateClassResponse) GetClassId() string

func (*UpdateClassResponse) GetMsg

func (x *UpdateClassResponse) GetMsg() string

func (*UpdateClassResponse) ProtoMessage

func (*UpdateClassResponse) ProtoMessage()

func (*UpdateClassResponse) ProtoReflect

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

func (*UpdateClassResponse) Reset

func (x *UpdateClassResponse) Reset()

func (*UpdateClassResponse) String

func (x *UpdateClassResponse) String() string

func (*UpdateClassResponse) Validate

func (m *UpdateClassResponse) Validate() error

Validate checks the field values on UpdateClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UpdateClassResponse) ValidateAll

func (m *UpdateClassResponse) ValidateAll() error

ValidateAll checks the field values on UpdateClassResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateClassResponseMultiError, or nil if none found.

type UpdateClassResponseMultiError

type UpdateClassResponseMultiError []error

UpdateClassResponseMultiError is an error wrapping multiple validation errors returned by UpdateClassResponse.ValidateAll() if the designated constraints aren't met.

func (UpdateClassResponseMultiError) AllErrors

func (m UpdateClassResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateClassResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UpdateClassResponseValidationError

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

UpdateClassResponseValidationError is the validation error returned by UpdateClassResponse.Validate if the designated constraints aren't met.

func (UpdateClassResponseValidationError) Cause

Cause function returns cause value.

func (UpdateClassResponseValidationError) Error

Error satisfies the builtin error interface

func (UpdateClassResponseValidationError) ErrorName

ErrorName returns error name.

func (UpdateClassResponseValidationError) Field

Field function returns field value.

func (UpdateClassResponseValidationError) Key

Key function returns key value.

func (UpdateClassResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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