class

package
v0.0.0-...-a79a6e6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Class_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "class.Class",
	HandlerType: (*ClassServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddClass",
			Handler:    _Class_AddClass_Handler,
		},
		{
			MethodName: "ListClass",
			Handler:    _Class_ListClass_Handler,
		},
		{
			MethodName: "DeleteClass",
			Handler:    _Class_DeleteClass_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "class.proto",
}

Class_ServiceDesc is the grpc.ServiceDesc for Class 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_class_proto protoreflect.FileDescriptor

Functions

func RegisterClassServer

func RegisterClassServer(s grpc.ServiceRegistrar, srv ClassServer)

Types

type ClassClient

type ClassClient interface {
	AddClass(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*MessageResponse, error)
	ListClass(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	DeleteClass(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*MessageResponse, error)
}

ClassClient is the client API for Class 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 NewClassClient

func NewClassClient(cc grpc.ClientConnInterface) ClassClient

type ClassResponse

type ClassResponse 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"`
	Tag         string `protobuf:"bytes,4,opt,name=tag,proto3" json:"tag,omitempty"`
	CreatedAt   string `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Class Response Structure

func (*ClassResponse) Descriptor deprecated

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

Deprecated: Use ClassResponse.ProtoReflect.Descriptor instead.

func (*ClassResponse) GetCreatedAt

func (x *ClassResponse) GetCreatedAt() string

func (*ClassResponse) GetDescription

func (x *ClassResponse) GetDescription() string

func (*ClassResponse) GetId

func (x *ClassResponse) GetId() string

func (*ClassResponse) GetName

func (x *ClassResponse) GetName() string

func (*ClassResponse) GetTag

func (x *ClassResponse) GetTag() string

func (*ClassResponse) ProtoMessage

func (*ClassResponse) ProtoMessage()

func (*ClassResponse) ProtoReflect

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

func (*ClassResponse) Reset

func (x *ClassResponse) Reset()

func (*ClassResponse) String

func (x *ClassResponse) String() string

type ClassServer

type ClassServer interface {
	AddClass(context.Context, *CreateRequest) (*MessageResponse, error)
	ListClass(context.Context, *ListRequest) (*ListResponse, error)
	DeleteClass(context.Context, *DeleteRequest) (*MessageResponse, error)
	// contains filtered or unexported methods
}

ClassServer is the server API for Class service. All implementations must embed UnimplementedClassServer for forward compatibility

type CreateRequest

type CreateRequest 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"`
	Tag         []string `protobuf:"bytes,3,rep,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

Request for Create Class

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetDescription

func (x *CreateRequest) GetDescription() string

func (*CreateRequest) GetName

func (x *CreateRequest) GetName() string

func (*CreateRequest) GetTag

func (x *CreateRequest) GetTag() []string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type DeleteRequest

type DeleteRequest struct {
	Id          []string `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"`
	IsDeleteAll bool     `protobuf:"varint,2,opt,name=isDeleteAll,proto3" json:"isDeleteAll,omitempty"`
	// contains filtered or unexported fields
}

Request for Delete class

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() []string

func (*DeleteRequest) GetIsDeleteAll

func (x *DeleteRequest) GetIsDeleteAll() bool

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type ListRequest

type ListRequest struct {
	Id    []string `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"`
	Name  string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Tag   []string `protobuf:"bytes,3,rep,name=tag,proto3" json:"tag,omitempty"`
	First int64    `protobuf:"varint,4,opt,name=first,proto3" json:"first,omitempty"`
	Last  int64    `protobuf:"varint,5,opt,name=last,proto3" json:"last,omitempty"`
	Limit int64    `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"`
	Count bool     `protobuf:"varint,7,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

List Class Request

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetCount

func (x *ListRequest) GetCount() bool

func (*ListRequest) GetFirst

func (x *ListRequest) GetFirst() int64

func (*ListRequest) GetId

func (x *ListRequest) GetId() []string

func (*ListRequest) GetLast

func (x *ListRequest) GetLast() int64

func (*ListRequest) GetLimit

func (x *ListRequest) GetLimit() int64

func (*ListRequest) GetName

func (x *ListRequest) GetName() string

func (*ListRequest) GetTag

func (x *ListRequest) GetTag() []string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {
	ClassResponse []*ClassResponse `protobuf:"bytes,1,rep,name=classResponse,proto3" json:"classResponse,omitempty"`
	Count         int64            `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

Response to list class

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetClassResponse

func (x *ListResponse) GetClassResponse() []*ClassResponse

func (*ListResponse) GetCount

func (x *ListResponse) GetCount() int64

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

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

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type MessageResponse

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

Response for Class

func (*MessageResponse) Descriptor deprecated

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

Deprecated: Use MessageResponse.ProtoReflect.Descriptor instead.

func (*MessageResponse) GetMessage

func (x *MessageResponse) GetMessage() 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 UnimplementedClassServer

type UnimplementedClassServer struct {
}

UnimplementedClassServer must be embedded to have forward compatible implementations.

func (UnimplementedClassServer) AddClass

func (UnimplementedClassServer) DeleteClass

func (UnimplementedClassServer) ListClass

type UnsafeClassServer

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

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

Jump to

Keyboard shortcuts

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