coursepb

package
v3.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CourseSvc_CreateCourse_FullMethodName           = "/course.CourseSvc/CreateCourse"
	CourseSvc_GetCourse_FullMethodName              = "/course.CourseSvc/GetCourse"
	CourseSvc_UpdateCourse_FullMethodName           = "/course.CourseSvc/UpdateCourse"
	CourseSvc_DeleteCourse_FullMethodName           = "/course.CourseSvc/DeleteCourse"
	CourseSvc_DeleteCollectionCourse_FullMethodName = "/course.CourseSvc/DeleteCollectionCourse"
	CourseSvc_ListCourse_FullMethodName             = "/course.CourseSvc/ListCourse"
)

Variables

View Source
var CourseSvc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "course.CourseSvc",
	HandlerType: (*CourseSvcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateCourse",
			Handler:    _CourseSvc_CreateCourse_Handler,
		},
		{
			MethodName: "GetCourse",
			Handler:    _CourseSvc_GetCourse_Handler,
		},
		{
			MethodName: "UpdateCourse",
			Handler:    _CourseSvc_UpdateCourse_Handler,
		},
		{
			MethodName: "DeleteCourse",
			Handler:    _CourseSvc_DeleteCourse_Handler,
		},
		{
			MethodName: "DeleteCollectionCourse",
			Handler:    _CourseSvc_DeleteCollectionCourse_Handler,
		},
		{
			MethodName: "ListCourse",
			Handler:    _CourseSvc_ListCourse_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "course/course.proto",
}

CourseSvc_ServiceDesc is the grpc.ServiceDesc for CourseSvc 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 RegisterCourseSvcServer

func RegisterCourseSvcServer(s grpc.ServiceRegistrar, srv CourseSvcServer)

Types

type Course

