Documentation ¶
Overview ¶
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterInstancesServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterInstancesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InstancesServiceClient) error
- func RegisterInstancesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterInstancesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InstancesServiceServer) error
- func RegisterInstancesServiceServer(s grpc.ServiceRegistrar, srv InstancesServiceServer)
- type Instance
- func (*Instance) Descriptor() ([]byte, []int)deprecated
- func (x *Instance) GetAccess() *access.Access
- func (x *Instance) GetBillingPlan() *proto1.Plan
- func (x *Instance) GetConfig() map[string]*structpb.Value
- func (x *Instance) GetData() map[string]*structpb.Value
- func (x *Instance) GetHash() string
- func (x *Instance) GetProduct() string
- func (x *Instance) GetResources() map[string]*structpb.Value
- func (x *Instance) GetState() *proto.State
- func (x *Instance) GetStatus() InstanceStatus
- func (x *Instance) GetTitle() string
- func (x *Instance) GetUuid() string
- func (*Instance) ProtoMessage()
- func (x *Instance) ProtoReflect() protoreflect.Message
- func (x *Instance) Reset()
- func (x *Instance) String() string
- type InstanceStatus
- func (InstanceStatus) Descriptor() protoreflect.EnumDescriptor
- func (x InstanceStatus) Enum() *InstanceStatus
- func (InstanceStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x InstanceStatus) Number() protoreflect.EnumNumber
- func (x InstanceStatus) String() string
- func (InstanceStatus) Type() protoreflect.EnumType
- type InstancesGroup
- func (*InstancesGroup) Descriptor() ([]byte, []int)deprecated
- func (x *InstancesGroup) GetAccess() *access.Access
- func (x *InstancesGroup) GetConfig() map[string]*structpb.Value
- func (x *InstancesGroup) GetData() map[string]*structpb.Value
- func (x *InstancesGroup) GetHash() string
- func (x *InstancesGroup) GetInstances() []*Instance
- func (x *InstancesGroup) GetResources() map[string]*structpb.Value
- func (x *InstancesGroup) GetSp() string
- func (x *InstancesGroup) GetStatus() InstanceStatus
- func (x *InstancesGroup) GetTitle() string
- func (x *InstancesGroup) GetType() string
- func (x *InstancesGroup) GetUuid() string
- func (*InstancesGroup) ProtoMessage()
- func (x *InstancesGroup) ProtoReflect() protoreflect.Message
- func (x *InstancesGroup) Reset()
- func (x *InstancesGroup) String() string
- type InstancesServiceClient
- type InstancesServiceServer
- type InvokeRequest
- func (*InvokeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InvokeRequest) GetMethod() string
- func (x *InvokeRequest) GetParams() map[string]*structpb.Value
- func (x *InvokeRequest) GetUuid() string
- func (*InvokeRequest) ProtoMessage()
- func (x *InvokeRequest) ProtoReflect() protoreflect.Message
- func (x *InvokeRequest) Reset()
- func (x *InvokeRequest) String() string
- type InvokeResponse
- func (*InvokeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InvokeResponse) GetMeta() map[string]*structpb.Value
- func (x *InvokeResponse) GetResult() bool
- func (*InvokeResponse) ProtoMessage()
- func (x *InvokeResponse) ProtoReflect() protoreflect.Message
- func (x *InvokeResponse) Reset()
- func (x *InvokeResponse) String() string
- type ObjectData
- func (*ObjectData) Descriptor() ([]byte, []int)deprecated
- func (x *ObjectData) GetData() map[string]*structpb.Value
- func (x *ObjectData) GetUuid() string
- func (*ObjectData) ProtoMessage()
- func (x *ObjectData) ProtoReflect() protoreflect.Message
- func (x *ObjectData) Reset()
- func (x *ObjectData) String() string
- type TestInstancesGroupConfigError
- func (*TestInstancesGroupConfigError) Descriptor() ([]byte, []int)deprecated
- func (x *TestInstancesGroupConfigError) GetError() string
- func (x *TestInstancesGroupConfigError) GetInstance() string
- func (*TestInstancesGroupConfigError) ProtoMessage()
- func (x *TestInstancesGroupConfigError) ProtoReflect() protoreflect.Message
- func (x *TestInstancesGroupConfigError) Reset()
- func (x *TestInstancesGroupConfigError) String() string
- type TestInstancesGroupConfigRequest
- func (*TestInstancesGroupConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TestInstancesGroupConfigRequest) GetGroup() *InstancesGroup
- func (x *TestInstancesGroupConfigRequest) GetSp() *proto2.ServicesProvider
- func (*TestInstancesGroupConfigRequest) ProtoMessage()
- func (x *TestInstancesGroupConfigRequest) ProtoReflect() protoreflect.Message
- func (x *TestInstancesGroupConfigRequest) Reset()
- func (x *TestInstancesGroupConfigRequest) String() string
- type TestInstancesGroupConfigResponse
- func (*TestInstancesGroupConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TestInstancesGroupConfigResponse) GetErrors() []*TestInstancesGroupConfigError
- func (x *TestInstancesGroupConfigResponse) GetResult() bool
- func (*TestInstancesGroupConfigResponse) ProtoMessage()
- func (x *TestInstancesGroupConfigResponse) ProtoReflect() protoreflect.Message
- func (x *TestInstancesGroupConfigResponse) Reset()
- func (x *TestInstancesGroupConfigResponse) String() string
- type UnimplementedInstancesServiceServer
- type UnsafeInstancesServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( InstanceStatus_name = map[int32]string{ 0: "UNSPECIFIED", 1: "INIT", 2: "MODIFIED", 3: "UP", 4: "DOWN", 5: "DEL", 6: "SUS", } InstanceStatus_value = map[string]int32{ "UNSPECIFIED": 0, "INIT": 1, "MODIFIED": 2, "UP": 3, "DOWN": 4, "DEL": 5, "SUS": 6, } )
Enum value maps for InstanceStatus.
var File_pkg_instances_proto_instances_proto protoreflect.FileDescriptor
var InstancesService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "nocloud.instances.InstancesService", HandlerType: (*InstancesServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Invoke", Handler: _InstancesService_Invoke_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/instances/proto/instances.proto", }
InstancesService_ServiceDesc is the grpc.ServiceDesc for InstancesService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterInstancesServiceHandler ¶
func RegisterInstancesServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterInstancesServiceHandler registers the http handlers for service InstancesService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterInstancesServiceHandlerClient ¶
func RegisterInstancesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InstancesServiceClient) error
RegisterInstancesServiceHandlerClient registers the http handlers for service InstancesService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InstancesServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InstancesServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InstancesServiceClient" to call the correct interceptors.
func RegisterInstancesServiceHandlerFromEndpoint ¶
func RegisterInstancesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterInstancesServiceHandlerFromEndpoint is same as RegisterInstancesServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterInstancesServiceHandlerServer ¶
func RegisterInstancesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InstancesServiceServer) error
RegisterInstancesServiceHandlerServer registers the http handlers for service InstancesService to "mux". UnaryRPC :call InstancesServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInstancesServiceHandlerFromEndpoint instead.
func RegisterInstancesServiceServer ¶
func RegisterInstancesServiceServer(s grpc.ServiceRegistrar, srv InstancesServiceServer)
Types ¶
type Instance ¶
type Instance struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Status InstanceStatus `protobuf:"varint,3,opt,name=status,proto3,enum=nocloud.instances.InstanceStatus" json:"status,omitempty"` Config map[string]*structpb.Value `` /* 153-byte string literal not displayed */ Resources map[string]*structpb.Value `` /* 159-byte string literal not displayed */ Data map[string]*structpb.Value `` /* 149-byte string literal not displayed */ State *proto.State `protobuf:"bytes,7,opt,name=state,proto3" json:"state,omitempty"` Hash string `protobuf:"bytes,8,opt,name=hash,proto3" json:"hash,omitempty"` BillingPlan *proto1.Plan `protobuf:"bytes,9,opt,name=billing_plan,json=billingPlan,proto3" json:"billing_plan,omitempty"` Product *string `protobuf:"bytes,10,opt,name=product,proto3,oneof" json:"product,omitempty"` Access *access.Access `protobuf:"bytes,11,opt,name=access,proto3,oneof" json:"access,omitempty"` // contains filtered or unexported fields }
func (*Instance) Descriptor
deprecated
func (*Instance) GetBillingPlan ¶
func (*Instance) GetProduct ¶
func (*Instance) GetStatus ¶
func (x *Instance) GetStatus() InstanceStatus
func (*Instance) ProtoMessage ¶
func (*Instance) ProtoMessage()
func (*Instance) ProtoReflect ¶
func (x *Instance) ProtoReflect() protoreflect.Message
type InstanceStatus ¶
type InstanceStatus int32
const ( InstanceStatus_UNSPECIFIED InstanceStatus = 0 InstanceStatus_INIT InstanceStatus = 1 InstanceStatus_MODIFIED InstanceStatus = 2 InstanceStatus_UP InstanceStatus = 3 InstanceStatus_DOWN InstanceStatus = 4 InstanceStatus_DEL InstanceStatus = 5 InstanceStatus_SUS InstanceStatus = 6 )
func (InstanceStatus) Descriptor ¶
func (InstanceStatus) Descriptor() protoreflect.EnumDescriptor
func (InstanceStatus) Enum ¶
func (x InstanceStatus) Enum() *InstanceStatus
func (InstanceStatus) EnumDescriptor
deprecated
func (InstanceStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use InstanceStatus.Descriptor instead.
func (InstanceStatus) Number ¶
func (x InstanceStatus) Number() protoreflect.EnumNumber
func (InstanceStatus) String ¶
func (x InstanceStatus) String() string
func (InstanceStatus) Type ¶
func (InstanceStatus) Type() protoreflect.EnumType
type InstancesGroup ¶
type InstancesGroup struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` Status InstanceStatus `protobuf:"varint,4,opt,name=status,proto3,enum=nocloud.instances.InstanceStatus" json:"status,omitempty"` Config map[string]*structpb.Value `` /* 153-byte string literal not displayed */ Instances []*Instance `protobuf:"bytes,6,rep,name=instances,proto3" json:"instances,omitempty"` Resources map[string]*structpb.Value `` /* 159-byte string literal not displayed */ Data map[string]*structpb.Value `` /* 149-byte string literal not displayed */ Hash string `protobuf:"bytes,9,opt,name=hash,proto3" json:"hash,omitempty"` Sp *string `protobuf:"bytes,10,opt,name=sp,proto3,oneof" json:"sp,omitempty"` Access *access.Access `protobuf:"bytes,11,opt,name=access,proto3,oneof" json:"access,omitempty"` // contains filtered or unexported fields }
func (*InstancesGroup) Descriptor
deprecated
func (*InstancesGroup) Descriptor() ([]byte, []int)
Deprecated: Use InstancesGroup.ProtoReflect.Descriptor instead.
func (*InstancesGroup) GetAccess ¶
func (x *InstancesGroup) GetAccess() *access.Access
func (*InstancesGroup) GetHash ¶
func (x *InstancesGroup) GetHash() string
func (*InstancesGroup) GetInstances ¶
func (x *InstancesGroup) GetInstances() []*Instance
func (*InstancesGroup) GetResources ¶
func (x *InstancesGroup) GetResources() map[string]*structpb.Value
func (*InstancesGroup) GetSp ¶
func (x *InstancesGroup) GetSp() string
func (*InstancesGroup) GetStatus ¶
func (x *InstancesGroup) GetStatus() InstanceStatus
func (*InstancesGroup) GetTitle ¶
func (x *InstancesGroup) GetTitle() string
func (*InstancesGroup) GetType ¶
func (x *InstancesGroup) GetType() string
func (*InstancesGroup) GetUuid ¶
func (x *InstancesGroup) GetUuid() string
func (*InstancesGroup) ProtoMessage ¶
func (*InstancesGroup) ProtoMessage()
func (*InstancesGroup) ProtoReflect ¶
func (x *InstancesGroup) ProtoReflect() protoreflect.Message
func (*InstancesGroup) Reset ¶
func (x *InstancesGroup) Reset()
func (*InstancesGroup) String ¶
func (x *InstancesGroup) String() string
type InstancesServiceClient ¶
type InstancesServiceClient interface {
Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error)
}
InstancesServiceClient is the client API for InstancesService 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 NewInstancesServiceClient ¶
func NewInstancesServiceClient(cc grpc.ClientConnInterface) InstancesServiceClient
type InstancesServiceServer ¶
type InstancesServiceServer interface { Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error) // contains filtered or unexported methods }
InstancesServiceServer is the server API for InstancesService service. All implementations must embed UnimplementedInstancesServiceServer for forward compatibility
type InvokeRequest ¶
type InvokeRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` Params map[string]*structpb.Value `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*InvokeRequest) Descriptor
deprecated
func (*InvokeRequest) Descriptor() ([]byte, []int)
Deprecated: Use InvokeRequest.ProtoReflect.Descriptor instead.
func (*InvokeRequest) GetMethod ¶
func (x *InvokeRequest) GetMethod() string
func (*InvokeRequest) GetUuid ¶
func (x *InvokeRequest) GetUuid() string
func (*InvokeRequest) ProtoMessage ¶
func (*InvokeRequest) ProtoMessage()
func (*InvokeRequest) ProtoReflect ¶
func (x *InvokeRequest) ProtoReflect() protoreflect.Message
func (*InvokeRequest) Reset ¶
func (x *InvokeRequest) Reset()
func (*InvokeRequest) String ¶
func (x *InvokeRequest) String() string
type InvokeResponse ¶
type InvokeResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Meta map[string]*structpb.Value `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
func (*InvokeResponse) Descriptor
deprecated
func (*InvokeResponse) Descriptor() ([]byte, []int)
Deprecated: Use InvokeResponse.ProtoReflect.Descriptor instead.
func (*InvokeResponse) GetResult ¶
func (x *InvokeResponse) GetResult() bool
func (*InvokeResponse) ProtoMessage ¶
func (*InvokeResponse) ProtoMessage()
func (*InvokeResponse) ProtoReflect ¶
func (x *InvokeResponse) ProtoReflect() protoreflect.Message
func (*InvokeResponse) Reset ¶
func (x *InvokeResponse) Reset()
func (*InvokeResponse) String ¶
func (x *InvokeResponse) String() string
type ObjectData ¶
type ObjectData struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Data map[string]*structpb.Value `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ObjectData) Descriptor
deprecated
func (*ObjectData) Descriptor() ([]byte, []int)
Deprecated: Use ObjectData.ProtoReflect.Descriptor instead.
func (*ObjectData) GetUuid ¶
func (x *ObjectData) GetUuid() string
func (*ObjectData) ProtoMessage ¶
func (*ObjectData) ProtoMessage()
func (*ObjectData) ProtoReflect ¶
func (x *ObjectData) ProtoReflect() protoreflect.Message
func (*ObjectData) Reset ¶
func (x *ObjectData) Reset()
func (*ObjectData) String ¶
func (x *ObjectData) String() string
type TestInstancesGroupConfigError ¶
type TestInstancesGroupConfigError struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Instance string `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"` // contains filtered or unexported fields }
func (*TestInstancesGroupConfigError) Descriptor
deprecated
func (*TestInstancesGroupConfigError) Descriptor() ([]byte, []int)
Deprecated: Use TestInstancesGroupConfigError.ProtoReflect.Descriptor instead.
func (*TestInstancesGroupConfigError) GetError ¶
func (x *TestInstancesGroupConfigError) GetError() string
func (*TestInstancesGroupConfigError) GetInstance ¶
func (x *TestInstancesGroupConfigError) GetInstance() string
func (*TestInstancesGroupConfigError) ProtoMessage ¶
func (*TestInstancesGroupConfigError) ProtoMessage()
func (*TestInstancesGroupConfigError) ProtoReflect ¶
func (x *TestInstancesGroupConfigError) ProtoReflect() protoreflect.Message
func (*TestInstancesGroupConfigError) Reset ¶
func (x *TestInstancesGroupConfigError) Reset()
func (*TestInstancesGroupConfigError) String ¶
func (x *TestInstancesGroupConfigError) String() string
type TestInstancesGroupConfigRequest ¶
type TestInstancesGroupConfigRequest struct { Group *InstancesGroup `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` Sp *proto2.ServicesProvider `protobuf:"bytes,2,opt,name=sp,proto3" json:"sp,omitempty"` // contains filtered or unexported fields }
func (*TestInstancesGroupConfigRequest) Descriptor
deprecated
func (*TestInstancesGroupConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use TestInstancesGroupConfigRequest.ProtoReflect.Descriptor instead.
func (*TestInstancesGroupConfigRequest) GetGroup ¶
func (x *TestInstancesGroupConfigRequest) GetGroup() *InstancesGroup
func (*TestInstancesGroupConfigRequest) GetSp ¶
func (x *TestInstancesGroupConfigRequest) GetSp() *proto2.ServicesProvider
func (*TestInstancesGroupConfigRequest) ProtoMessage ¶
func (*TestInstancesGroupConfigRequest) ProtoMessage()
func (*TestInstancesGroupConfigRequest) ProtoReflect ¶
func (x *TestInstancesGroupConfigRequest) ProtoReflect() protoreflect.Message
func (*TestInstancesGroupConfigRequest) Reset ¶
func (x *TestInstancesGroupConfigRequest) Reset()
func (*TestInstancesGroupConfigRequest) String ¶
func (x *TestInstancesGroupConfigRequest) String() string
type TestInstancesGroupConfigResponse ¶
type TestInstancesGroupConfigResponse struct { Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` Errors []*TestInstancesGroupConfigError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` // contains filtered or unexported fields }
func (*TestInstancesGroupConfigResponse) Descriptor
deprecated
func (*TestInstancesGroupConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use TestInstancesGroupConfigResponse.ProtoReflect.Descriptor instead.
func (*TestInstancesGroupConfigResponse) GetErrors ¶
func (x *TestInstancesGroupConfigResponse) GetErrors() []*TestInstancesGroupConfigError
func (*TestInstancesGroupConfigResponse) GetResult ¶
func (x *TestInstancesGroupConfigResponse) GetResult() bool
func (*TestInstancesGroupConfigResponse) ProtoMessage ¶
func (*TestInstancesGroupConfigResponse) ProtoMessage()
func (*TestInstancesGroupConfigResponse) ProtoReflect ¶
func (x *TestInstancesGroupConfigResponse) ProtoReflect() protoreflect.Message
func (*TestInstancesGroupConfigResponse) Reset ¶
func (x *TestInstancesGroupConfigResponse) Reset()
func (*TestInstancesGroupConfigResponse) String ¶
func (x *TestInstancesGroupConfigResponse) String() string
type UnimplementedInstancesServiceServer ¶
type UnimplementedInstancesServiceServer struct { }
UnimplementedInstancesServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedInstancesServiceServer) Invoke ¶
func (UnimplementedInstancesServiceServer) Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error)
type UnsafeInstancesServiceServer ¶
type UnsafeInstancesServiceServer interface {
// contains filtered or unexported methods
}
UnsafeInstancesServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InstancesServiceServer will result in compilation errors.