v1

package
v0.88.9 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 16 Imported by: 7

Documentation

Overview

Package provider/v1 contains the API used to fetch provider & region information.

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// APIID contains identifier of this API
	APIID = "platform/v1"
	// APIMajorVersion contains major version of this API
	APIMajorVersion = 1
	// APIMinorVersion contains minor version of this API
	APIMinorVersion = 0
	// APIPatchVersion contains patch version of this API
	APIPatchVersion = 2
)

Variables

View Source
var (
	ErrInvalidLengthPlatform        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPlatform          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPlatform = fmt.Errorf("proto: unexpected end of group")
)

Functions

func ForEachProvider

func ForEachProvider(ctx context.Context, listFunc func(ctx context.Context, req *ListProvidersRequest) (*ProviderList, error),
	req ListProvidersRequest, cb ProviderCallback) error

ForEachProvider iterates over all providers that match the given request, invoking the given callback for each item.

func ForEachRegion

func ForEachRegion(ctx context.Context, listFunc func(ctx context.Context, req *ListRegionsRequest) (*RegionList, error),
	req ListRegionsRequest, cb RegionCallback) error

ForEachRegion iterates over all regions that match the given request, invoking the given callback for each item.

func RegisterPlatformServiceHandler

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

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

func RegisterPlatformServiceHandlerClient

func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PlatformServiceClient) error

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

func RegisterPlatformServiceHandlerFromEndpoint

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

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

func RegisterPlatformServiceHandlerServer

func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PlatformServiceServer) error

RegisterPlatformServiceHandlerServer registers the http handlers for service PlatformService to "mux". UnaryRPC :call PlatformServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterPlatformServiceServer

func RegisterPlatformServiceServer(s *grpc.Server, srv PlatformServiceServer)

Types

type ListProvidersRequest

