Documentation ¶
Index ¶
- Variables
- func RegisterCourseServiceServer(s grpc.ServiceRegistrar, srv CourseServiceServer)
- type Course
- func (*Course) Descriptor() ([]byte, []int)deprecated
- func (x *Course) GetEcts() int32
- func (x *Course) GetId() int32
- func (x *Course) GetName() string
- func (x *Course) GetRating() int32
- func (x *Course) GetStudents() []*Student
- func (x *Course) GetTeacherID() int32
- func (*Course) ProtoMessage()
- func (x *Course) ProtoReflect() protoreflect.Message
- func (x *Course) Reset()
- func (x *Course) String() string
- type CourseEnrollStudentRequest
- func (*CourseEnrollStudentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CourseEnrollStudentRequest) GetId() int32
- func (x *CourseEnrollStudentRequest) GetStudent() int32
- func (*CourseEnrollStudentRequest) ProtoMessage()
- func (x *CourseEnrollStudentRequest) ProtoReflect() protoreflect.Message
- func (x *CourseEnrollStudentRequest) Reset()
- func (x *CourseEnrollStudentRequest) String() string
- type CourseID
- type CourseRatingChangeRequest
- func (*CourseRatingChangeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CourseRatingChangeRequest) GetId() int32
- func (x *CourseRatingChangeRequest) GetRating() int32
- func (*CourseRatingChangeRequest) ProtoMessage()
- func (x *CourseRatingChangeRequest) ProtoReflect() protoreflect.Message
- func (x *CourseRatingChangeRequest) Reset()
- func (x *CourseRatingChangeRequest) String() string
- type CourseRequestResponse
- func (*CourseRequestResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CourseRequestResponse) GetCourse() *Course
- func (x *CourseRequestResponse) GetSuccess() bool
- func (*CourseRequestResponse) ProtoMessage()
- func (x *CourseRequestResponse) ProtoReflect() protoreflect.Message
- func (x *CourseRequestResponse) Reset()
- func (x *CourseRequestResponse) String() string
- type CourseResponse
- func (*CourseResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CourseResponse) GetMessage() string
- func (x *CourseResponse) GetSuccess() bool
- func (*CourseResponse) ProtoMessage()
- func (x *CourseResponse) ProtoReflect() protoreflect.Message
- func (x *CourseResponse) Reset()
- func (x *CourseResponse) String() string
- type CourseServiceClient
- type CourseServiceServer
- type Student
- type UnimplementedCourseServiceServer
- func (UnimplementedCourseServiceServer) CreateCourse(context.Context, *Course) (*CourseResponse, error)
- func (UnimplementedCourseServiceServer) DeleteCourse(context.Context, *CourseID) (*CourseResponse, error)
- func (UnimplementedCourseServiceServer) EnrollStudentInCourse(context.Context, *CourseRatingChangeRequest) (*CourseResponse, error)
- func (UnimplementedCourseServiceServer) GetCourse(context.Context, *CourseID) (*CourseRequestResponse, error)
- func (UnimplementedCourseServiceServer) SetCourse(context.Context, *Course) (*CourseResponse, error)
- func (UnimplementedCourseServiceServer) SetRatingCourse(context.Context, *CourseRatingChangeRequest) (*CourseResponse, error)
- type UnsafeCourseServiceServer
Constants ¶
This section is empty.
Variables ¶
var CourseService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "CourseService", HandlerType: (*CourseServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetCourse", Handler: _CourseService_SetCourse_Handler, }, { MethodName: "CreateCourse", Handler: _CourseService_CreateCourse_Handler, }, { MethodName: "GetCourse", Handler: _CourseService_GetCourse_Handler, }, { MethodName: "DeleteCourse", Handler: _CourseService_DeleteCourse_Handler, }, { MethodName: "SetRatingCourse", Handler: _CourseService_SetRatingCourse_Handler, }, { MethodName: "EnrollStudentInCourse", Handler: _CourseService_EnrollStudentInCourse_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "routeguide/route_guide.proto", }
CourseService_ServiceDesc is the grpc.ServiceDesc for CourseService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_routeguide_route_guide_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCourseServiceServer ¶
func RegisterCourseServiceServer(s grpc.ServiceRegistrar, srv CourseServiceServer)
Types ¶
type Course ¶
type Course struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` TeacherID int32 `protobuf:"varint,3,opt,name=teacherID,proto3" json:"teacherID,omitempty"` Ects int32 `protobuf:"varint,4,opt,name=ects,proto3" json:"ects,omitempty"` Rating *int32 `protobuf:"varint,5,opt,name=rating,proto3,oneof" json:"rating,omitempty"` Students []*Student `protobuf:"bytes,6,rep,name=students,proto3" json:"students,omitempty"` // contains filtered or unexported fields }
func (*Course) Descriptor
deprecated
func (*Course) GetStudents ¶
func (*Course) GetTeacherID ¶
func (*Course) ProtoMessage ¶
func (*Course) ProtoMessage()
func (*Course) ProtoReflect ¶
func (x *Course) ProtoReflect() protoreflect.Message
type CourseEnrollStudentRequest ¶
type CourseEnrollStudentRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Student int32 `protobuf:"varint,2,opt,name=Student,proto3" json:"Student,omitempty"` // contains filtered or unexported fields }
func (*CourseEnrollStudentRequest) Descriptor
deprecated
func (*CourseEnrollStudentRequest) Descriptor() ([]byte, []int)
Deprecated: Use CourseEnrollStudentRequest.ProtoReflect.Descriptor instead.
func (*CourseEnrollStudentRequest) GetId ¶
func (x *CourseEnrollStudentRequest) GetId() int32
func (*CourseEnrollStudentRequest) GetStudent ¶
func (x *CourseEnrollStudentRequest) GetStudent() int32
func (*CourseEnrollStudentRequest) ProtoMessage ¶
func (*CourseEnrollStudentRequest) ProtoMessage()
func (*CourseEnrollStudentRequest) ProtoReflect ¶
func (x *CourseEnrollStudentRequest) ProtoReflect() protoreflect.Message
func (*CourseEnrollStudentRequest) Reset ¶
func (x *CourseEnrollStudentRequest) Reset()
func (*CourseEnrollStudentRequest) String ¶
func (x *CourseEnrollStudentRequest) String() string
type CourseID ¶
type CourseID struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CourseID) Descriptor
deprecated
func (*CourseID) ProtoMessage ¶
func (*CourseID) ProtoMessage()
func (*CourseID) ProtoReflect ¶
func (x *CourseID) ProtoReflect() protoreflect.Message
type CourseRatingChangeRequest ¶
type CourseRatingChangeRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Rating int32 `protobuf:"varint,2,opt,name=rating,proto3" json:"rating,omitempty"` // contains filtered or unexported fields }
func (*CourseRatingChangeRequest) Descriptor
deprecated
func (*CourseRatingChangeRequest) Descriptor() ([]byte, []int)
Deprecated: Use CourseRatingChangeRequest.ProtoReflect.Descriptor instead.
func (*CourseRatingChangeRequest) GetId ¶
func (x *CourseRatingChangeRequest) GetId() int32
func (*CourseRatingChangeRequest) GetRating ¶
func (x *CourseRatingChangeRequest) GetRating() int32
func (*CourseRatingChangeRequest) ProtoMessage ¶
func (*CourseRatingChangeRequest) ProtoMessage()
func (*CourseRatingChangeRequest) ProtoReflect ¶
func (x *CourseRatingChangeRequest) ProtoReflect() protoreflect.Message
func (*CourseRatingChangeRequest) Reset ¶
func (x *CourseRatingChangeRequest) Reset()
func (*CourseRatingChangeRequest) String ¶
func (x *CourseRatingChangeRequest) String() string
type CourseRequestResponse ¶
type CourseRequestResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Course *Course `protobuf:"bytes,2,opt,name=course,proto3" json:"course,omitempty"` // contains filtered or unexported fields }
func (*CourseRequestResponse) Descriptor
deprecated
func (*CourseRequestResponse) Descriptor() ([]byte, []int)
Deprecated: Use CourseRequestResponse.ProtoReflect.Descriptor instead.
func (*CourseRequestResponse) GetCourse ¶
func (x *CourseRequestResponse) GetCourse() *Course
func (*CourseRequestResponse) GetSuccess ¶
func (x *CourseRequestResponse) GetSuccess() bool
func (*CourseRequestResponse) ProtoMessage ¶
func (*CourseRequestResponse) ProtoMessage()
func (*CourseRequestResponse) ProtoReflect ¶
func (x *CourseRequestResponse) ProtoReflect() protoreflect.Message
func (*CourseRequestResponse) Reset ¶
func (x *CourseRequestResponse) Reset()
func (*CourseRequestResponse) String ¶
func (x *CourseRequestResponse) String() string
type CourseResponse ¶
type CourseResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*CourseResponse) Descriptor
deprecated
func (*CourseResponse) Descriptor() ([]byte, []int)
Deprecated: Use CourseResponse.ProtoReflect.Descriptor instead.
func (*CourseResponse) GetMessage ¶
func (x *CourseResponse) GetMessage() string
func (*CourseResponse) GetSuccess ¶
func (x *CourseResponse) GetSuccess() bool
func (*CourseResponse) ProtoMessage ¶
func (*CourseResponse) ProtoMessage()
func (*CourseResponse) ProtoReflect ¶
func (x *CourseResponse) ProtoReflect() protoreflect.Message
func (*CourseResponse) Reset ¶
func (x *CourseResponse) Reset()
func (*CourseResponse) String ¶
func (x *CourseResponse) String() string
type CourseServiceClient ¶
type CourseServiceClient interface { // Sends a Course SetCourse(ctx context.Context, in *Course, opts ...grpc.CallOption) (*CourseResponse, error) CreateCourse(ctx context.Context, in *Course, opts ...grpc.CallOption) (*CourseResponse, error) GetCourse(ctx context.Context, in *CourseID, opts ...grpc.CallOption) (*CourseRequestResponse, error) DeleteCourse(ctx context.Context, in *CourseID, opts ...grpc.CallOption) (*CourseResponse, error) SetRatingCourse(ctx context.Context, in *CourseRatingChangeRequest, opts ...grpc.CallOption) (*CourseResponse, error) EnrollStudentInCourse(ctx context.Context, in *CourseRatingChangeRequest, opts ...grpc.CallOption) (*CourseResponse, error) }
CourseServiceClient is the client API for CourseService 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 NewCourseServiceClient ¶
func NewCourseServiceClient(cc grpc.ClientConnInterface) CourseServiceClient
type CourseServiceServer ¶
type CourseServiceServer interface { // Sends a Course SetCourse(context.Context, *Course) (*CourseResponse, error) CreateCourse(context.Context, *Course) (*CourseResponse, error) GetCourse(context.Context, *CourseID) (*CourseRequestResponse, error) DeleteCourse(context.Context, *CourseID) (*CourseResponse, error) SetRatingCourse(context.Context, *CourseRatingChangeRequest) (*CourseResponse, error) EnrollStudentInCourse(context.Context, *CourseRatingChangeRequest) (*CourseResponse, error) // contains filtered or unexported methods }
CourseServiceServer is the server API for CourseService service. All implementations must embed UnimplementedCourseServiceServer for forward compatibility
type Student ¶
type Student struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*Student) Descriptor
deprecated
func (*Student) ProtoMessage ¶
func (*Student) ProtoMessage()
func (*Student) ProtoReflect ¶
func (x *Student) ProtoReflect() protoreflect.Message
type UnimplementedCourseServiceServer ¶
type UnimplementedCourseServiceServer struct { }
UnimplementedCourseServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCourseServiceServer) CreateCourse ¶
func (UnimplementedCourseServiceServer) CreateCourse(context.Context, *Course) (*CourseResponse, error)
func (UnimplementedCourseServiceServer) DeleteCourse ¶
func (UnimplementedCourseServiceServer) DeleteCourse(context.Context, *CourseID) (*CourseResponse, error)
func (UnimplementedCourseServiceServer) EnrollStudentInCourse ¶
func (UnimplementedCourseServiceServer) EnrollStudentInCourse(context.Context, *CourseRatingChangeRequest) (*CourseResponse, error)
func (UnimplementedCourseServiceServer) GetCourse ¶
func (UnimplementedCourseServiceServer) GetCourse(context.Context, *CourseID) (*CourseRequestResponse, error)
func (UnimplementedCourseServiceServer) SetCourse ¶
func (UnimplementedCourseServiceServer) SetCourse(context.Context, *Course) (*CourseResponse, error)
func (UnimplementedCourseServiceServer) SetRatingCourse ¶
func (UnimplementedCourseServiceServer) SetRatingCourse(context.Context, *CourseRatingChangeRequest) (*CourseResponse, error)
type UnsafeCourseServiceServer ¶
type UnsafeCourseServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCourseServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CourseServiceServer will result in compilation errors.