Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterWorkspaceInterfaceHTTPServer(s *http.Server, srv WorkspaceInterfaceHTTPServer)
- func RegisterWorkspaceInterfaceServer(s grpc.ServiceRegistrar, srv WorkspaceInterfaceServer)
- type UnimplementedWorkspaceInterfaceServer
- func (UnimplementedWorkspaceInterfaceServer) Get(context.Context, *WorkspaceParam) (*Workspace, error)
- func (UnimplementedWorkspaceInterfaceServer) List(context.Context, *WorkspaceParam) (*Workspaces, error)
- func (UnimplementedWorkspaceInterfaceServer) Save(context.Context, *Workspace) (*common.Msg, error)
- type UnsafeWorkspaceInterfaceServer
- type Workspace
- func (*Workspace) Descriptor() ([]byte, []int)deprecated
- func (x *Workspace) GetClusterId() int64
- func (x *Workspace) GetCpuRate() int32
- func (x *Workspace) GetDescription() string
- func (x *Workspace) GetDiskRate() int32
- func (x *Workspace) GetGpuRate() int32
- func (x *Workspace) GetId() int64
- func (x *Workspace) GetLimitCpu() int32
- func (x *Workspace) GetLimitDisk() int32
- func (x *Workspace) GetLimitGpu() int32
- func (x *Workspace) GetLimitMemory() int32
- func (x *Workspace) GetMemoryRate() int32
- func (x *Workspace) GetName() string
- func (x *Workspace) GetUpdatedAt() string
- func (x *Workspace) GetUserName() string
- func (*Workspace) ProtoMessage()
- func (x *Workspace) ProtoReflect() protoreflect.Message
- func (x *Workspace) Reset()
- func (x *Workspace) String() string
- type WorkspaceInterfaceClient
- type WorkspaceInterfaceHTTPClient
- type WorkspaceInterfaceHTTPClientImpl
- func (c *WorkspaceInterfaceHTTPClientImpl) Get(ctx context.Context, in *WorkspaceParam, opts ...http.CallOption) (*Workspace, error)
- func (c *WorkspaceInterfaceHTTPClientImpl) List(ctx context.Context, in *WorkspaceParam, opts ...http.CallOption) (*Workspaces, error)
- func (c *WorkspaceInterfaceHTTPClientImpl) Save(ctx context.Context, in *Workspace, opts ...http.CallOption) (*common.Msg, error)
- type WorkspaceInterfaceHTTPServer
- type WorkspaceInterfaceServer
- type WorkspaceParam
- func (*WorkspaceParam) Descriptor() ([]byte, []int)deprecated
- func (x *WorkspaceParam) GetClusterId() int64
- func (x *WorkspaceParam) GetId() int64
- func (x *WorkspaceParam) GetWorkspaceName() string
- func (*WorkspaceParam) ProtoMessage()
- func (x *WorkspaceParam) ProtoReflect() protoreflect.Message
- func (x *WorkspaceParam) Reset()
- func (x *WorkspaceParam) String() string
- type Workspaces
Constants ¶
const ( WorkspaceInterface_Save_FullMethodName = "/workspace.v1alpha1.WorkspaceInterface/Save" WorkspaceInterface_Get_FullMethodName = "/workspace.v1alpha1.WorkspaceInterface/Get" WorkspaceInterface_List_FullMethodName = "/workspace.v1alpha1.WorkspaceInterface/List" )
const OperationWorkspaceInterfaceGet = "/workspace.v1alpha1.WorkspaceInterface/Get"
const OperationWorkspaceInterfaceList = "/workspace.v1alpha1.WorkspaceInterface/List"
const OperationWorkspaceInterfaceSave = "/workspace.v1alpha1.WorkspaceInterface/Save"
Variables ¶
var File_api_workspace_v1alpha1_message_proto protoreflect.FileDescriptor
var File_api_workspace_v1alpha1_workspace_proto protoreflect.FileDescriptor
var WorkspaceInterface_ServiceDesc = grpc.ServiceDesc{ ServiceName: "workspace.v1alpha1.WorkspaceInterface", HandlerType: (*WorkspaceInterfaceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Save", Handler: _WorkspaceInterface_Save_Handler, }, { MethodName: "Get", Handler: _WorkspaceInterface_Get_Handler, }, { MethodName: "List", Handler: _WorkspaceInterface_List_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/workspace/v1alpha1/workspace.proto", }
WorkspaceInterface_ServiceDesc is the grpc.ServiceDesc for WorkspaceInterface service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWorkspaceInterfaceHTTPServer ¶
func RegisterWorkspaceInterfaceHTTPServer(s *http.Server, srv WorkspaceInterfaceHTTPServer)
func RegisterWorkspaceInterfaceServer ¶
func RegisterWorkspaceInterfaceServer(s grpc.ServiceRegistrar, srv WorkspaceInterfaceServer)
Types ¶
type UnimplementedWorkspaceInterfaceServer ¶
type UnimplementedWorkspaceInterfaceServer struct{}
UnimplementedWorkspaceInterfaceServer 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 (UnimplementedWorkspaceInterfaceServer) Get ¶
func (UnimplementedWorkspaceInterfaceServer) Get(context.Context, *WorkspaceParam) (*Workspace, error)
func (UnimplementedWorkspaceInterfaceServer) List ¶
func (UnimplementedWorkspaceInterfaceServer) List(context.Context, *WorkspaceParam) (*Workspaces, error)
type UnsafeWorkspaceInterfaceServer ¶
type UnsafeWorkspaceInterfaceServer interface {
// contains filtered or unexported methods
}
UnsafeWorkspaceInterfaceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WorkspaceInterfaceServer will result in compilation errors.
type Workspace ¶
type Workspace 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"`
UserName string `protobuf:"bytes,5,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`
CpuRate int32 `protobuf:"varint,6,opt,name=cpu_rate,json=cpuRate,proto3" json:"cpu_rate,omitempty"`
GpuRate int32 `protobuf:"varint,7,opt,name=gpu_rate,json=gpuRate,proto3" json:"gpu_rate,omitempty"`
MemoryRate int32 `protobuf:"varint,8,opt,name=memory_rate,json=memoryRate,proto3" json:"memory_rate,omitempty"`
DiskRate int32 `protobuf:"varint,9,opt,name=disk_rate,json=diskRate,proto3" json:"disk_rate,omitempty"`
LimitCpu int32 `protobuf:"varint,10,opt,name=limit_cpu,json=limitCpu,proto3" json:"limit_cpu,omitempty"`
LimitGpu int32 `protobuf:"varint,11,opt,name=limit_gpu,json=limitGpu,proto3" json:"limit_gpu,omitempty"`
LimitMemory int32 `protobuf:"varint,12,opt,name=limit_memory,json=limitMemory,proto3" json:"limit_memory,omitempty"`
LimitDisk int32 `protobuf:"varint,13,opt,name=limit_disk,json=limitDisk,proto3" json:"limit_disk,omitempty"`
UpdatedAt string `protobuf:"bytes,14,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
func (*Workspace) Descriptor
deprecated
func (*Workspace) GetClusterId ¶
func (*Workspace) GetCpuRate ¶
func (*Workspace) GetDescription ¶
func (*Workspace) GetDiskRate ¶
func (*Workspace) GetGpuRate ¶
func (*Workspace) GetLimitCpu ¶
func (*Workspace) GetLimitDisk ¶
func (*Workspace) GetLimitGpu ¶
func (*Workspace) GetLimitMemory ¶
func (*Workspace) GetMemoryRate ¶
func (*Workspace) GetUpdatedAt ¶
func (*Workspace) GetUserName ¶
func (*Workspace) ProtoMessage ¶
func (*Workspace) ProtoMessage()
func (*Workspace) ProtoReflect ¶
func (x *Workspace) ProtoReflect() protoreflect.Message
type WorkspaceInterfaceClient ¶
type WorkspaceInterfaceClient interface {
Save(ctx context.Context, in *Workspace, opts ...grpc.CallOption) (*common.Msg, error)
Get(ctx context.Context, in *WorkspaceParam, opts ...grpc.CallOption) (*Workspace, error)
List(ctx context.Context, in *WorkspaceParam, opts ...grpc.CallOption) (*Workspaces, error)
}
WorkspaceInterfaceClient is the client API for WorkspaceInterface 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 NewWorkspaceInterfaceClient ¶
func NewWorkspaceInterfaceClient(cc grpc.ClientConnInterface) WorkspaceInterfaceClient
type WorkspaceInterfaceHTTPClient ¶
type WorkspaceInterfaceHTTPClient interface {
Get(ctx context.Context, req *WorkspaceParam, opts ...http.CallOption) (rsp *Workspace, err error)
List(ctx context.Context, req *WorkspaceParam, opts ...http.CallOption) (rsp *Workspaces, err error)
Save(ctx context.Context, req *Workspace, opts ...http.CallOption) (rsp *common.Msg, err error)
}
func NewWorkspaceInterfaceHTTPClient ¶
func NewWorkspaceInterfaceHTTPClient(client *http.Client) WorkspaceInterfaceHTTPClient
type WorkspaceInterfaceHTTPClientImpl ¶
type WorkspaceInterfaceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*WorkspaceInterfaceHTTPClientImpl) Get ¶
func (c *WorkspaceInterfaceHTTPClientImpl) Get(ctx context.Context, in *WorkspaceParam, opts ...http.CallOption) (*Workspace, error)
func (*WorkspaceInterfaceHTTPClientImpl) List ¶
func (c *WorkspaceInterfaceHTTPClientImpl) List(ctx context.Context, in *WorkspaceParam, opts ...http.CallOption) (*Workspaces, error)
type WorkspaceInterfaceServer ¶
type WorkspaceInterfaceServer interface {
Save(context.Context, *Workspace) (*common.Msg, error)
Get(context.Context, *WorkspaceParam) (*Workspace, error)
List(context.Context, *WorkspaceParam) (*Workspaces, error)
// contains filtered or unexported methods
}
WorkspaceInterfaceServer is the server API for WorkspaceInterface service. All implementations must embed UnimplementedWorkspaceInterfaceServer for forward compatibility.
type WorkspaceParam ¶
type WorkspaceParam struct {
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
ClusterId int64 `protobuf:"varint,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
WorkspaceName string `protobuf:"bytes,3,opt,name=workspace_name,json=workspaceName,proto3" json:"workspace_name,omitempty"`
// contains filtered or unexported fields
}
func (*WorkspaceParam) Descriptor
deprecated
func (*WorkspaceParam) Descriptor() ([]byte, []int)
Deprecated: Use WorkspaceParam.ProtoReflect.Descriptor instead.
func (*WorkspaceParam) GetClusterId ¶
func (x *WorkspaceParam) GetClusterId() int64
func (*WorkspaceParam) GetId ¶
func (x *WorkspaceParam) GetId() int64
func (*WorkspaceParam) GetWorkspaceName ¶
func (x *WorkspaceParam) GetWorkspaceName() string
func (*WorkspaceParam) ProtoMessage ¶
func (*WorkspaceParam) ProtoMessage()
func (*WorkspaceParam) ProtoReflect ¶
func (x *WorkspaceParam) ProtoReflect() protoreflect.Message
func (*WorkspaceParam) Reset ¶
func (x *WorkspaceParam) Reset()
func (*WorkspaceParam) String ¶
func (x *WorkspaceParam) String() string
type Workspaces ¶
type Workspaces struct {
Workspaces []*Workspace `protobuf:"bytes,1,rep,name=workspaces,proto3" json:"workspaces,omitempty"`
// contains filtered or unexported fields
}
func (*Workspaces) Descriptor
deprecated
func (*Workspaces) Descriptor() ([]byte, []int)
Deprecated: Use Workspaces.ProtoReflect.Descriptor instead.
func (*Workspaces) GetWorkspaces ¶
func (x *Workspaces) GetWorkspaces() []*Workspace
func (*Workspaces) ProtoMessage ¶
func (*Workspaces) ProtoMessage()
func (*Workspaces) ProtoReflect ¶
func (x *Workspaces) ProtoReflect() protoreflect.Message
func (*Workspaces) Reset ¶
func (x *Workspaces) Reset()
func (*Workspaces) String ¶
func (x *Workspaces) String() string