course

package
v0.0.0-...-de8ad38 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CourseService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "CourseService",
	HandlerType: (*CourseServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCourses",
			Handler:    _CourseService_GetCourses_Handler,
		},
		{
			MethodName: "AddCourse",
			Handler:    _CourseService_AddCourse_Handler,
		},
		{
			MethodName: "DeleteCourse",
			Handler:    _CourseService_DeleteCourse_Handler,
		},
		{
			MethodName: "AddStudentsToCourse",
			Handler:    _CourseService_AddStudentsToCourse_Handler,
		},
		{
			MethodName: "RemoveStudentsFromCourse",
			Handler:    _CourseService_RemoveStudentsFromCourse_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "course/course.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)

View Source
var File_course_course_proto protoreflect.FileDescriptor

Functions

func RegisterCourseServiceServer

func RegisterCourseServiceServer(s grpc.ServiceRegistrar, srv CourseServiceServer)

Types

type Course

type Course struct {
	Id          uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Description string   `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Teacher     uint64   `protobuf:"varint,4,opt,name=teacher,proto3" json:"teacher,omitempty"`
	Students    []uint64 `protobuf:"varint,5,rep,packed,name=students,proto3" json:"students,omitempty"`
	// contains filtered or unexported fields
}

func (*Course) Descriptor deprecated

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

Deprecated: Use Course.ProtoReflect.Descriptor instead.

func (*Course) GetDescription

func (x *Course) GetDescription() string

func (*Course) GetId

func (x *Course) GetId() uint64

func (*Course) GetName

func (x *Course) GetName() string

func (*Course) GetStudents

func (x *Course) GetStudents() []uint64

func (*Course) GetTeacher

func (x *Course) GetTeacher() uint64

func (*Course) ProtoMessage

func (*Course) ProtoMessage()

func (*Course) ProtoReflect

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

func (*Course) Reset

func (x *Course) Reset()

func (*Course) String

func (x *Course) String() string

type CourseId

type CourseId struct {
	CourseId uint64 `protobuf:"varint,1,opt,name=courseId,proto3" json:"courseId,omitempty"`
	// contains filtered or unexported fields
}

func (*CourseId) Descriptor deprecated

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

Deprecated: Use CourseId.ProtoReflect.Descriptor instead.

func (*CourseId) GetCourseId

func (x *CourseId) GetCourseId() uint64

func (*CourseId) ProtoMessage

func (*CourseId) ProtoMessage()

func (*CourseId) ProtoReflect

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

func (*CourseId) Reset

func (x *CourseId) Reset()

func (*CourseId) String

func (x *CourseId) String() string

type CourseServiceClient

type CourseServiceClient interface {
	GetCourses(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CoursesResponse, error)
	AddCourse(ctx context.Context, in *Course, opts ...grpc.CallOption) (*CourseId, error)
	DeleteCourse(ctx context.Context, in *CourseId, opts ...grpc.CallOption) (*MessageResponse, error)
	AddStudentsToCourse(ctx context.Context, in *StudentCourseIdRequest, opts ...grpc.CallOption) (*MessageResponse, error)
	RemoveStudentsFromCourse(ctx context.Context, in *StudentCourseIdRequest, opts ...grpc.CallOption) (*MessageResponse, 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.

type CourseServiceServer

type CourseServiceServer interface {
	GetCourses(context.Context, *Empty) (*CoursesResponse, error)
	AddCourse(context.Context, *Course) (*CourseId, error)
	DeleteCourse(context.Context, *CourseId) (*MessageResponse, error)
	AddStudentsToCourse(context.Context, *StudentCourseIdRequest) (*MessageResponse, error)
	RemoveStudentsFromCourse(context.Context, *StudentCourseIdRequest) (*MessageResponse, error)
	// contains filtered or unexported methods
}

CourseServiceServer is the server API for CourseService service. All implementations must embed UnimplementedCourseServiceServer for forward compatibility

type CoursesResponse

type CoursesResponse struct {
	Courses []*Course `protobuf:"bytes,1,rep,name=courses,proto3" json:"courses,omitempty"`
	// contains filtered or unexported fields
}

func (*CoursesResponse) Descriptor deprecated

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

Deprecated: Use CoursesResponse.ProtoReflect.Descriptor instead.

func (*CoursesResponse) GetCourses

func (x *CoursesResponse) GetCourses() []*Course

func (*CoursesResponse) ProtoMessage

func (*CoursesResponse) ProtoMessage()

func (*CoursesResponse) ProtoReflect

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

func (*CoursesResponse) Reset

func (x *CoursesResponse) Reset()

func (*CoursesResponse) String

func (x *CoursesResponse) String() string

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type MessageResponse

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

func (*MessageResponse) Descriptor deprecated

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

Deprecated: Use MessageResponse.ProtoReflect.Descriptor instead.

func (*MessageResponse) GetMsg

func (x *MessageResponse) GetMsg() string

func (*MessageResponse) ProtoMessage

func (*MessageResponse) ProtoMessage()

func (*MessageResponse) ProtoReflect

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

func (*MessageResponse) Reset

func (x *MessageResponse) Reset()

func (*MessageResponse) String

func (x *MessageResponse) String() string

type StudentCourseIdRequest

type StudentCourseIdRequest struct {
	CourseId  uint64 `protobuf:"varint,1,opt,name=courseId,proto3" json:"courseId,omitempty"`
	StudentId uint64 `protobuf:"varint,2,opt,name=studentId,proto3" json:"studentId,omitempty"`
	// contains filtered or unexported fields
}

func (*StudentCourseIdRequest) Descriptor deprecated

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

Deprecated: Use StudentCourseIdRequest.ProtoReflect.Descriptor instead.

func (*StudentCourseIdRequest) GetCourseId

func (x *StudentCourseIdRequest) GetCourseId() uint64

func (*StudentCourseIdRequest) GetStudentId

func (x *StudentCourseIdRequest) GetStudentId() uint64

func (*StudentCourseIdRequest) ProtoMessage

func (*StudentCourseIdRequest) ProtoMessage()

func (*StudentCourseIdRequest) ProtoReflect

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

func (*StudentCourseIdRequest) Reset

func (x *StudentCourseIdRequest) Reset()

func (*StudentCourseIdRequest) String

func (x *StudentCourseIdRequest) String() string

type UnimplementedCourseServiceServer

type UnimplementedCourseServiceServer struct {
}

UnimplementedCourseServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCourseServiceServer) AddCourse

func (UnimplementedCourseServiceServer) AddStudentsToCourse

func (UnimplementedCourseServiceServer) DeleteCourse

func (UnimplementedCourseServiceServer) GetCourses

func (UnimplementedCourseServiceServer) RemoveStudentsFromCourse

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.

Jump to

Keyboard shortcuts

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