vortex

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Overview

Package vortex is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Vortex_CreateEnvironment_FullMethodName = "/vortexproto.vortex.v1.Vortex/CreateEnvironment"
	Vortex_GetEnvironment_FullMethodName    = "/vortexproto.vortex.v1.Vortex/GetEnvironment"
	Vortex_ListEnvironments_FullMethodName  = "/vortexproto.vortex.v1.Vortex/ListEnvironments"
	Vortex_DeleteEnvironment_FullMethodName = "/vortexproto.vortex.v1.Vortex/DeleteEnvironment"
	Vortex_Do_FullMethodName                = "/vortexproto.vortex.v1.Vortex/Do"
)

Variables

View Source
var File_vortex_v1_vortex_proto protoreflect.FileDescriptor
View Source
var Vortex_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "vortexproto.vortex.v1.Vortex",
	HandlerType: (*VortexServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateEnvironment",
			Handler:    _Vortex_CreateEnvironment_Handler,
		},
		{
			MethodName: "GetEnvironment",
			Handler:    _Vortex_GetEnvironment_Handler,
		},
		{
			MethodName: "ListEnvironments",
			Handler:    _Vortex_ListEnvironments_Handler,
		},
		{
			MethodName: "DeleteEnvironment",
			Handler:    _Vortex_DeleteEnvironment_Handler,
		},
		{
			MethodName: "Do",
			Handler:    _Vortex_Do_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "vortex/v1/vortex.proto",
}

Vortex_ServiceDesc is the grpc.ServiceDesc for Vortex service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterVortexHandler

func RegisterVortexHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterVortexHandler registers the http handlers for service Vortex to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterVortexHandlerClient

func RegisterVortexHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VortexClient) error

RegisterVortexHandlerClient registers the http handlers for service Vortex to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "VortexClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "VortexClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "VortexClient" to call the correct interceptors.

func RegisterVortexHandlerFromEndpoint

func RegisterVortexHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterVortexHandlerFromEndpoint is same as RegisterVortexHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterVortexHandlerServer

func RegisterVortexHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VortexServer) error

RegisterVortexHandlerServer registers the http handlers for service Vortex to "mux". UnaryRPC :call VortexServer 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 RegisterVortexHandlerFromEndpoint instead.

func RegisterVortexServer

func RegisterVortexServer(s grpc.ServiceRegistrar, srv VortexServer)

Types

type ClientOptions

type ClientOptions struct {
	Conn *conn.GrpcClientConn
}

ClientOptions represents the optional options to NewClient.

type CreateEnvironmentRequest added in v0.1.6

type CreateEnvironmentRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Valid values:
	//
	// SC_MR_GCP
	// SC_SR_GCP
	// SC_MR_AWS
	// SC_SR_AWS
	// MC_AUTO
	Profile string         `protobuf:"bytes,2,opt,name=profile,proto3" json:"profile,omitempty"`
	GcpInfo *types.GCPInfo `protobuf:"bytes,3,opt,name=gcp_info,json=gcpInfo,proto3" json:"gcp_info,omitempty"`
	AwsInfo *types.AWSInfo `protobuf:"bytes,4,opt,name=aws_info,json=awsInfo,proto3" json:"aws_info,omitempty"`
	// TBD.
	AzureInfo *types.AzureInfo `protobuf:"bytes,5,opt,name=azure_info,json=azureInfo,proto3" json:"azure_info,omitempty"`
	// contains filtered or unexported fields
}

Request message for the CreateEnvironment rpc.

func (*CreateEnvironmentRequest) Descriptor deprecated added in v0.1.6

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

Deprecated: Use CreateEnvironmentRequest.ProtoReflect.Descriptor instead.

func (*CreateEnvironmentRequest) GetAwsInfo added in v0.1.8

func (x *CreateEnvironmentRequest) GetAwsInfo() *types.AWSInfo

func (*CreateEnvironmentRequest) GetAzureInfo added in v0.1.12

