gRPC

package
v0.0.0-...-0a098c1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 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: "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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Course.ProtoReflect.Descriptor instead.

func (*Course) GetEcts

func (x *Course) GetEcts() int32

func (*Course) GetId

func (x *Course) GetId() int32

func (*Course) GetName

func (x *Course) GetName() string

func (*Course) GetRating

func (x *Course) GetRating() int32

func (*Course) GetStudents

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

func (*Course) GetTeacherID

func (x *Course) GetTeacherID() int32

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 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 (*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) Descriptor() ([]byte, []int)

Deprecated: Use CourseID.ProtoReflect.Descriptor instead.

func (*CourseID) GetId

func (x *CourseID) GetId() int32

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 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 (*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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Student.ProtoReflect.Descriptor instead.

func (*Student) GetId

func (x *Student) GetId() int32

func (*Student) GetName

func (x *Student) GetName() string

func (*Student) ProtoMessage

func (*Student) ProtoMessage()

func (*Student) ProtoReflect

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

func (*Student) Reset

func (x *Student) Reset()

func (*Student) String

func (x *Student) String() string

type UnimplementedCourseServiceServer

type UnimplementedCourseServiceServer struct {
}

UnimplementedCourseServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCourseServiceServer) CreateCourse

func (UnimplementedCourseServiceServer) DeleteCourse

func (UnimplementedCourseServiceServer) EnrollStudentInCourse

func (UnimplementedCourseServiceServer) GetCourse

func (UnimplementedCourseServiceServer) SetCourse

func (UnimplementedCourseServiceServer) SetRatingCourse

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