Documentation
¶
Index ¶
- Constants
- Variables
- func ErrorEsAddClassFailed(format string, args ...interface{}) *errors.Error
- func ErrorEsSearchClassFailed(format string, args ...interface{}) *errors.Error
- func IsEsAddClassFailed(err error) bool
- func IsEsSearchClassFailed(err error) bool
- func RegisterClassServiceHTTPServer(s *http.Server, srv ClassServiceHTTPServer)
- func RegisterClassServiceServer(s grpc.ServiceRegistrar, srv ClassServiceServer)
- type AddClassReply
- func (*AddClassReply) Descriptor() ([]byte, []int)deprecated
- func (x *AddClassReply) GetId() string
- func (x *AddClassReply) GetMsg() string
- func (*AddClassReply) ProtoMessage()
- func (x *AddClassReply) ProtoReflect() protoreflect.Message
- func (x *AddClassReply) Reset()
- func (x *AddClassReply) String() string
- func (m *AddClassReply) Validate() error
- func (m *AddClassReply) ValidateAll() error
- type AddClassReplyMultiError
- type AddClassReplyValidationError
- func (e AddClassReplyValidationError) Cause() error
- func (e AddClassReplyValidationError) Error() string
- func (e AddClassReplyValidationError) ErrorName() string
- func (e AddClassReplyValidationError) Field() string
- func (e AddClassReplyValidationError) Key() bool
- func (e AddClassReplyValidationError) Reason() string
- type AddClassRequest
- func (*AddClassRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddClassRequest) GetCredit() float64
- func (x *AddClassRequest) GetDay() int64
- func (x *AddClassRequest) GetDurClass() string
- func (x *AddClassRequest) GetName() string
- func (x *AddClassRequest) GetSemester() string
- func (x *AddClassRequest) GetStuId() string
- func (x *AddClassRequest) GetTeacher() string
- func (x *AddClassRequest) GetWeeks() int64
- func (x *AddClassRequest) GetWhere() string
- func (x *AddClassRequest) GetYear() string
- func (*AddClassRequest) ProtoMessage()
- func (x *AddClassRequest) ProtoReflect() protoreflect.Message
- func (x *AddClassRequest) Reset()
- func (x *AddClassRequest) String() string
- func (m *AddClassRequest) Validate() error
- func (m *AddClassRequest) ValidateAll() error
- type AddClassRequestMultiError
- type AddClassRequestValidationError
- func (e AddClassRequestValidationError) Cause() error
- func (e AddClassRequestValidationError) Error() string
- func (e AddClassRequestValidationError) ErrorName() string
- func (e AddClassRequestValidationError) Field() string
- func (e AddClassRequestValidationError) Key() bool
- func (e AddClassRequestValidationError) Reason() string
- type ClassInfo
- func (*ClassInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ClassInfo) GetClassWhen() string
- func (x *ClassInfo) GetClassname() string
- func (x *ClassInfo) GetCredit() float64
- func (x *ClassInfo) GetDay() int64
- func (x *ClassInfo) GetId() string
- func (x *ClassInfo) GetSemester() string
- func (x *ClassInfo) GetTeacher() string
- func (x *ClassInfo) GetWeekDuration() string
- func (x *ClassInfo) GetWeeks() int64
- func (x *ClassInfo) GetWhere() string
- func (x *ClassInfo) GetYear() string
- func (*ClassInfo) ProtoMessage()
- func (x *ClassInfo) ProtoReflect() protoreflect.Message
- func (x *ClassInfo) Reset()
- func (x *ClassInfo) String() string
- func (m *ClassInfo) Validate() error
- func (m *ClassInfo) ValidateAll() error
- type ClassInfoMultiError
- type ClassInfoValidationError
- type ClassServiceClient
- type ClassServiceHTTPClient
- type ClassServiceHTTPClientImpl
- type ClassServiceHTTPServer
- type ClassServiceServer
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type SearchReply
- func (*SearchReply) Descriptor() ([]byte, []int)deprecated
- func (x *SearchReply) GetClassInfos() []*ClassInfo
- func (*SearchReply) ProtoMessage()
- func (x *SearchReply) ProtoReflect() protoreflect.Message
- func (x *SearchReply) Reset()
- func (x *SearchReply) String() string
- func (m *SearchReply) Validate() error
- func (m *SearchReply) ValidateAll() error
- type SearchReplyMultiError
- type SearchReplyValidationError
- func (e SearchReplyValidationError) Cause() error
- func (e SearchReplyValidationError) Error() string
- func (e SearchReplyValidationError) ErrorName() string
- func (e SearchReplyValidationError) Field() string
- func (e SearchReplyValidationError) Key() bool
- func (e SearchReplyValidationError) Reason() string
- type SearchRequest
- func (*SearchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchRequest) GetSearchKeyWords() string
- func (x *SearchRequest) GetSemester() string
- func (x *SearchRequest) GetYear() string
- func (*SearchRequest) ProtoMessage()
- func (x *SearchRequest) ProtoReflect() protoreflect.Message
- func (x *SearchRequest) Reset()
- func (x *SearchRequest) String() string
- func (m *SearchRequest) Validate() error
- func (m *SearchRequest) ValidateAll() error
- type SearchRequestMultiError
- type SearchRequestValidationError
- func (e SearchRequestValidationError) Cause() error
- func (e SearchRequestValidationError) Error() string
- func (e SearchRequestValidationError) ErrorName() string
- func (e SearchRequestValidationError) Field() string
- func (e SearchRequestValidationError) Key() bool
- func (e SearchRequestValidationError) Reason() string
- type UnimplementedClassServiceServer
- type UnsafeClassServiceServer
Constants ¶
const ( ClassService_SearchClass_FullMethodName = "/classService.v1.ClassService/SearchClass" ClassService_AddClass_FullMethodName = "/classService.v1.ClassService/AddClass" )
const OperationClassServiceAddClass = "/classService.v1.ClassService/AddClass"
const OperationClassServiceSearchClass = "/classService.v1.ClassService/SearchClass"
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "ES_AddClassFailed", 1: "ES_SearchClassFailed", } ErrorReason_value = map[string]int32{ "ES_AddClassFailed": 0, "ES_SearchClassFailed": 1, } )
Enum value maps for ErrorReason.
var ClassService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "classService.v1.ClassService", HandlerType: (*ClassServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SearchClass", Handler: _ClassService_SearchClass_Handler, }, { MethodName: "AddClass", Handler: _ClassService_AddClass_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "classService/v1/classService.proto", }
ClassService_ServiceDesc is the grpc.ServiceDesc for ClassService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_classService_v1_classService_proto protoreflect.FileDescriptor
var File_classService_v1_error_reason_proto protoreflect.FileDescriptor
Functions ¶
func ErrorEsAddClassFailed ¶
func IsEsAddClassFailed ¶
func IsEsSearchClassFailed ¶
func RegisterClassServiceHTTPServer ¶
func RegisterClassServiceHTTPServer(s *http.Server, srv ClassServiceHTTPServer)
func RegisterClassServiceServer ¶
func RegisterClassServiceServer(s grpc.ServiceRegistrar, srv ClassServiceServer)
Types ¶
type AddClassReply ¶
type AddClassReply 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 (*AddClassReply) Descriptor
deprecated
func (*AddClassReply) Descriptor() ([]byte, []int)
Deprecated: Use AddClassReply.ProtoReflect.Descriptor instead.
func (*AddClassReply) GetId ¶
func (x *AddClassReply) GetId() string
func (*AddClassReply) GetMsg ¶
func (x *AddClassReply) GetMsg() string
func (*AddClassReply) ProtoMessage ¶
func (*AddClassReply) ProtoMessage()
func (*AddClassReply) ProtoReflect ¶
func (x *AddClassReply) ProtoReflect() protoreflect.Message
func (*AddClassReply) Reset ¶
func (x *AddClassReply) Reset()
func (*AddClassReply) String ¶
func (x *AddClassReply) String() string
func (*AddClassReply) Validate ¶
func (m *AddClassReply) Validate() error
Validate checks the field values on AddClassReply 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 (*AddClassReply) ValidateAll ¶
func (m *AddClassReply) ValidateAll() error
ValidateAll checks the field values on AddClassReply 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 AddClassReplyMultiError, or nil if none found.
type AddClassReplyMultiError ¶
type AddClassReplyMultiError []error
AddClassReplyMultiError is an error wrapping multiple validation errors returned by AddClassReply.ValidateAll() if the designated constraints aren't met.
func (AddClassReplyMultiError) AllErrors ¶
func (m AddClassReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AddClassReplyMultiError) Error ¶
func (m AddClassReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AddClassReplyValidationError ¶
type AddClassReplyValidationError struct {
// contains filtered or unexported fields
}
AddClassReplyValidationError is the validation error returned by AddClassReply.Validate if the designated constraints aren't met.
func (AddClassReplyValidationError) Cause ¶
func (e AddClassReplyValidationError) Cause() error
Cause function returns cause value.
func (AddClassReplyValidationError) Error ¶
func (e AddClassReplyValidationError) Error() string
Error satisfies the builtin error interface
func (AddClassReplyValidationError) ErrorName ¶
func (e AddClassReplyValidationError) ErrorName() string
ErrorName returns error name.
func (AddClassReplyValidationError) Field ¶
func (e AddClassReplyValidationError) Field() string
Field function returns field value.
func (AddClassReplyValidationError) Key ¶
func (e AddClassReplyValidationError) Key() bool
Key function returns key value.
func (AddClassReplyValidationError) Reason ¶
func (e AddClassReplyValidationError) Reason() string
Reason function returns reason value.
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 ¶
func (m AddClassRequestMultiError) Error() string
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 ¶
func (e AddClassRequestValidationError) Cause() error
Cause function returns cause value.
func (AddClassRequestValidationError) Error ¶
func (e AddClassRequestValidationError) Error() string
Error satisfies the builtin error interface
func (AddClassRequestValidationError) ErrorName ¶
func (e AddClassRequestValidationError) ErrorName() string
ErrorName returns error name.
func (AddClassRequestValidationError) Field ¶
func (e AddClassRequestValidationError) Field() string
Field function returns field value.
func (AddClassRequestValidationError) Key ¶
func (e AddClassRequestValidationError) Key() bool
Key function returns key value.
func (AddClassRequestValidationError) Reason ¶
func (e AddClassRequestValidationError) Reason() string
Reason function returns reason value.
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) GetClassWhen ¶
func (*ClassInfo) GetClassname ¶
func (*ClassInfo) GetSemester ¶
func (*ClassInfo) GetTeacher ¶
func (*ClassInfo) GetWeekDuration ¶
func (*ClassInfo) ProtoMessage ¶
func (*ClassInfo) ProtoMessage()
func (*ClassInfo) ProtoReflect ¶
func (x *ClassInfo) ProtoReflect() protoreflect.Message
func (*ClassInfo) Validate ¶
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 ¶
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 ¶
func (e ClassInfoValidationError) Key() bool
Key function returns key value.
func (ClassInfoValidationError) Reason ¶
func (e ClassInfoValidationError) Reason() string
Reason function returns reason value.
type ClassServiceClient ¶
type ClassServiceClient interface {
// 数据源是所有使用匣子的用户的课表,从其中搜索相应的课程
SearchClass(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchReply, error)
// 添加课程
AddClass(ctx context.Context, in *AddClassRequest, opts ...grpc.CallOption) (*AddClassReply, error)
}
ClassServiceClient is the client API for ClassService 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.
The greeting service definition.
func NewClassServiceClient ¶
func NewClassServiceClient(cc grpc.ClientConnInterface) ClassServiceClient
type ClassServiceHTTPClient ¶
type ClassServiceHTTPClient interface {
AddClass(ctx context.Context, req *AddClassRequest, opts ...http.CallOption) (rsp *AddClassReply, err error)
SearchClass(ctx context.Context, req *SearchRequest, opts ...http.CallOption) (rsp *SearchReply, err error)
}
func NewClassServiceHTTPClient ¶
func NewClassServiceHTTPClient(client *http.Client) ClassServiceHTTPClient
type ClassServiceHTTPClientImpl ¶
type ClassServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*ClassServiceHTTPClientImpl) AddClass ¶
func (c *ClassServiceHTTPClientImpl) AddClass(ctx context.Context, in *AddClassRequest, opts ...http.CallOption) (*AddClassReply, error)
func (*ClassServiceHTTPClientImpl) SearchClass ¶
func (c *ClassServiceHTTPClientImpl) SearchClass(ctx context.Context, in *SearchRequest, opts ...http.CallOption) (*SearchReply, error)
type ClassServiceHTTPServer ¶
type ClassServiceHTTPServer interface {
// AddClass添加课程
AddClass(context.Context, *AddClassRequest) (*AddClassReply, error)
// SearchClass 数据源是所有使用匣子的用户的课表,从其中搜索相应的课程
SearchClass(context.Context, *SearchRequest) (*SearchReply, error)
}
type ClassServiceServer ¶
type ClassServiceServer interface {
// 数据源是所有使用匣子的用户的课表,从其中搜索相应的课程
SearchClass(context.Context, *SearchRequest) (*SearchReply, error)
// 添加课程
AddClass(context.Context, *AddClassRequest) (*AddClassReply, error)
// contains filtered or unexported methods
}
ClassServiceServer is the server API for ClassService service. All implementations must embed UnimplementedClassServiceServer for forward compatibility.
The greeting service definition.
type ErrorReason ¶
type ErrorReason int32
const ( ErrorReason_ES_AddClassFailed ErrorReason = 0 ErrorReason_ES_SearchClassFailed ErrorReason = 1 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
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 ¶
func (ErrorReason) Type() protoreflect.EnumType
type SearchReply ¶
type SearchReply struct {
// 课程信息
ClassInfos []*ClassInfo `protobuf:"bytes,1,rep,name=class_infos,proto3" json:"class_infos,omitempty"`
// contains filtered or unexported fields
}
func (*SearchReply) Descriptor
deprecated
func (*SearchReply) Descriptor() ([]byte, []int)
Deprecated: Use SearchReply.ProtoReflect.Descriptor instead.
func (*SearchReply) GetClassInfos ¶
func (x *SearchReply) GetClassInfos() []*ClassInfo
func (*SearchReply) ProtoMessage ¶
func (*SearchReply) ProtoMessage()
func (*SearchReply) ProtoReflect ¶
func (x *SearchReply) ProtoReflect() protoreflect.Message
func (*SearchReply) Reset ¶
func (x *SearchReply) Reset()
func (*SearchReply) String ¶
func (x *SearchReply) String() string
func (*SearchReply) Validate ¶
func (m *SearchReply) Validate() error
Validate checks the field values on SearchReply 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 (*SearchReply) ValidateAll ¶
func (m *SearchReply) ValidateAll() error
ValidateAll checks the field values on SearchReply 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 SearchReplyMultiError, or nil if none found.
type SearchReplyMultiError ¶
type SearchReplyMultiError []error
SearchReplyMultiError is an error wrapping multiple validation errors returned by SearchReply.ValidateAll() if the designated constraints aren't met.
func (SearchReplyMultiError) AllErrors ¶
func (m SearchReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SearchReplyMultiError) Error ¶
func (m SearchReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SearchReplyValidationError ¶
type SearchReplyValidationError struct {
// contains filtered or unexported fields
}
SearchReplyValidationError is the validation error returned by SearchReply.Validate if the designated constraints aren't met.
func (SearchReplyValidationError) Cause ¶
func (e SearchReplyValidationError) Cause() error
Cause function returns cause value.
func (SearchReplyValidationError) Error ¶
func (e SearchReplyValidationError) Error() string
Error satisfies the builtin error interface
func (SearchReplyValidationError) ErrorName ¶
func (e SearchReplyValidationError) ErrorName() string
ErrorName returns error name.
func (SearchReplyValidationError) Field ¶
func (e SearchReplyValidationError) Field() string
Field function returns field value.
func (SearchReplyValidationError) Key ¶
func (e SearchReplyValidationError) Key() bool
Key function returns key value.
func (SearchReplyValidationError) Reason ¶
func (e SearchReplyValidationError) Reason() string
Reason function returns reason value.
type SearchRequest ¶
type SearchRequest struct {
// 搜索关键词,匹配的是课程名称和教师姓名
SearchKeyWords string `protobuf:"bytes,1,opt,name=searchKeyWords,proto3" json:"searchKeyWords,omitempty"`
Year string `protobuf:"bytes,2,opt,name=year,proto3" json:"year,omitempty"`
Semester string `protobuf:"bytes,3,opt,name=semester,proto3" json:"semester,omitempty"`
// contains filtered or unexported fields
}
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetSearchKeyWords ¶
func (x *SearchRequest) GetSearchKeyWords() string
func (*SearchRequest) GetSemester ¶
func (x *SearchRequest) GetSemester() string
func (*SearchRequest) GetYear ¶
func (x *SearchRequest) GetYear() string
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶
func (x *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (x *SearchRequest) String() string
func (*SearchRequest) Validate ¶
func (m *SearchRequest) Validate() error
Validate checks the field values on SearchRequest 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 (*SearchRequest) ValidateAll ¶
func (m *SearchRequest) ValidateAll() error
ValidateAll checks the field values on SearchRequest 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 SearchRequestMultiError, or nil if none found.
type SearchRequestMultiError ¶
type SearchRequestMultiError []error
SearchRequestMultiError is an error wrapping multiple validation errors returned by SearchRequest.ValidateAll() if the designated constraints aren't met.
func (SearchRequestMultiError) AllErrors ¶
func (m SearchRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SearchRequestMultiError) Error ¶
func (m SearchRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SearchRequestValidationError ¶
type SearchRequestValidationError struct {
// contains filtered or unexported fields
}
SearchRequestValidationError is the validation error returned by SearchRequest.Validate if the designated constraints aren't met.
func (SearchRequestValidationError) Cause ¶
func (e SearchRequestValidationError) Cause() error
Cause function returns cause value.
func (SearchRequestValidationError) Error ¶
func (e SearchRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SearchRequestValidationError) ErrorName ¶
func (e SearchRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SearchRequestValidationError) Field ¶
func (e SearchRequestValidationError) Field() string
Field function returns field value.
func (SearchRequestValidationError) Key ¶
func (e SearchRequestValidationError) Key() bool
Key function returns key value.
func (SearchRequestValidationError) Reason ¶
func (e SearchRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedClassServiceServer ¶
type UnimplementedClassServiceServer struct{}
UnimplementedClassServiceServer 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 (UnimplementedClassServiceServer) AddClass ¶
func (UnimplementedClassServiceServer) AddClass(context.Context, *AddClassRequest) (*AddClassReply, error)
func (UnimplementedClassServiceServer) SearchClass ¶
func (UnimplementedClassServiceServer) SearchClass(context.Context, *SearchRequest) (*SearchReply, error)
type UnsafeClassServiceServer ¶
type UnsafeClassServiceServer interface {
// contains filtered or unexported methods
}
UnsafeClassServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ClassServiceServer will result in compilation errors.