type ListProvidersRequest struct {
	// Common list options
	Options *v1.ListOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
	// If set, the result includes all providers for that are available for the
	// organization identified by this ID.
	// If not set, only providers are returned that are available to all organizations.
	OrganizationId       string   `protobuf:"bytes,2,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request arguments for ListProviders

func (*ListProvidersRequest) Descriptor

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

func (*ListProvidersRequest) GetOptions

func (m *ListProvidersRequest) GetOptions() *v1.ListOptions

func (*ListProvidersRequest) GetOrganizationId

func (m *ListProvidersRequest) GetOrganizationId() string

func (*ListProvidersRequest) Marshal

func (m *ListProvidersRequest) Marshal() (dAtA []byte, err error)

func (*ListProvidersRequest) MarshalTo

func (m *ListProvidersRequest) MarshalTo(dAtA []byte) (int, error)

func (*ListProvidersRequest) MarshalToSizedBuffer

func (m *ListProvidersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ListProvidersRequest) ProtoMessage

func (*ListProvidersRequest) ProtoMessage()

func (*ListProvidersRequest) Reset

func (m *ListProvidersRequest) Reset()

func (*ListProvidersRequest) Size

func (m *ListProvidersRequest) Size() (n int)

func (*ListProvidersRequest) String

func (m *ListProvidersRequest) String() string

func (*ListProvidersRequest) Unmarshal

func (m *ListProvidersRequest) Unmarshal(dAtA []byte) error

func (*ListProvidersRequest) XXX_DiscardUnknown

func (m *ListProvidersRequest) XXX_DiscardUnknown()

func (*ListProvidersRequest) XXX_Marshal

func (m *ListProvidersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListProvidersRequest) XXX_Merge

func (m *ListProvidersRequest) XXX_Merge(src proto.Message)

func (*ListProvidersRequest) XXX_Size

func (m *ListProvidersRequest) XXX_Size() int

func (*ListProvidersRequest) XXX_Unmarshal

func (m *ListProvidersRequest) XXX_Unmarshal(b []byte) error

type ListRegionsRequest

type ListRegionsRequest struct {
	// Common list options
	Options *v1.ListOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
	// Required identifier of the provider to list regions for.
	ProviderId string `protobuf:"bytes,2,opt,name=provider_id,json=providerId,proto3" json:"provider_id,omitempty"`
	// If set, the result includes all regions for that are available for the
	// organization identified by this ID.
	// If not set, only regions are returned that are available to all organizations.
	OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
	// If set, the result includes only those regions where the specified deployment model
	// is supported.
	// This is an optional field.
	ModelId              string   `protobuf:"bytes,4,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request arguments for ListRegions

func (*ListRegionsRequest) Descriptor

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

func (*ListRegionsRequest) GetModelId added in v0.81.5

func (m *ListRegionsRequest) GetModelId() string

func (*ListRegionsRequest) GetOptions

func (m *ListRegionsRequest) GetOptions() *v1.ListOptions

func (*ListRegionsRequest) GetOrganizationId

func (m *ListRegionsRequest) GetOrganizationId() string

func (*ListRegionsRequest) GetProviderId

func (m *ListRegionsRequest) GetProviderId() string

func (*ListRegionsRequest) Marshal

func (m *ListRegionsRequest) Marshal() (dAtA []byte, err error)

func (*ListRegionsRequest) MarshalTo

func (m *ListRegionsRequest) MarshalTo(dAtA []byte) (int, error)

func (*ListRegionsRequest) MarshalToSizedBuffer

func (m *ListRegionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ListRegionsRequest) ProtoMessage

func (*ListRegionsRequest) ProtoMessage()

func (*ListRegionsRequest) Reset

func (m *ListRegionsRequest) Reset()

func (*ListRegionsRequest) Size

func (m *ListRegionsRequest) Size() (n int)

func (*ListRegionsRequest) String

func (m *ListRegionsRequest) String() string

func (*ListRegionsRequest) Unmarshal

func (m *ListRegionsRequest) Unmarshal(dAtA []byte) error

func (*ListRegionsRequest) XXX_DiscardUnknown

func (m *ListRegionsRequest) XXX_DiscardUnknown()

func (*ListRegionsRequest) XXX_Marshal

func (m *ListRegionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListRegionsRequest) XXX_Merge

func (m *ListRegionsRequest) XXX_Merge(src proto.Message)

func (*ListRegionsRequest) XXX_Size

func (m *ListRegionsRequest) XXX_Size() int

func (*ListRegionsRequest) XXX_Unmarshal

func (m *ListRegionsRequest) XXX_Unmarshal(b []byte) error

type PlatformServiceClient

type PlatformServiceClient interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None
	GetAPIVersion(ctx context.Context, in *v1.Empty, opts ...grpc.CallOption) (*v1.Version, error)
	// Fetch all providers that are supported by the ArangoDB cloud.
	// Required permissions:
	// - None
	ListProviders(ctx context.Context, in *ListProvidersRequest, opts ...grpc.CallOption) (*ProviderList, error)
	// Fetch a provider by its id.
	// Required permissions:
	// - None
	GetProvider(ctx context.Context, in *v1.IDOptions, opts ...grpc.CallOption) (*Provider, error)
	// Fetch all regions provided by the provided identified by the given context ID.
	// If the given context identifier contains a valid organization ID,
	// the result includes all regions for that organization.
	// Otherwise only regions are returned that are available to all organizations.
	// Required permissions:
	// - None
	ListRegions(ctx context.Context, in *ListRegionsRequest, opts ...grpc.CallOption) (*RegionList, error)
	// Fetch a region by its id.
	// Required permissions:
	// - None
	GetRegion(ctx context.Context, in *v1.IDOptions, opts ...grpc.CallOption) (*Region, error)
}

PlatformServiceClient is the client API for PlatformService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPlatformServiceClient

func NewPlatformServiceClient(cc *grpc.ClientConn) PlatformServiceClient

type PlatformServiceServer

type PlatformServiceServer interface {
	// Get the current API version of this service.
	// Required permissions:
	// - None
	GetAPIVersion(context.Context, *v1.Empty) (*v1.Version, error)
	// Fetch all providers that are supported by the ArangoDB cloud.
	// Required permissions:
	// - None
	ListProviders(context.Context, *ListProvidersRequest) (*ProviderList, error)
	// Fetch a provider by its id.
	// Required permissions:
	// - None
	GetProvider(context.Context, *v1.IDOptions) (*Provider, error)
	// Fetch all regions provided by the provided identified by the given context ID.
	// If the given context identifier contains a valid organization ID,
	// the result includes all regions for that organization.
	// Otherwise only regions are returned that are available to all organizations.
	// Required permissions:
	// - None
	ListRegions(context.Context, *ListRegionsRequest) (*RegionList, error)
	// Fetch a region by its id.
	// Required permissions:
	// - None
	GetRegion(context.Context, *v1.IDOptions) (*Region, error)
}

