course

package
v0.0.0-...-f6108e4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CourseService_CreateCourse_FullMethodName  = "/course.CourseService/CreateCourse"
	CourseService_GetAllCourses_FullMethodName = "/course.CourseService/GetAllCourses"
	CourseService_GetCourse_FullMethodName     = "/course.CourseService/GetCourse"
	CourseService_UpdateCourse_FullMethodName  = "/course.CourseService/UpdateCourse"
	CourseService_DeleteCourse_FullMethodName  = "/course.CourseService/DeleteCourse"
)

Variables

View Source
var CourseService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "course.CourseService",
	HandlerType: (*CourseServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateCourse",
			Handler:    _CourseService_CreateCourse_Handler,
		},
		{
			MethodName: "GetAllCourses",
			Handler:    _CourseService_GetAllCourses_Handler,
		},
		{
			MethodName: "GetCourse",
			Handler:    _CourseService_GetCourse_Handler,
		},
		{
			MethodName: "UpdateCourse",
			Handler:    _CourseService_UpdateCourse_Handler,
		},
		{
			MethodName: "DeleteCourse",
			Handler:    _CourseService_DeleteCourse_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "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_proto protoreflect.FileDescriptor

Functions

func RegisterCourseServiceServer

func RegisterCourseServiceServer(s grpc.ServiceRegistrar, srv CourseServiceServer)

Types

type Course

type Course struct {
	Id          string    `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Title       string    `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Description string    `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	CreatorId   string    `protobuf:"bytes,4,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"`
	Likes       int32     `protobuf:"varint,5,opt,name=likes,proto3" json:"likes,omitempty"`
	Students    []string  `protobuf:"bytes,6,rep,name=students,proto3" json:"students,omitempty"`
	Topics      []string  `protobuf:"bytes,7,rep,name=topics,proto3" json:"topics,omitempty"`
	Modules     []*Module `protobuf:"bytes,8,rep,name=modules,proto3" json:"modules,omitempty"`
	UpdatedAt   string    `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	CreatedAt   string    `protobuf:"bytes,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

The Course message representing a course object

func (*Course) Descriptor deprecated

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

Deprecated: Use Course.ProtoReflect.Descriptor instead.

func (*Course) GetCreatedAt

func (x *Course) GetCreatedAt() string

func (*Course) GetCreatorId

func (x *Course) GetCreatorId() string

func (*Course) GetDescription

func (x *Course) GetDescription() string

func (*Course) GetId

func (x *Course) GetId() string

func (*Course) GetLikes

func (x *Course) GetLikes() int32

func (*Course) GetModules

func (x *Course) GetModules() []*Module

func (*Course) GetStudents

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

func (*Course) GetTitle

func (x *Course) GetTitle() string

func (*Course) GetTopics

func (x *Course) GetTopics() []string

func (*Course) GetUpdatedAt

func (x *Course) GetUpdatedAt() string

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 CourseServiceClient

type CourseServiceClient interface {
	CreateCourse(ctx context.Context, in *CreateCourseRequest, opts ...grpc.CallOption) (*CreateCourseResponse, error)
	GetAllCourses(ctx context.Context, in *GetAllCoursesRequest, opts ...grpc.CallOption) (*GetAllCoursesResponse, error)
	GetCourse(ctx context.Context, in *GetCourseRequest, opts ...grpc.CallOption) (*GetCourseResponse, error)
	UpdateCourse(ctx context.Context, in *UpdateCourseRequest, opts ...grpc.CallOption) (*UpdateCourseResponse, error)
	DeleteCourse(ctx context.Context, in *DeleteCourseRequest, opts ...grpc.CallOption) (*DeleteCourseResponse, 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.

Service definition for CourseService

type CourseServiceServer

type CourseServiceServer interface {
	CreateCourse(context.Context, *CreateCourseRequest) (*CreateCourseResponse, error)
	GetAllCourses(context.Context, *GetAllCoursesRequest) (*GetAllCoursesResponse, error)
	GetCourse(context.Context, *GetCourseRequest) (*GetCourseResponse, error)
	UpdateCourse(context.Context, *UpdateCourseRequest) (*UpdateCourseResponse, error)
	DeleteCourse(context.Context, *DeleteCourseRequest) (*DeleteCourseResponse, error)
	// contains filtered or unexported methods
}

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

Service definition for CourseService

type CreateCourseRequest

type CreateCourseRequest struct {
	Title       string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	CreatorId   string `protobuf:"bytes,3,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"`
	// contains filtered or unexported fields
}

Request message for creating a new course

func (*CreateCourseRequest) Descriptor deprecated

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

Deprecated: Use CreateCourseRequest.ProtoReflect.Descriptor instead.

func (*CreateCourseRequest) GetCreatorId

func (x *CreateCourseRequest) GetCreatorId() string

func (*CreateCourseRequest) GetDescription

func (x *CreateCourseRequest) GetDescription() string

func (*CreateCourseRequest) GetTitle

func (x *CreateCourseRequest) GetTitle() string

func (*CreateCourseRequest) ProtoMessage

func (*CreateCourseRequest) ProtoMessage()

func (*CreateCourseRequest) ProtoReflect

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

func (*CreateCourseRequest) Reset

func (x *CreateCourseRequest) Reset()

func (*CreateCourseRequest) String

func (x *CreateCourseRequest) String() string

type CreateCourseResponse

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

Response message for creating a new course

func (*CreateCourseResponse) Descriptor deprecated

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

Deprecated: Use CreateCourseResponse.ProtoReflect.Descriptor instead.

func (*CreateCourseResponse) GetId

func (x *CreateCourseResponse) GetId() string

func (*CreateCourseResponse) ProtoMessage

func (*CreateCourseResponse) ProtoMessage()

func (*CreateCourseResponse) ProtoReflect

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

func (*CreateCourseResponse) Reset

func (x *CreateCourseResponse) Reset()

func (*CreateCourseResponse) String

func (x *CreateCourseResponse) String() string

type DeleteCourseRequest

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

Request message for deleting a course by id

func (*DeleteCourseRequest) Descriptor deprecated

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

Deprecated: Use DeleteCourseRequest.ProtoReflect.Descriptor instead.

func (*DeleteCourseRequest) GetTitle

func (x *DeleteCourseRequest) GetTitle() string

func (*DeleteCourseRequest) ProtoMessage

func (*DeleteCourseRequest) ProtoMessage()

func (*DeleteCourseRequest) ProtoReflect

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

func (*DeleteCourseRequest) Reset

func (x *DeleteCourseRequest) Reset()

func (*DeleteCourseRequest) String

func (x *DeleteCourseRequest) String() string

type DeleteCourseResponse

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

Response message for deleting a course by id

func (*DeleteCourseResponse) Descriptor deprecated

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

Deprecated: Use DeleteCourseResponse.ProtoReflect.Descriptor instead.

func (*DeleteCourseResponse) GetId

func (x *DeleteCourseResponse) GetId() string

func (*DeleteCourseResponse) ProtoMessage

func (*DeleteCourseResponse) ProtoMessage()

func (*DeleteCourseResponse) ProtoReflect

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

func (*DeleteCourseResponse) Reset

func (x *DeleteCourseResponse) Reset()

func (*DeleteCourseResponse) String

func (x *DeleteCourseResponse) String() string

type GetAllCoursesRequest

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

Request message for retrieving all courses

func (*GetAllCoursesRequest) Descriptor deprecated

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

Deprecated: Use GetAllCoursesRequest.ProtoReflect.Descriptor instead.

func (*GetAllCoursesRequest) ProtoMessage

func (*GetAllCoursesRequest) ProtoMessage()

func (*GetAllCoursesRequest) ProtoReflect

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

func (*GetAllCoursesRequest) Reset

func (x *GetAllCoursesRequest) Reset()

func (*GetAllCoursesRequest) String

func (x *GetAllCoursesRequest) String() string

type GetAllCoursesResponse

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

Response message for retrieving all courses

func (*GetAllCoursesResponse) Descriptor deprecated

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

Deprecated: Use GetAllCoursesResponse.ProtoReflect.Descriptor instead.

func (*GetAllCoursesResponse) GetCourses

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

func (*GetAllCoursesResponse) ProtoMessage

func (*GetAllCoursesResponse) ProtoMessage()

func (*GetAllCoursesResponse) ProtoReflect

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

func (*GetAllCoursesResponse) Reset

func (x *GetAllCoursesResponse) Reset()

func (*GetAllCoursesResponse) String

func (x *GetAllCoursesResponse) String() string

type GetCourseRequest

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

Request message for retrieving a course by id

func (*GetCourseRequest) Descriptor deprecated

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

Deprecated: Use GetCourseRequest.ProtoReflect.Descriptor instead.

func (*GetCourseRequest) GetTitle

func (x *GetCourseRequest) GetTitle() string

func (*GetCourseRequest) ProtoMessage

func (*GetCourseRequest) ProtoMessage()

func (*GetCourseRequest) ProtoReflect

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

func (*GetCourseRequest) Reset

func (x *GetCourseRequest) Reset()

func (*GetCourseRequest) String

func (x *GetCourseRequest) String() string

type GetCourseResponse

type GetCourseResponse struct {
	Course *Course `protobuf:"bytes,1,opt,name=course,proto3" json:"course,omitempty"`
	// contains filtered or unexported fields
}

Response message for retrieving a course by id

func (*GetCourseResponse) Descriptor deprecated

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

Deprecated: Use GetCourseResponse.ProtoReflect.Descriptor instead.

func (*GetCourseResponse) GetCourse

func (x *GetCourseResponse) GetCourse() *Course

func (*GetCourseResponse) ProtoMessage

func (*GetCourseResponse) ProtoMessage()

func (*GetCourseResponse) ProtoReflect

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

func (*GetCourseResponse) Reset

func (x *GetCourseResponse) Reset()

func (*GetCourseResponse) String

func (x *GetCourseResponse) String() string

type Module

type Module struct {
	Id    string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Title string  `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Tasks []*Task `protobuf:"bytes,3,rep,name=tasks,proto3" json:"tasks,omitempty"`
	// contains filtered or unexported fields
}

The Module message representing a module within a course

func (*Module) Descriptor deprecated

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

Deprecated: Use Module.ProtoReflect.Descriptor instead.

func (*Module) GetId

func (x *Module) GetId() string

func (*Module) GetTasks

func (x *Module) GetTasks() []*Task

func (*Module) GetTitle

func (x *Module) GetTitle() string

func (*Module) ProtoMessage

func (*Module) ProtoMessage()

func (*Module) ProtoReflect

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

func (*Module) Reset

func (x *Module) Reset()

func (*Module) String

func (x *Module) String() string

type Task

type Task struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Task string `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"`
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Xp   int32  `protobuf:"varint,4,opt,name=xp,proto3" json:"xp,omitempty"`
	// contains filtered or unexported fields
}