func (x *CreateEnvironmentRequest) GetAzureInfo() *types.AzureInfo

func (*CreateEnvironmentRequest) GetGcpInfo added in v0.1.8

func (x *CreateEnvironmentRequest) GetGcpInfo() *types.GCPInfo

func (*CreateEnvironmentRequest) GetName added in v0.1.6

func (x *CreateEnvironmentRequest) GetName() string

func (*CreateEnvironmentRequest) GetProfile added in v0.1.8

func (x *CreateEnvironmentRequest) GetProfile() string

func (*CreateEnvironmentRequest) ProtoMessage added in v0.1.6

func (*CreateEnvironmentRequest) ProtoMessage()

func (*CreateEnvironmentRequest) ProtoReflect added in v0.1.6

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

func (*CreateEnvironmentRequest) Reset added in v0.1.6

func (x *CreateEnvironmentRequest) Reset()

func (*CreateEnvironmentRequest) String added in v0.1.6

func (x *CreateEnvironmentRequest) String() string

type CreateEnvironmentResponse added in v0.1.6

type CreateEnvironmentResponse struct {
	Name      string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Operation *types.Operation `protobuf:"bytes,2,opt,name=operation,proto3" json:"operation,omitempty"`
	// contains filtered or unexported fields
}

Response message for the CreateEnvironment rpc.

func (*CreateEnvironmentResponse) Descriptor deprecated added in v0.1.6

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

Deprecated: Use CreateEnvironmentResponse.ProtoReflect.Descriptor instead.

func (*CreateEnvironmentResponse) GetName added in v0.1.6

func (x *CreateEnvironmentResponse) GetName() string

func (*CreateEnvironmentResponse) GetOperation added in v0.1.8

func (x *CreateEnvironmentResponse) GetOperation() *types.Operation

func (*CreateEnvironmentResponse) ProtoMessage added in v0.1.6

func (*CreateEnvironmentResponse) ProtoMessage()

func (*CreateEnvironmentResponse) ProtoReflect added in v0.1.6

func (*CreateEnvironmentResponse) Reset added in v0.1.6

func (x *CreateEnvironmentResponse) Reset()

func (*CreateEnvironmentResponse) String added in v0.1.6

func (x *CreateEnvironmentResponse) String() string

type DeleteEnvironmentRequest added in v0.1.6

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

Request message for the DeleteEnvironment rpc.

func (*DeleteEnvironmentRequest) Descriptor deprecated added in v0.1.6

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

Deprecated: Use DeleteEnvironmentRequest.ProtoReflect.Descriptor instead.

func (*DeleteEnvironmentRequest) GetName added in v0.1.6

func (x *DeleteEnvironmentRequest) GetName() string

func (*DeleteEnvironmentRequest) ProtoMessage added in v0.1.6

func (*DeleteEnvironmentRequest) ProtoMessage()

func (*DeleteEnvironmentRequest) ProtoReflect added in v0.1.6

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

func (*DeleteEnvironmentRequest) Reset added in v0.1.6

func (x *DeleteEnvironmentRequest) Reset()

func (*DeleteEnvironmentRequest) String added in v0.1.6

func (x *DeleteEnvironmentRequest) String() string

type DeleteEnvironmentResponse added in v0.1.6

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

Response message for the DeleteEnvironment rpc.

func (*DeleteEnvironmentResponse) Descriptor deprecated added in v0.1.6

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

Deprecated: Use DeleteEnvironmentResponse.ProtoReflect.Descriptor instead.

func (*DeleteEnvironmentResponse) GetName added in v0.1.6

func (x *DeleteEnvironmentResponse) GetName() string

func (*DeleteEnvironmentResponse) ProtoMessage added in v0.1.6

func (*DeleteEnvironmentResponse) ProtoMessage()

func (*DeleteEnvironmentResponse) ProtoReflect added in v0.1.6

func (*DeleteEnvironmentResponse) Reset added in v0.1.6