PlatformServiceServer is the server API for PlatformService service.

type Provider

type Provider struct {
	// System identifier of the provider.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Name of the provider
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// If set, this provider has not be released as generally available.
	Prerelease           bool     `protobuf:"varint,3,opt,name=prerelease,proto3" json:"prerelease,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Provider represents a specific cloud provider such as AWS or GCP.

func (*Provider) Descriptor

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

func (*Provider) GetId

func (m *Provider) GetId() string

func (*Provider) GetName

func (m *Provider) GetName() string

func (*Provider) GetPrerelease

func (m *Provider) GetPrerelease() bool

func (*Provider) Marshal

func (m *Provider) Marshal() (dAtA []byte, err error)

func (*Provider) MarshalTo

func (m *Provider) MarshalTo(dAtA []byte) (int, error)

func (*Provider) MarshalToSizedBuffer

func (m *Provider) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Provider) ProtoMessage

func (*Provider) ProtoMessage()

func (*Provider) Reset

func (m *Provider) Reset()

func (*Provider) Size

func (m *Provider) Size() (n int)

func (*Provider) String

func (m *Provider) String() string

func (*Provider) Unmarshal

func (m *Provider) Unmarshal(dAtA []byte) error

func (*Provider) XXX_DiscardUnknown

func (m *Provider) XXX_DiscardUnknown()

func (*Provider) XXX_Marshal

func (m *Provider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Provider) XXX_Merge

func (m *Provider) XXX_Merge(src proto.Message)

func (*Provider) XXX_Size

func (m *Provider) XXX_Size() int

func (*Provider) XXX_Unmarshal

func (m *Provider) XXX_Unmarshal(b []byte) error

type ProviderCallback

type ProviderCallback func(context.Context, *Provider) error

ProviderCallback is a callback for individual (cloud) provider.

type ProviderList

type ProviderList struct {
	Items                []*Provider `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

List of providers.

func (*ProviderList) Descriptor

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

func (*ProviderList) GetItems

func (m *ProviderList) GetItems() []*Provider

func (*ProviderList) Marshal

func (m *ProviderList) Marshal() (dAtA []byte, err error)

func (*ProviderList) MarshalTo

func (m *ProviderList) MarshalTo(dAtA []byte) (int, error)

func (*ProviderList) MarshalToSizedBuffer

func (m *ProviderList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ProviderList) ProtoMessage

func (*ProviderList) ProtoMessage()

func (*ProviderList) Reset

func (m *ProviderList) Reset()

func (*ProviderList) Size

func (m *ProviderList) Size() (n int)

func (*ProviderList) String

func (m *ProviderList) String() string

func (*ProviderList) Unmarshal

func (m *ProviderList) Unmarshal(dAtA []byte) error

func (*ProviderList) XXX_DiscardUnknown

func (m *ProviderList) XXX_DiscardUnknown()

func (*ProviderList) XXX_Marshal

func (m *ProviderList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ProviderList) XXX_Merge

func (m *ProviderList) XXX_Merge(src proto.Message)

func (*ProviderList) XXX_Size

func (m *ProviderList) XXX_Size() int

func (*ProviderList) XXX_Unmarshal

func (m *ProviderList) XXX_Unmarshal(b []byte) error

type Region

type Region struct {
	// System identifier of the region.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Identifier of the provider that hosts this region.
	ProviderId string `protobuf:"bytes,2,opt,name=provider_id,json=providerId,proto3" json:"provider_id,omitempty"`
	// Location of the region
	Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"`
	// Is this region available for creating new deployments?
	Available bool `protobuf:"varint,4,opt,name=available,proto3" json:"available,omitempty"`
	// If set, this region is low on stock.
	// Creating a deployment may not be possible.
	LowStock bool `protobuf:"varint,5,opt,name=low_stock,json=lowStock,proto3" json:"low_stock,omitempty"`
	// If set, this region is out of stock.
	// Creating a deployment is currently not possible.
	OutOfStock bool `protobuf:"varint,6,opt,name=out_of_stock,json=outOfStock,proto3" json:"out_of_stock,omitempty"`
	// If set, this region has not be released as generally available.
	Prerelease bool `protobuf:"varint,7,opt,name=prerelease,proto3" json:"prerelease,omitempty"`
	// If set, this region support ML services.
	MlSupported          bool     `protobuf:"varint,8,opt,name=ml_supported,json=mlSupported,proto3" json:"ml_supported,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Region represents a geographical region in which deployments are run.

func (*Region) Descriptor

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

func (*Region) GetAvailable

func (m *Region) GetAvailable() bool

func (*Region) GetId

func (m *Region) GetId() string

func (*Region) GetLocation

func (m *Region) GetLocation() string

func (*Region) GetLowStock

func (m *Region) GetLowStock() bool

func (*Region) GetMlSupported added in v0.79.16

func (m *Region) GetMlSupported() bool

func (*Region) GetOutOfStock

func (m *Region) GetOutOfStock() bool

func (*Region) GetPrerelease

func (m *Region) GetPrerelease() bool

func (*Region) GetProviderId

func (m *Region) GetProviderId() string

func (*Region) Marshal

func (m *Region) Marshal() (dAtA []byte, err error)

func (*Region) MarshalTo

func (m *Region) MarshalTo(dAtA []byte) (int, error)

func (*Region) MarshalToSizedBuffer

func (m *Region) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Region) ProtoMessage

func (*Region) ProtoMessage()

func (*Region) Reset

func (m *Region) Reset()

func (*Region) Size

func (m *Region) Size() (n int)

func (*Region) String

func (m *Region) String() string

func (*Region) Unmarshal

func (m *Region) Unmarshal(dAtA []byte) error

func (*Region) XXX_DiscardUnknown

func (m *Region) XXX_DiscardUnknown()

func (*Region) XXX_Marshal

func (m *Region) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Region) XXX_Merge

func (m *Region) XXX_Merge(src proto.Message)

func (*Region) XXX_Size

func (m *Region) XXX_Size() int

func (*Region) XXX_Unmarshal

func (m *Region) XXX_Unmarshal(b []byte) error

type RegionCallback

type RegionCallback func(context.Context, *Region) error

RegionCallback is a callback for individual (cloud) region.

type RegionList

type RegionList struct {
	Items                []*Region `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

List of regions.

func (*RegionList) Descriptor

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

func (*RegionList) GetItems

func (m *RegionList) GetItems() []*Region

func (*RegionList) Marshal

func (m *RegionList) Marshal() (dAtA []byte, err error)

func (*RegionList) MarshalTo

func (m *RegionList) MarshalTo(dAtA []byte) (int, error)

func (*RegionList) MarshalToSizedBuffer

func (m *RegionList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RegionList) ProtoMessage

func (*RegionList) ProtoMessage()

func (*RegionList) Reset

func (m *RegionList) Reset()

func (*RegionList) Size

func (m *RegionList) Size() (n int)

func (*RegionList) String

func (m *RegionList) String() string

func (*RegionList) Unmarshal

func (m *RegionList) Unmarshal(dAtA []byte) error

func (*RegionList) XXX_DiscardUnknown

func (m *RegionList) XXX_DiscardUnknown()

func (*RegionList) XXX_Marshal

func (m *RegionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegionList) XXX_Merge

func (m *RegionList) XXX_Merge(src proto.Message)

func (*RegionList) XXX_Size

func (m *RegionList) XXX_Size() int

func (*RegionList) XXX_Unmarshal

func (m *RegionList) XXX_Unmarshal(b []byte) error

type UnimplementedPlatformServiceServer

type UnimplementedPlatformServiceServer struct {
}

UnimplementedPlatformServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedPlatformServiceServer) GetAPIVersion

func (*UnimplementedPlatformServiceServer) GetAPIVersion(ctx context.Context, req *v1.Empty) (*v1.Version, error)

func (*UnimplementedPlatformServiceServer) GetProvider

func (*UnimplementedPlatformServiceServer) GetRegion

func (*UnimplementedPlatformServiceServer) ListProviders

func (*UnimplementedPlatformServiceServer) ListRegions

Jump to

Keyboard shortcuts

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