pb

package
v0.0.0-...-85865ee Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Course_CourseStatus_name = map[int32]string{
		0: "INACTIVE",
		1: "ACTIVE",
	}
	Course_CourseStatus_value = map[string]int32{
		"INACTIVE": 0,
		"ACTIVE":   1,
	}
)

Enum value maps for Course_CourseStatus.

View Source
var (
	Course_Level_name = map[int32]string{
		0: "BEGINNER",
		1: "MEDIUM",
		2: "EXPERT",
	}
	Course_Level_value = map[string]int32{
		"BEGINNER": 0,
		"MEDIUM":   1,
		"EXPERT":   2,
	}
)

Enum value maps for Course_Level.

View Source
var (
	Section_SectionStatus_name = map[int32]string{
		0: "INACTIVE",
		1: "ACTIVE",
	}
	Section_SectionStatus_value = map[string]int32{
		"INACTIVE": 0,
		"ACTIVE":   1,
	}
)

Enum value maps for Section_SectionStatus.

View Source
var (
	Content_ContentStatus_name = map[int32]string{
		0: "INACTIVE",
		1: "ACTIVE",
	}
	Content_ContentStatus_value = map[string]int32{
		"INACTIVE": 0,
		"ACTIVE":   1,
	}
)

Enum value maps for Content_ContentStatus.