func (x *DeleteEnvironmentResponse) Reset()

func (*DeleteEnvironmentResponse) String added in v0.1.6

func (x *DeleteEnvironmentResponse) String() string

type DoRequest added in v0.1.4

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

Request message for the Do rpc.

func (*DoRequest) Descriptor deprecated added in v0.1.4

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

Deprecated: Use DoRequest.ProtoReflect.Descriptor instead.

func (*DoRequest) GetData added in v0.1.4

func (x *DoRequest) GetData() string

func (*DoRequest) ProtoMessage added in v0.1.4

func (*DoRequest) ProtoMessage()

func (*DoRequest) ProtoReflect added in v0.1.4

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

func (*DoRequest) Reset added in v0.1.4

func (x *DoRequest) Reset()

func (*DoRequest) String added in v0.1.4

func (x *DoRequest) String() string

type DoResponse added in v0.1.4

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

Response message for the Do rpc.

func (*DoResponse) Descriptor deprecated added in v0.1.4

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

Deprecated: Use DoResponse.ProtoReflect.Descriptor instead.

func (*DoResponse) GetData added in v0.1.4

func (x *DoResponse) GetData() string

func (*DoResponse) ProtoMessage added in v0.1.4

func (*DoResponse) ProtoMessage()

func (*DoResponse) ProtoReflect added in v0.1.4

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

func (*DoResponse) Reset added in v0.1.4

func (x *DoResponse) Reset()

func (*DoResponse) String added in v0.1.4

func (x *DoResponse) String() string

type GetEnvironmentRequest added in v0.1.6

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

Request message for the GetEnvironment rpc.

func (*GetEnvironmentRequest) Descriptor deprecated added in v0.1.6

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

Deprecated: Use GetEnvironmentRequest.ProtoReflect.Descriptor instead.

func (*GetEnvironmentRequest) GetName added in v0.1.6

func (x *GetEnvironmentRequest) GetName() string

func (*GetEnvironmentRequest) ProtoMessage added in v0.1.6

func (*GetEnvironmentRequest) ProtoMessage()

func (*GetEnvironmentRequest) ProtoReflect added in v0.1.6

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

func (*GetEnvironmentRequest) Reset added in v0.1.6

func (x *GetEnvironmentRequest) Reset()

func (*GetEnvironmentRequest) String added in v0.1.6

func (x *GetEnvironmentRequest) String() string

type GetEnvironmentResponse added in v0.1.6

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

Response message for the GetEnvironment rpc.

func (*GetEnvironmentResponse) Descriptor deprecated added in v0.1.6

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

Deprecated: Use GetEnvironmentResponse.ProtoReflect.Descriptor instead.

func (*GetEnvironmentResponse) GetName added in v0.1.6

func (x *GetEnvironmentResponse) GetName() string

func (*GetEnvironmentResponse) ProtoMessage added in v0.1.6

func (*GetEnvironmentResponse) ProtoMessage()

func (*GetEnvironmentResponse) ProtoReflect added in v0.1.6

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

func (*GetEnvironmentResponse) Reset added in v0.1.6

func (x *GetEnvironmentResponse) Reset()

func (*GetEnvironmentResponse) String added in v0.1.6

func (x *GetEnvironmentResponse) String() string

type GrpcClient

type GrpcClient struct {
	VortexClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, opts ...*ClientOptions) (*GrpcClient, error)

NewClient returns a client connection to the 'vortex' service.

func (*GrpcClient) Close

func (c *GrpcClient) Close()

type ListEnvironmentsRequest added in v0.1.6

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

Request message for the ListEnvironments rpc.

func (*ListEnvironmentsRequest) Descriptor deprecated added in v0.1.6

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

Deprecated: Use ListEnvironmentsRequest.ProtoReflect.Descriptor instead.

func (*ListEnvironmentsRequest) GetName added in v0.1.6

func (x *ListEnvironmentsRequest) GetName() string

func (*ListEnvironmentsRequest) ProtoMessage added in v0.1.6