The Task message representing a task within a module

func (*Task) Descriptor deprecated

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

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetId

func (x *Task) GetId() string

func (*Task) GetTask

func (x *Task) GetTask() string

func (*Task) GetType

func (x *Task) GetType() string

func (*Task) GetXp

func (x *Task) GetXp() int32

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) ProtoReflect

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

func (*Task) Reset

func (x *Task) Reset()

func (*Task) String

func (x *Task) String() string

type UnimplementedCourseServiceServer

type UnimplementedCourseServiceServer struct {
}

UnimplementedCourseServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCourseServiceServer) CreateCourse

func (UnimplementedCourseServiceServer) DeleteCourse

func (UnimplementedCourseServiceServer) GetAllCourses

func (UnimplementedCourseServiceServer) GetCourse

func (UnimplementedCourseServiceServer) UpdateCourse

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.

type UpdateCourseRequest

type UpdateCourseRequest struct {
	Title       string    `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string    `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	CreatorId   string    `protobuf:"bytes,3,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"`
	Likes       int32     `protobuf:"varint,4,opt,name=likes,proto3" json:"likes,omitempty"`
	Students    []string  `protobuf:"bytes,5,rep,name=students,proto3" json:"students,omitempty"`
	Topics      []string  `protobuf:"bytes,6,rep,name=topics,proto3" json:"topics,omitempty"`
	Modules     []*Module `protobuf:"bytes,7,rep,name=modules,proto3" json:"modules,omitempty"`
	// contains filtered or unexported fields
}

