Documentation ¶
Overview ¶
Package infrav1beta1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterInfraResourcesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterInfraResourcesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InfraResourcesClient) error
- func RegisterInfraResourcesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterInfraResourcesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InfraResourcesServer) error
- func RegisterInfraResourcesServer(s grpc.ServiceRegistrar, srv InfraResourcesServer)
- type InfraResourcesClient
- type InfraResourcesServer
- type OperationType
- func (OperationType) Descriptor() protoreflect.EnumDescriptor
- func (x OperationType) Enum() *OperationType
- func (OperationType) EnumDescriptor() ([]byte, []int)deprecated
- func (x OperationType) Number() protoreflect.EnumNumber
- func (x OperationType) String() string
- func (OperationType) Type() protoreflect.EnumType
- type ProcessFolderRequest
- func (*ProcessFolderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessFolderRequest) GetFolder() string
- func (x *ProcessFolderRequest) GetId() string
- func (x *ProcessFolderRequest) GetOperation() OperationType
- func (x *ProcessFolderRequest) GetOrganisation() string
- func (*ProcessFolderRequest) ProtoMessage()
- func (x *ProcessFolderRequest) ProtoReflect() protoreflect.Message
- func (x *ProcessFolderRequest) Reset()
- func (x *ProcessFolderRequest) String() string
- type ProcessFolderResponse
- type UnimplementedInfraResourcesServer
- type UnsafeInfraResourcesServer
Constants ¶
const (
InfraResources_ProcessFolder_FullMethodName = "/infrav1beta1.InfraResources/ProcessFolder"
)
Variables ¶
var ( OperationType_name = map[int32]string{ 0: "OP_CREATE", 1: "OP_UPDATE", 2: "OP_DELETE", 3: "OP_DRYRUN", } OperationType_value = map[string]int32{ "OP_CREATE": 0, "OP_UPDATE": 1, "OP_DELETE": 2, "OP_DRYRUN": 3, } )
Enum value maps for OperationType.
var File_me_finiteloop_v1beta1_resources_proto protoreflect.FileDescriptor
var InfraResources_ServiceDesc = grpc.ServiceDesc{ ServiceName: "infrav1beta1.InfraResources", HandlerType: (*InfraResourcesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ProcessFolder", Handler: _InfraResources_ProcessFolder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "me/finiteloop/v1beta1/resources.proto", }
InfraResources_ServiceDesc is the grpc.ServiceDesc for InfraResources service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterInfraResourcesHandler ¶
func RegisterInfraResourcesHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterInfraResourcesHandler registers the http handlers for service InfraResources to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterInfraResourcesHandlerClient ¶
func RegisterInfraResourcesHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InfraResourcesClient) error
RegisterInfraResourcesHandlerClient registers the http handlers for service InfraResources to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InfraResourcesClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InfraResourcesClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InfraResourcesClient" to call the correct interceptors.
func RegisterInfraResourcesHandlerFromEndpoint ¶
func RegisterInfraResourcesHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterInfraResourcesHandlerFromEndpoint is same as RegisterInfraResourcesHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterInfraResourcesHandlerServer ¶
func RegisterInfraResourcesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InfraResourcesServer) error
RegisterInfraResourcesHandlerServer registers the http handlers for service InfraResources to "mux". UnaryRPC :call InfraResourcesServer 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 RegisterInfraResourcesHandlerFromEndpoint instead.
func RegisterInfraResourcesServer ¶
func RegisterInfraResourcesServer(s grpc.ServiceRegistrar, srv InfraResourcesServer)
Types ¶
type InfraResourcesClient ¶
type InfraResourcesClient interface {
ProcessFolder(ctx context.Context, in *ProcessFolderRequest, opts ...grpc.CallOption) (*ProcessFolderResponse, error)
}
InfraResourcesClient is the client API for InfraResources 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 NewInfraResourcesClient ¶
func NewInfraResourcesClient(cc grpc.ClientConnInterface) InfraResourcesClient
type InfraResourcesServer ¶
type InfraResourcesServer interface {
ProcessFolder(context.Context, *ProcessFolderRequest) (*ProcessFolderResponse, error)
}
InfraResourcesServer is the server API for InfraResources service. All implementations should embed UnimplementedInfraResourcesServer for forward compatibility
type OperationType ¶
type OperationType int32
const ( OperationType_OP_CREATE OperationType = 0 OperationType_OP_UPDATE OperationType = 1 OperationType_OP_DELETE OperationType = 2 OperationType_OP_DRYRUN OperationType = 3 )
func (OperationType) Descriptor ¶
func (OperationType) Descriptor() protoreflect.EnumDescriptor
func (OperationType) Enum ¶
func (x OperationType) Enum() *OperationType
func (OperationType) EnumDescriptor
deprecated
func (OperationType) EnumDescriptor() ([]byte, []int)
Deprecated: Use OperationType.Descriptor instead.
func (OperationType) Number ¶
func (x OperationType) Number() protoreflect.EnumNumber
func (OperationType) String ¶
func (x OperationType) String() string
func (OperationType) Type ¶
func (OperationType) Type() protoreflect.EnumType
type ProcessFolderRequest ¶
type ProcessFolderRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Either organisation or folder should be specified. // Not both Organisation string `protobuf:"bytes,2,opt,name=organisation,proto3" json:"organisation,omitempty"` Folder string `protobuf:"bytes,3,opt,name=folder,proto3" json:"folder,omitempty"` Operation OperationType `protobuf:"varint,4,opt,name=operation,proto3,enum=infrav1beta1.OperationType" json:"operation,omitempty"` // contains filtered or unexported fields }
func (*ProcessFolderRequest) Descriptor
deprecated
func (*ProcessFolderRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessFolderRequest.ProtoReflect.Descriptor instead.
func (*ProcessFolderRequest) GetFolder ¶
func (x *ProcessFolderRequest) GetFolder() string
func (*ProcessFolderRequest) GetId ¶
func (x *ProcessFolderRequest) GetId() string
func (*ProcessFolderRequest) GetOperation ¶
func (x *ProcessFolderRequest) GetOperation() OperationType
func (*ProcessFolderRequest) GetOrganisation ¶
func (x *ProcessFolderRequest) GetOrganisation() string
func (*ProcessFolderRequest) ProtoMessage ¶
func (*ProcessFolderRequest) ProtoMessage()
func (*ProcessFolderRequest) ProtoReflect ¶
func (x *ProcessFolderRequest) ProtoReflect() protoreflect.Message
func (*ProcessFolderRequest) Reset ¶
func (x *ProcessFolderRequest) Reset()
func (*ProcessFolderRequest) String ¶
func (x *ProcessFolderRequest) String() string
type ProcessFolderResponse ¶
type ProcessFolderResponse struct {
// contains filtered or unexported fields
}
func (*ProcessFolderResponse) Descriptor
deprecated
func (*ProcessFolderResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProcessFolderResponse.ProtoReflect.Descriptor instead.
func (*ProcessFolderResponse) ProtoMessage ¶
func (*ProcessFolderResponse) ProtoMessage()
func (*ProcessFolderResponse) ProtoReflect ¶
func (x *ProcessFolderResponse) ProtoReflect() protoreflect.Message
func (*ProcessFolderResponse) Reset ¶
func (x *ProcessFolderResponse) Reset()
func (*ProcessFolderResponse) String ¶
func (x *ProcessFolderResponse) String() string
type UnimplementedInfraResourcesServer ¶
type UnimplementedInfraResourcesServer struct { }
UnimplementedInfraResourcesServer should be embedded to have forward compatible implementations.
func (UnimplementedInfraResourcesServer) ProcessFolder ¶
func (UnimplementedInfraResourcesServer) ProcessFolder(context.Context, *ProcessFolderRequest) (*ProcessFolderResponse, error)
type UnsafeInfraResourcesServer ¶
type UnsafeInfraResourcesServer interface {
// contains filtered or unexported methods
}
UnsafeInfraResourcesServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InfraResourcesServer will result in compilation errors.