func (*ListEnvironmentsRequest) ProtoMessage()

func (*ListEnvironmentsRequest) ProtoReflect added in v0.1.6

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

func (*ListEnvironmentsRequest) Reset added in v0.1.6

func (x *ListEnvironmentsRequest) Reset()

func (*ListEnvironmentsRequest) String added in v0.1.6

func (x *ListEnvironmentsRequest) String() string

type ListEnvironmentsResponse added in v0.1.6

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

Response message for the ListEnvironments rpc.

func (*ListEnvironmentsResponse) Descriptor deprecated added in v0.1.6

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

Deprecated: Use ListEnvironmentsResponse.ProtoReflect.Descriptor instead.

func (*ListEnvironmentsResponse) GetName added in v0.1.6

func (x *ListEnvironmentsResponse) GetName() string

func (*ListEnvironmentsResponse) ProtoMessage added in v0.1.6

func (*ListEnvironmentsResponse) ProtoMessage()

func (*ListEnvironmentsResponse) ProtoReflect added in v0.1.6

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

func (*ListEnvironmentsResponse) Reset added in v0.1.6

func (x *ListEnvironmentsResponse) Reset()

func (*ListEnvironmentsResponse) String added in v0.1.6

func (x *ListEnvironmentsResponse) String() string

type UnimplementedVortexServer

type UnimplementedVortexServer struct {
}

UnimplementedVortexServer must be embedded to have forward compatible implementations.

func (UnimplementedVortexServer) CreateEnvironment added in v0.1.6

func (UnimplementedVortexServer) DeleteEnvironment added in v0.1.6

func (UnimplementedVortexServer) Do added in v0.1.4

func (UnimplementedVortexServer) GetEnvironment added in v0.1.6

func (UnimplementedVortexServer) ListEnvironments added in v0.1.6

type UnsafeVortexServer

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

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

type VortexClient

type VortexClient interface {
	// Create a deployment environment.
	CreateEnvironment(ctx context.Context, in *CreateEnvironmentRequest, opts ...grpc.CallOption) (*CreateEnvironmentResponse, error)
	// Describe a deployment environment.
	GetEnvironment(ctx context.Context, in *GetEnvironmentRequest, opts ...grpc.CallOption) (*GetEnvironmentResponse, error)
	// List deployment environments.
	ListEnvironments(ctx context.Context, in *ListEnvironmentsRequest, opts ...grpc.CallOption) (*ListEnvironmentsResponse, error)
	// Delete a deployment environment.
	DeleteEnvironment(ctx context.Context, in *DeleteEnvironmentRequest, opts ...grpc.CallOption) (*DeleteEnvironmentResponse, error)
	// Testing endpoint.
	Do(ctx context.Context, in *DoRequest, opts ...grpc.CallOption) (*DoResponse, error)
}

VortexClient is the client API for Vortex 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.

Vortex service definition.

func NewVortexClient

func NewVortexClient(cc grpc.ClientConnInterface) VortexClient

type VortexServer

type VortexServer interface {
	// Create a deployment environment.
	CreateEnvironment(context.Context, *CreateEnvironmentRequest) (*CreateEnvironmentResponse, error)
	// Describe a deployment environment.
	GetEnvironment(context.Context, *GetEnvironmentRequest) (*GetEnvironmentResponse, error)
	// List deployment environments.
	ListEnvironments(context.Context, *ListEnvironmentsRequest) (*ListEnvironmentsResponse, error)
	// Delete a deployment environment.
	DeleteEnvironment(context.Context, *DeleteEnvironmentRequest) (*DeleteEnvironmentResponse, error)
	// Testing endpoint.
	Do(context.Context, *DoRequest) (*DoResponse, error)
	// contains filtered or unexported methods
}

VortexServer is the server API for Vortex service. All implementations must embed UnimplementedVortexServer for forward compatibility

Vortex service definition.

Jump to

Keyboard shortcuts

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