View Source
var CourseService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "course.CourseService",
	HandlerType: (*CourseServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateCourse",
			Handler:    _CourseService_CreateCourse_Handler,
		},
		{
			MethodName: "UpdateCourse",
			Handler:    _CourseService_UpdateCourse_Handler,
		},
		{
			MethodName: "DeleteCourse",
			Handler:    _CourseService_DeleteCourse_Handler,
		},
		{
			MethodName: "FindCourse",
			Handler:    _CourseService_FindCourse_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 AddSectionReq

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

func (*AddSectionReq) Descriptor deprecated

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

Deprecated: Use AddSectionReq.ProtoReflect.Descriptor instead.

func (*AddSectionReq) GetSection

func (x *AddSectionReq) GetSection() *Section

func (*AddSectionReq) ProtoMessage

func (*AddSectionReq) ProtoMessage()

func (*AddSectionReq) ProtoReflect

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

func (*AddSectionReq) Reset

func (x *AddSectionReq) Reset()

func (*AddSectionReq) String

func (x *AddSectionReq) String() string

type AddSectionResp

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

func (*AddSectionResp) Descriptor deprecated

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

Deprecated: Use AddSectionResp.ProtoReflect.Descriptor instead.

func (*AddSectionResp) GetSectionId

func (x *AddSectionResp) GetSectionId() string

func (*AddSectionResp) ProtoMessage

func (*AddSectionResp) ProtoMessage()

func (*AddSectionResp) ProtoReflect

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

func (*AddSectionResp) Reset

func (x *AddSectionResp) Reset()

func (*AddSectionResp) String

func (x *AddSectionResp) String() string

type Content

type Content struct {
	ContentId string                `protobuf:"bytes,1,opt,name=contentId,proto3" json:"contentId,omitempty"`
	Title     string                `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Subtitle  string                `protobuf:"bytes,3,opt,name=subtitle,proto3" json:"subtitle,omitempty"`
	Url       string                `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
	Article   string                `protobuf:"bytes,5,opt,name=article,proto3" json:"article,omitempty"`
	Status    Content_ContentStatus `protobuf:"varint,6,opt,name=status,proto3,enum=course.Content_ContentStatus" json:"status,omitempty"`
	Created   int64                 `protobuf:"varint,13,opt,name=created,proto3" json:"created,omitempty"`
	Modified  int64                 `protobuf:"varint,14,opt,name=modified,proto3" json:"modified,omitempty"`
	// contains filtered or unexported fields
}

func (*Content) Descriptor deprecated

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

Deprecated: Use Content.ProtoReflect.Descriptor instead.

func (*Content) GetArticle

func (x *Content) GetArticle() string

func (*Content) GetContentId

func (x *Content) GetContentId() string

func (*Content) GetCreated

func (x *Content) GetCreated() int64

func (*Content) GetModified

func (x *Content) GetModified() int64

func (*Content) GetStatus

func (x *Content) GetStatus() Content_ContentStatus

func (*Content) GetSubtitle

func (x *Content) GetSubtitle() string

func (*Content) GetTitle

func (x *Content) GetTitle() string

func (*Content) GetUrl

func (x *Content) GetUrl() string

func (*Content) ProtoMessage

func (*Content) ProtoMessage()

func (*Content) ProtoReflect

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

func (*Content) Reset

func (x *Content) Reset()

func (*Content) String

func (x *Content) String() string

type Content_ContentStatus

type Content_ContentStatus int32
const (
	Content_INACTIVE Content_ContentStatus = 0
	Content_ACTIVE   Content_ContentStatus = 1
)

func (Content_ContentStatus) Descriptor

func (Content_ContentStatus) Enum

func (Content_ContentStatus) EnumDescriptor deprecated

func (Content_ContentStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use Content_ContentStatus.Descriptor instead.

func (Content_ContentStatus) Number

func (Content_ContentStatus) String

func (x Content_ContentStatus) String() string

func (Content_ContentStatus) Type

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"`
	Subtitle    string              `protobuf:"bytes,3,opt,name=subtitle,proto3" json:"subtitle,omitempty"`
	Description string              `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	Learn       []string            `protobuf:"bytes,5,rep,name=learn,proto3" json:"learn,omitempty"`
	Requirement []string            `protobuf:"bytes,6,rep,name=requirement,proto3" json:"requirement,omitempty"`
	Votes       uint64              `protobuf:"varint,7,opt,name=votes,proto3" json:"votes,omitempty"`
	Students    uint64              `protobuf:"varint,8,opt,name=students,proto3" json:"students,omitempty"`
	Section     []*Section          `protobuf:"bytes,9,rep,name=section,proto3" json:"section,omitempty"`
	Lang        string              `protobuf:"bytes,10,opt,name=lang,proto3" json:"lang,omitempty"`
	Status      Course_CourseStatus `protobuf:"varint,11,opt,name=status,proto3,enum=course.Course_CourseStatus" json:"status,omitempty"`
	Level       Course_Level        `protobuf:"varint,12,opt,name=level,proto3,enum=course.Course_Level" json:"level,omitempty"`
	Created     int64               `protobuf:"varint,13,opt,name=created,proto3" json:"created,omitempty"`
	Modified    int64               `protobuf:"varint,14,opt,name=modified,proto3" json:"modified,omitempty"`
	// contains filtered or unexported fields
}

func (*Course) Descriptor deprecated

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

Deprecated: Use Course.ProtoReflect.Descriptor instead.

func (*Course) GetCreated

func (x *Course) GetCreated() int64

func (*Course) GetDescription

func (x *Course) GetDescription() string

func (*Course) GetId

func (x *Course) GetId() string

func (*Course) GetLang

func (x *Course) GetLang() string

func (*Course) GetLearn

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

func (*Course) GetLevel

func (x *Course) GetLevel() Course_Level

func (*Course) GetModified

func (x *Course) GetModified() int64

func (*Course) GetRequirement

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

func (*Course) GetSection

func (x *Course) GetSection() []*Section

func (*Course) GetStatus

func (x *Course) GetStatus() Course_CourseStatus

func (*Course) GetStudents

func (x *Course) GetStudents() uint64

func (*Course) GetSubtitle

func (x *Course) GetSubtitle() string

func (*Course) GetTitle

func (x *Course) GetTitle() string

func (*Course) GetVotes

func (x *Course) GetVotes() 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 CourseReq

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

func (*CourseReq) Descriptor deprecated

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

Deprecated: Use CourseReq.ProtoReflect.Descriptor instead.

func (*CourseReq) GetCourse

func (x *CourseReq) GetCourse() *Course

func (*CourseReq) ProtoMessage

func (*CourseReq) ProtoMessage()

func (*CourseReq) ProtoReflect

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

func (*CourseReq) Reset

func (x *CourseReq) Reset()

func (*CourseReq) String

func (x *CourseReq) String() string

type CourseResp

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

func (*CourseResp) Descriptor deprecated

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

Deprecated: Use CourseResp.ProtoReflect.Descriptor instead.

func (*CourseResp) GetCourse

func (x *CourseResp) GetCourse() *Course

func (*CourseResp) ProtoMessage

func (*CourseResp) ProtoMessage()

func (*CourseResp) ProtoReflect

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

func (*CourseResp) Reset

func (x *CourseResp) Reset()

func (*CourseResp) String

func (x *CourseResp) String() string

type CourseServiceClient

type CourseServiceClient interface {
	CreateCourse(ctx context.Context, in *CourseReq, opts ...grpc.CallOption) (*CreateCourseResp, error)
	UpdateCourse(ctx context.Context, in *CourseReq, opts ...grpc.CallOption) (*UpdateCourseResp, error)
	DeleteCourse(ctx context.Context, in *DeleteCourseReq, opts ...grpc.CallOption) (*DeleteCourseResp, error)
	FindCourse(ctx context.Context, in *FindCourseReq, opts ...grpc.CallOption) (*CourseResp, 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 {
	CreateCourse(context.Context, *CourseReq) (*CreateCourseResp, error)
	UpdateCourse(context.Context, *CourseReq) (*UpdateCourseResp, error)
	DeleteCourse(context.Context, *DeleteCourseReq) (*DeleteCourseResp, error)
	FindCourse(context.Context, *FindCourseReq) (*CourseResp, error)
}

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

type Course_CourseStatus

type Course_CourseStatus int32
const (
	Course_INACTIVE Course_CourseStatus = 0
	Course_ACTIVE   Course_CourseStatus = 1
)

func (Course_CourseStatus) Descriptor

func (Course_CourseStatus) Enum

func (Course_CourseStatus) EnumDescriptor deprecated

func (Course_CourseStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use Course_CourseStatus.Descriptor instead.

func (Course_CourseStatus) Number

func (Course_CourseStatus) String

func (x Course_CourseStatus) String() string

func (Course_CourseStatus) Type

type Course_Level

type Course_Level int32
const (
	Course_BEGINNER Course_Level = 0
	Course_MEDIUM   Course_Level = 1
	Course_EXPERT   Course_Level = 2
)

func (Course_Level) Descriptor

func (Course_Level) Enum

func (x Course_Level) Enum() *Course_Level

func (Course_Level) EnumDescriptor deprecated

func (Course_Level) EnumDescriptor() ([]byte, []int)

Deprecated: Use Course_Level.Descriptor instead.

func (Course_Level) Number

func (Course_Level) String

func (x Course_Level) String() string

func (Course_Level) Type

type CreateCourseResp

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

func (*CreateCourseResp) Descriptor deprecated

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

Deprecated: Use CreateCourseResp.ProtoReflect.Descriptor instead.

func (*CreateCourseResp) GetCourseId

func (x *CreateCourseResp) GetCourseId() string

func (*CreateCourseResp) ProtoMessage

func (*CreateCourseResp) ProtoMessage()

func (*CreateCourseResp) ProtoReflect

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

func (*CreateCourseResp) Reset

func (x *CreateCourseResp) Reset()

func (*CreateCourseResp) String

func (x *CreateCourseResp) String() string

type DeleteCourseReq

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

func (*DeleteCourseReq) Descriptor deprecated

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

Deprecated: Use DeleteCourseReq.ProtoReflect.Descriptor instead.

func (*DeleteCourseReq) GetCourseId

func (x *DeleteCourseReq) GetCourseId() string

func (*DeleteCourseReq) ProtoMessage

func (*DeleteCourseReq) ProtoMessage()

func (*DeleteCourseReq) ProtoReflect

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

func (*DeleteCourseReq) Reset

func (x *DeleteCourseReq) Reset()

func (*DeleteCourseReq) String

func (x *DeleteCourseReq) String() string

type DeleteCourseResp

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

func (*DeleteCourseResp) Descriptor deprecated

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

Deprecated: Use DeleteCourseResp.ProtoReflect.Descriptor instead.

func (*DeleteCourseResp) GetError

func (x *DeleteCourseResp) GetError() string

func (*DeleteCourseResp) ProtoMessage

func (*DeleteCourseResp) ProtoMessage()

func (*DeleteCourseResp) ProtoReflect

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

func (*DeleteCourseResp) Reset

func (x *DeleteCourseResp) Reset()

func (*DeleteCourseResp) String

func (x *DeleteCourseResp) String() string

type EmptyReq

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

func (*EmptyReq) Descriptor deprecated

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

Deprecated: Use EmptyReq.ProtoReflect.Descriptor instead.

func (*EmptyReq) ProtoMessage

func (*EmptyReq) ProtoMessage()

func (*EmptyReq) ProtoReflect

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

func (*EmptyReq) Reset

func (x *EmptyReq) Reset()

func (*EmptyReq) String

func (x *EmptyReq) String() string

type FindCourseReq

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

func (*FindCourseReq) Descriptor deprecated

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

Deprecated: Use FindCourseReq.ProtoReflect.Descriptor instead.

func (*FindCourseReq) GetCourseId

func (x *FindCourseReq) GetCourseId() string

func (*FindCourseReq) ProtoMessage

func (*FindCourseReq) ProtoMessage()

func (*FindCourseReq) ProtoReflect

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

func (*FindCourseReq) Reset

func (x *FindCourseReq) Reset()

func (*FindCourseReq) String

func (x *FindCourseReq) String() string

type Section

type Section struct {
	SectionId string                `protobuf:"bytes,1,opt,name=section_id,json=sectionId,proto3" json:"section_id,omitempty"`
	Title     string                `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Content   []*Content            `protobuf:"bytes,3,rep,name=content,proto3" json:"content,omitempty"`
	Status    Section_SectionStatus `protobuf:"varint,4,opt,name=status,proto3,enum=course.Section_SectionStatus" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*Section) Descriptor deprecated

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

Deprecated: Use Section.ProtoReflect.Descriptor instead.

func (*Section) GetContent

func (x *Section) GetContent() []*Content

func (*Section) GetSectionId

func (x *Section) GetSectionId() string

func (*Section) GetStatus

func (x *Section) GetStatus() Section_SectionStatus

func (*Section) GetTitle

func (x *Section) GetTitle() string

func (*Section) ProtoMessage

func (*Section) ProtoMessage()

func (*Section) ProtoReflect

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

func (*Section) Reset

func (x *Section) Reset()

func (*Section) String

func (x *Section) String() string

type Section_SectionStatus

type Section_SectionStatus int32
const (
	Section_INACTIVE Section_SectionStatus = 0
	Section_ACTIVE   Section_SectionStatus = 1
)

func (Section_SectionStatus) Descriptor

func (Section_SectionStatus) Enum

func (Section_SectionStatus) EnumDescriptor deprecated

func (Section_SectionStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use Section_SectionStatus.Descriptor instead.

func (Section_SectionStatus) Number

func (Section_SectionStatus) String

func (x Section_SectionStatus) String() string

func (Section_SectionStatus) Type

type UnimplementedCourseServiceServer

type UnimplementedCourseServiceServer struct {
}

UnimplementedCourseServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedCourseServiceServer) CreateCourse

func (UnimplementedCourseServiceServer) DeleteCourse

func (UnimplementedCourseServiceServer) FindCourse

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 UpdateCourseResp

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

func (*UpdateCourseResp) Descriptor deprecated

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

Deprecated: Use UpdateCourseResp.ProtoReflect.Descriptor instead.

func (*UpdateCourseResp) GetCourse

func (x *UpdateCourseResp) GetCourse() *Course

func (*UpdateCourseResp) ProtoMessage

func (*UpdateCourseResp) ProtoMessage()

func (*UpdateCourseResp) ProtoReflect

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

func (*UpdateCourseResp) Reset

func (x *UpdateCourseResp) Reset()

func (*UpdateCourseResp) String

func (x *UpdateCourseResp) String() string

Jump to

Keyboard shortcuts

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