Request message for updating an existing course

func (*UpdateCourseRequest) Descriptor deprecated

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

Deprecated: Use UpdateCourseRequest.ProtoReflect.Descriptor instead.

func (*UpdateCourseRequest) GetCreatorId

func (x *UpdateCourseRequest) GetCreatorId() string

func (*UpdateCourseRequest) GetDescription

func (x *UpdateCourseRequest) GetDescription() string

func (*UpdateCourseRequest) GetLikes

func (x *UpdateCourseRequest) GetLikes() int32

func (*UpdateCourseRequest) GetModules

func (x *UpdateCourseRequest) GetModules() []*Module

func (*UpdateCourseRequest) GetStudents

func (x *UpdateCourseRequest) GetStudents() []string

func (*UpdateCourseRequest) GetTitle

func (x *UpdateCourseRequest) GetTitle() string

func (*UpdateCourseRequest) GetTopics

func (x *UpdateCourseRequest) GetTopics() []string

func (*UpdateCourseRequest) ProtoMessage

func (*UpdateCourseRequest) ProtoMessage()

func (*UpdateCourseRequest) ProtoReflect

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

func (*UpdateCourseRequest) Reset

func (x *UpdateCourseRequest) Reset()

func (*UpdateCourseRequest) String

func (x *UpdateCourseRequest) String() string

type UpdateCourseResponse

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

Response message for updating an existing course

func (*UpdateCourseResponse) Descriptor deprecated

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

Deprecated: Use UpdateCourseResponse.ProtoReflect.Descriptor instead.

func (*UpdateCourseResponse) GetId

func (x *UpdateCourseResponse) GetId() string

func (*UpdateCourseResponse) ProtoMessage

func (*UpdateCourseResponse) ProtoMessage()

func (*UpdateCourseResponse) ProtoReflect

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

func (*UpdateCourseResponse) Reset

func (x *UpdateCourseResponse) Reset()

func (*UpdateCourseResponse) String

func (x *UpdateCourseResponse) String() string

Jump to

Keyboard shortcuts

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