Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterProjectServiceHTTPServer(s *http.Server, srv ProjectServiceHTTPServer)
- func RegisterProjectServiceServer(s grpc.ServiceRegistrar, srv ProjectServiceServer)
- type Project
- func (*Project) Descriptor() ([]byte, []int)deprecated
- func (x *Project) GetClusterId() int64
- func (x *Project) GetDescription() string
- func (x *Project) GetId() int64
- func (x *Project) GetLimitCpu() int32
- func (x *Project) GetLimitDisk() int32
- func (x *Project) GetLimitGpu() int32
- func (x *Project) GetLimitMemory() int32
- func (x *Project) GetName() string
- func (x *Project) GetUpdatedAt() string
- func (x *Project) GetUserId() int64
- func (x *Project) GetUserName() string
- func (x *Project) GetWorkspaceId() int64
- func (*Project) ProtoMessage()
- func (x *Project) ProtoReflect() protoreflect.Message
- func (x *Project) Reset()
- func (x *Project) String() string
- type ProjectList
- type ProjectReq
- func (*ProjectReq) Descriptor() ([]byte, []int)deprecated
- func (x *ProjectReq) GetClusterId() int64
- func (x *ProjectReq) GetId() int64
- func (x *ProjectReq) GetName() string
- func (x *ProjectReq) GetWorkspaceId() int64
- func (*ProjectReq) ProtoMessage()
- func (x *ProjectReq) ProtoReflect() protoreflect.Message
- func (x *ProjectReq) Reset()
- func (x *ProjectReq) String() string
- type ProjectServiceClient
- type ProjectServiceHTTPClient
- type ProjectServiceHTTPClientImpl
- func (c *ProjectServiceHTTPClientImpl) Delete(ctx context.Context, in *ProjectReq, opts ...http.CallOption) (*common.Msg, error)
- func (c *ProjectServiceHTTPClientImpl) Get(ctx context.Context, in *ProjectReq, opts ...http.CallOption) (*Project, error)
- func (c *ProjectServiceHTTPClientImpl) List(ctx context.Context, in *ProjectReq, opts ...http.CallOption) (*ProjectList, error)
- func (c *ProjectServiceHTTPClientImpl) Save(ctx context.Context, in *Project, opts ...http.CallOption) (*common.Msg, error)
- type ProjectServiceHTTPServer
- type ProjectServiceServer
- type UnimplementedProjectServiceServer
- func (UnimplementedProjectServiceServer) Delete(context.Context, *ProjectReq) (*common.Msg, error)
- func (UnimplementedProjectServiceServer) Get(context.Context, *ProjectReq) (*Project, error)
- func (UnimplementedProjectServiceServer) List(context.Context, *ProjectReq) (*ProjectList, error)
- func (UnimplementedProjectServiceServer) Save(context.Context, *Project) (*common.Msg, error)
- type UnsafeProjectServiceServer
Constants ¶
const ( ProjectService_Save_FullMethodName = "/project.v1alpha1.ProjectService/Save" ProjectService_Get_FullMethodName = "/project.v1alpha1.ProjectService/Get" ProjectService_List_FullMethodName = "/project.v1alpha1.ProjectService/List" ProjectService_Delete_FullMethodName = "/project.v1alpha1.ProjectService/Delete" )
const OperationProjectServiceDelete = "/project.v1alpha1.ProjectService/Delete"
const OperationProjectServiceGet = "/project.v1alpha1.ProjectService/Get"
const OperationProjectServiceList = "/project.v1alpha1.ProjectService/List"
const OperationProjectServiceSave = "/project.v1alpha1.ProjectService/Save"
Variables ¶
var File_api_project_v1alpha1_message_proto protoreflect.FileDescriptor
var File_api_project_v1alpha1_project_proto protoreflect.FileDescriptor
var ProjectService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "project.v1alpha1.ProjectService", HandlerType: (*ProjectServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Save", Handler: _ProjectService_Save_Handler, }, { MethodName: "Get", Handler: _ProjectService_Get_Handler, }, { MethodName: "List", Handler: _ProjectService_List_Handler, }, { MethodName: "Delete", Handler: _ProjectService_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/project/v1alpha1/project.proto", }
ProjectService_ServiceDesc is the grpc.ServiceDesc for ProjectService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProjectServiceHTTPServer ¶
func RegisterProjectServiceHTTPServer(s *http.Server, srv ProjectServiceHTTPServer)
func RegisterProjectServiceServer ¶
func RegisterProjectServiceServer(s grpc.ServiceRegistrar, srv ProjectServiceServer)
Types ¶
type Project ¶
type Project struct { Id int64 `protobuf:"varint,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"` ClusterId int64 `protobuf:"varint,4,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` UserId int64 `protobuf:"varint,5,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` UserName string `protobuf:"bytes,6,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` WorkspaceId int64 `protobuf:"varint,7,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` LimitCpu int32 `protobuf:"varint,8,opt,name=limit_cpu,json=limitCpu,proto3" json:"limit_cpu,omitempty"` LimitGpu int32 `protobuf:"varint,9,opt,name=limit_gpu,json=limitGpu,proto3" json:"limit_gpu,omitempty"` LimitMemory int32 `protobuf:"varint,10,opt,name=limit_memory,json=limitMemory,proto3" json:"limit_memory,omitempty"` LimitDisk int32 `protobuf:"varint,11,opt,name=limit_disk,json=limitDisk,proto3" json:"limit_disk,omitempty"` UpdatedAt string `protobuf:"bytes,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*Project) Descriptor
deprecated
func (*Project) GetClusterId ¶
func (*Project) GetDescription ¶
func (*Project) GetLimitCpu ¶
func (*Project) GetLimitDisk ¶
func (*Project) GetLimitGpu ¶
func (*Project) GetLimitMemory ¶
func (*Project) GetUpdatedAt ¶
func (*Project) GetUserName ¶
func (*Project) GetWorkspaceId ¶
func (*Project) ProtoMessage ¶
func (*Project) ProtoMessage()
func (*Project) ProtoReflect ¶
func (x *Project) ProtoReflect() protoreflect.Message
type ProjectList ¶
type ProjectList struct { Projects []*Project `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"` // contains filtered or unexported fields }
func (*ProjectList) Descriptor
deprecated
func (*ProjectList) Descriptor() ([]byte, []int)
Deprecated: Use ProjectList.ProtoReflect.Descriptor instead.
func (*ProjectList) GetProjects ¶
func (x *ProjectList) GetProjects() []*Project
func (*ProjectList) ProtoMessage ¶
func (*ProjectList) ProtoMessage()
func (*ProjectList) ProtoReflect ¶
func (x *ProjectList) ProtoReflect() protoreflect.Message
func (*ProjectList) Reset ¶
func (x *ProjectList) Reset()
func (*ProjectList) String ¶
func (x *ProjectList) String() string
type ProjectReq ¶
type ProjectReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` ClusterId int64 `protobuf:"varint,3,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` WorkspaceId int64 `protobuf:"varint,4,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` // contains filtered or unexported fields }
func (*ProjectReq) Descriptor
deprecated
func (*ProjectReq) Descriptor() ([]byte, []int)
Deprecated: Use ProjectReq.ProtoReflect.Descriptor instead.
func (*ProjectReq) GetClusterId ¶
func (x *ProjectReq) GetClusterId() int64
func (*ProjectReq) GetId ¶
func (x *ProjectReq) GetId() int64
func (*ProjectReq) GetName ¶
func (x *ProjectReq) GetName() string
func (*ProjectReq) GetWorkspaceId ¶
func (x *ProjectReq) GetWorkspaceId() int64
func (*ProjectReq) ProtoMessage ¶
func (*ProjectReq) ProtoMessage()
func (*ProjectReq) ProtoReflect ¶
func (x *ProjectReq) ProtoReflect() protoreflect.Message
func (*ProjectReq) Reset ¶
func (x *ProjectReq) Reset()
func (*ProjectReq) String ¶
func (x *ProjectReq) String() string
type ProjectServiceClient ¶
type ProjectServiceClient interface { Save(ctx context.Context, in *Project, opts ...grpc.CallOption) (*common.Msg, error) Get(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*Project, error) List(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*ProjectList, error) Delete(ctx context.Context, in *ProjectReq, opts ...grpc.CallOption) (*common.Msg, error) }
ProjectServiceClient is the client API for ProjectService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkgo.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewProjectServiceClient ¶
func NewProjectServiceClient(cc grpc.ClientConnInterface) ProjectServiceClient
type ProjectServiceHTTPClient ¶
type ProjectServiceHTTPClient interface { Delete(ctx context.Context, req *ProjectReq, opts ...http.CallOption) (rsp *common.Msg, err error) Get(ctx context.Context, req *ProjectReq, opts ...http.CallOption) (rsp *Project, err error) List(ctx context.Context, req *ProjectReq, opts ...http.CallOption) (rsp *ProjectList, err error) Save(ctx context.Context, req *Project, opts ...http.CallOption) (rsp *common.Msg, err error) }
func NewProjectServiceHTTPClient ¶
func NewProjectServiceHTTPClient(client *http.Client) ProjectServiceHTTPClient
type ProjectServiceHTTPClientImpl ¶
type ProjectServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*ProjectServiceHTTPClientImpl) Delete ¶
func (c *ProjectServiceHTTPClientImpl) Delete(ctx context.Context, in *ProjectReq, opts ...http.CallOption) (*common.Msg, error)
func (*ProjectServiceHTTPClientImpl) Get ¶
func (c *ProjectServiceHTTPClientImpl) Get(ctx context.Context, in *ProjectReq, opts ...http.CallOption) (*Project, error)
func (*ProjectServiceHTTPClientImpl) List ¶
func (c *ProjectServiceHTTPClientImpl) List(ctx context.Context, in *ProjectReq, opts ...http.CallOption) (*ProjectList, error)
type ProjectServiceServer ¶
type ProjectServiceServer interface { Save(context.Context, *Project) (*common.Msg, error) Get(context.Context, *ProjectReq) (*Project, error) List(context.Context, *ProjectReq) (*ProjectList, error) Delete(context.Context, *ProjectReq) (*common.Msg, error) // contains filtered or unexported methods }
ProjectServiceServer is the server API for ProjectService service. All implementations must embed UnimplementedProjectServiceServer for forward compatibility.
type UnimplementedProjectServiceServer ¶
type UnimplementedProjectServiceServer struct{}
UnimplementedProjectServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedProjectServiceServer) Delete ¶
func (UnimplementedProjectServiceServer) Delete(context.Context, *ProjectReq) (*common.Msg, error)
func (UnimplementedProjectServiceServer) Get ¶
func (UnimplementedProjectServiceServer) Get(context.Context, *ProjectReq) (*Project, error)
func (UnimplementedProjectServiceServer) List ¶
func (UnimplementedProjectServiceServer) List(context.Context, *ProjectReq) (*ProjectList, error)
type UnsafeProjectServiceServer ¶
type UnsafeProjectServiceServer interface {
// contains filtered or unexported methods
}
UnsafeProjectServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProjectServiceServer will result in compilation errors.