type Course struct {
	Id                string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Uid               string               `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Name              string               `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Description       string               `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	Scenarios         []string             `protobuf:"bytes,5,rep,name=scenarios,proto3" json:"scenarios,omitempty"`
	Categories        []string             `protobuf:"bytes,6,rep,name=categories,proto3" json:"categories,omitempty"`
	Vms               []*general.StringMap `protobuf:"bytes,7,rep,name=vms,proto3" json:"vms,omitempty"`
	KeepaliveDuration string               `protobuf:"bytes,8,opt,name=keepalive_duration,json=keepaliveDuration,proto3" json:"keepalive_duration,omitempty"`
	PauseDuration     string               `protobuf:"bytes,9,opt,name=pause_duration,json=pauseDuration,proto3" json:"pause_duration,omitempty"`
	Pausable          bool                 `protobuf:"varint,10,opt,name=pausable,proto3" json:"pausable,omitempty"`
	KeepVm            bool                 `protobuf:"varint,11,opt,name=keep_vm,json=keepVm,proto3" json:"keep_vm,omitempty"`
	// contains filtered or unexported fields
}

func (*Course) Descriptor deprecated

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

Deprecated: Use Course.ProtoReflect.Descriptor instead.

func (*Course) GetCategories

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

func (*Course) GetDescription

func (x *Course) GetDescription() string

func (*Course) GetId

func (x *Course) GetId() string

func (*Course) GetKeepVm

func (x *Course) GetKeepVm() bool

func (*Course) GetKeepaliveDuration

func (x *Course) GetKeepaliveDuration() string

func (*Course) GetName

func (x *Course) GetName() string

func (*Course) GetPausable

func (x *Course) GetPausable() bool

func (*Course) GetPauseDuration

func (x *Course) GetPauseDuration() string

func (*Course) GetScenarios

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

func (*Course) GetUid

func (x *Course) GetUid() string

func (*Course) GetVms

func (x *Course) GetVms() []*general.StringMap

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 CourseSvcClient

type CourseSvcClient interface {
	CreateCourse(ctx context.Context, in *CreateCourseRequest, opts ...grpc.CallOption) (*general.ResourceId, error)
	GetCourse(ctx context.Context, in *general.GetRequest, opts ...grpc.CallOption) (*Course, error)
	UpdateCourse(ctx context.Context, in *UpdateCourseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteCourse(ctx context.Context, in *general.ResourceId, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteCollectionCourse(ctx context.Context, in *general.ListOptions, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ListCourse(ctx context.Context, in *general.ListOptions, opts ...grpc.CallOption) (*ListCoursesResponse, error)
}

CourseSvcClient is the client API for CourseSvc 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 NewCourseSvcClient

func NewCourseSvcClient(cc grpc.ClientConnInterface) CourseSvcClient

type CourseSvcServer

type CourseSvcServer interface {
	CreateCourse(context.Context, *CreateCourseRequest) (*general.ResourceId, error)
	GetCourse(context.Context, *general.GetRequest) (*Course, error)
	UpdateCourse(context.Context, *UpdateCourseRequest) (*emptypb.Empty, error)
	DeleteCourse(context.Context, *general.ResourceId) (*emptypb.Empty, error)
	DeleteCollectionCourse(context.Context, *general.ListOptions) (*emptypb.Empty, error)
	ListCourse(context.Context, *general.ListOptions) (*ListCoursesResponse, error)
	// contains filtered or unexported methods
}

CourseSvcServer is the server API for CourseSvc service. All implementations must embed UnimplementedCourseSvcServer for forward compatibility

type CreateCourseRequest

type CreateCourseRequest struct {
	Name              string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description       string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	RawScenarios      string `protobuf:"bytes,3,opt,name=raw_scenarios,json=rawScenarios,proto3" json:"raw_scenarios,omitempty"`
	RawCategories     string `protobuf:"bytes,4,opt,name=raw_categories,json=rawCategories,proto3" json:"raw_categories,omitempty"`
	RawVms            string `protobuf:"bytes,5,opt,name=raw_vms,json=rawVms,proto3" json:"raw_vms,omitempty"`
	KeepaliveDuration string `protobuf:"bytes,6,opt,name=keepalive_duration,json=keepaliveDuration,proto3" json:"keepalive_duration,omitempty"`
	PauseDuration     string `protobuf:"bytes,7,opt,name=pause_duration,json=pauseDuration,proto3" json:"pause_duration,omitempty"`
	Pausable          bool   `protobuf:"varint,8,opt,name=pausable,proto3" json:"pausable,omitempty"`
	KeepVm            bool   `protobuf:"varint,9,opt,name=keep_vm,json=keepVm,proto3" json:"keep_vm,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCourseRequest) Descriptor deprecated

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

Deprecated: Use CreateCourseRequest.ProtoReflect.Descriptor instead.

func (*CreateCourseRequest) GetDescription

func (x *CreateCourseRequest) GetDescription() string

func (*CreateCourseRequest) GetKeepVm

func (x *CreateCourseRequest) GetKeepVm() bool

func (*CreateCourseRequest) GetKeepaliveDuration

func (x *CreateCourseRequest) GetKeepaliveDuration() string

func (*CreateCourseRequest) GetName

func (x *CreateCourseRequest) GetName() string

func (*CreateCourseRequest) GetPausable

func (x *CreateCourseRequest) GetPausable() bool

func (*CreateCourseRequest) GetPauseDuration

func (x *CreateCourseRequest) GetPauseDuration() string

func (*CreateCourseRequest) GetRawCategories

func (x *CreateCourseRequest) GetRawCategories() string

func (*CreateCourseRequest) GetRawScenarios

func (x *CreateCourseRequest) GetRawScenarios() string

func (*CreateCourseRequest) GetRawVms

func (x *CreateCourseRequest) GetRawVms() 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 ListCoursesResponse

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

func (*ListCoursesResponse) Descriptor deprecated

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

Deprecated: Use ListCoursesResponse.ProtoReflect.Descriptor instead.

func (*ListCoursesResponse) GetCourses

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

func (*ListCoursesResponse) ProtoMessage

func (*ListCoursesResponse) ProtoMessage()

func (*ListCoursesResponse) ProtoReflect

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

func (*ListCoursesResponse) Reset

func (x *ListCoursesResponse) Reset()

func (*ListCoursesResponse) String

func (x *ListCoursesResponse) String() string

type UnimplementedCourseSvcServer

type UnimplementedCourseSvcServer struct {
}

UnimplementedCourseSvcServer must be embedded to have forward compatible implementations.

func (UnimplementedCourseSvcServer) CreateCourse

func (UnimplementedCourseSvcServer) DeleteCollectionCourse

func (UnimplementedCourseSvcServer) DeleteCourse

func (UnimplementedCourseSvcServer) GetCourse

func (UnimplementedCourseSvcServer) ListCourse

func (UnimplementedCourseSvcServer) UpdateCourse

type UnsafeCourseSvcServer

type UnsafeCourseSvcServer interface {
	// contains filtered or unexported methods
}

UnsafeCourseSvcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CourseSvcServer will result in compilation errors.

type UpdateCourseRequest

type UpdateCourseRequest struct {
	Id                string                  `protobuf:"bytes,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"`
	RawScenarios      string                  `protobuf:"bytes,4,opt,name=raw_scenarios,json=rawScenarios,proto3" json:"raw_scenarios,omitempty"`
	RawCategories     string                  `protobuf:"bytes,5,opt,name=raw_categories,json=rawCategories,proto3" json:"raw_categories,omitempty"`
	RawVms            string                  `protobuf:"bytes,6,opt,name=raw_vms,json=rawVms,proto3" json:"raw_vms,omitempty"`
	KeepaliveDuration *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=keepalive_duration,json=keepaliveDuration,proto3" json:"keepalive_duration,omitempty"`
	PauseDuration     *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=pause_duration,json=pauseDuration,proto3" json:"pause_duration,omitempty"`
	Pausable          *wrapperspb.BoolValue   `protobuf:"bytes,9,opt,name=pausable,proto3" json:"pausable,omitempty"`
	KeepVm            *wrapperspb.BoolValue   `protobuf:"bytes,10,opt,name=keep_vm,json=keepVm,proto3" json:"keep_vm,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateCourseRequest) Descriptor deprecated

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

Deprecated: Use UpdateCourseRequest.ProtoReflect.Descriptor instead.

func (*UpdateCourseRequest) GetDescription

func (x *UpdateCourseRequest) GetDescription() string

func (*UpdateCourseRequest) GetId

func (x *UpdateCourseRequest) GetId() string

func (*UpdateCourseRequest) GetKeepVm

func (x *UpdateCourseRequest) GetKeepVm() *wrapperspb.BoolValue

func (*UpdateCourseRequest) GetKeepaliveDuration

func (x *UpdateCourseRequest) GetKeepaliveDuration() *wrapperspb.StringValue

func (*UpdateCourseRequest) GetName

func (x *UpdateCourseRequest) GetName() string

func (*UpdateCourseRequest) GetPausable

func (x *UpdateCourseRequest) GetPausable() *wrapperspb.BoolValue

func (*UpdateCourseRequest) GetPauseDuration

func (x *UpdateCourseRequest) GetPauseDuration() *wrapperspb.StringValue

func (*UpdateCourseRequest) GetRawCategories

func (x *UpdateCourseRequest) GetRawCategories() string

func (*UpdateCourseRequest) GetRawScenarios

func (x *UpdateCourseRequest) GetRawScenarios() string

func (*UpdateCourseRequest) GetRawVms

func (x *UpdateCourseRequest) GetRawVms() 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

Jump to

Keyboard shortcuts

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