Documentation
¶
Index ¶
- Variables
- func JWTFromCC(c *Client, accessKey, secretKey string) error
- type Client
- func (c *Client) AttachServiceToVPC(ctx context.Context, serviceID string, vpcID int64) error
- func (c *Client) CreateService(ctx context.Context, request CreateServiceRequest) (*CreateServiceResponse, error)
- func (c *Client) CreateVPC(ctx context.Context, name, cidr, regionCode string) (*VPC, error)
- func (c *Client) DeletePeeringConnection(ctx context.Context, vpcID, id int64) error
- func (c *Client) DeleteService(ctx context.Context, id string) (*Service, error)
- func (c *Client) DeleteVPC(ctx context.Context, vpcID int64) error
- func (c *Client) DetachServiceFromVPC(ctx context.Context, serviceID string, vpcID int64) error
- func (c *Client) GetAllServices(ctx context.Context) ([]*Service, error)
- func (c *Client) GetProducts(ctx context.Context) ([]*Product, error)
- func (c *Client) GetService(ctx context.Context, id string) (*Service, error)
- func (c *Client) GetVPCByID(ctx context.Context, vpcID int64) (*VPC, error)
- func (c *Client) GetVPCByName(ctx context.Context, name string) (*VPC, error)
- func (c *Client) GetVPCs(ctx context.Context) ([]*VPC, error)
- func (c *Client) OpenPeerRequest(ctx context.Context, vpcID int64, externalVpcID, accountID, regionCode string) error
- func (c *Client) RenameService(ctx context.Context, serviceID string, newName string) error
- func (c *Client) RenameVPC(ctx context.Context, vpcID int64, newName string) error
- func (c *Client) ResetServicePassword(ctx context.Context, serviceID string, password string) error
- func (c *Client) ResizeInstance(ctx context.Context, serviceID string, config ResourceConfig) error
- func (c *Client) SetEnvironmentTag(ctx context.Context, serviceID, environment string) error
- func (c *Client) SetReplicaCount(ctx context.Context, serviceID string, replicaCount int) error
- func (c *Client) ToggleConnectionPooler(ctx context.Context, serviceID string, enable bool) error
- func (c *Client) ToggleService(ctx context.Context, id, status string) (*Service, error)
- type CreateServiceRequest
- type CreateServiceResponse
- type CreateServiceResponseData
- type CreateVPCResponse
- type DeleteServiceResponse
- type EndpointAddress
- type Error
- type ForkConfig
- type ForkSpec
- type GetAllServicesResponse
- type GetServiceResponse
- type JWTFromCCResponse
- type Metadata
- type PeerVPC
- type PeeringConnection
- type Plan
- type Product
- type ProductsResponse
- type ResourceConfig
- type ResourceSpec
- type Response
- type Service
- type ServiceEndpoints
- type ServiceSpec
- type ToggleServiceResponse
- type VPC
- type VPCEndpoint
- type VPCNameResponse
- type VPCResponse
- type VPCsResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //go:embed queries/create_service.graphql CreateServiceMutation string //go:embed queries/rename_service.graphql RenameServiceMutation string //go:embed queries/resize_instance.graphql ResizeInstanceMutation string //go:embed queries/delete_service.graphql DeleteServiceMutation string //go:embed queries/toggle_service.graphql ToggleServiceMutation string //go:embed queries/toggle_connection_pooler.graphql ToggleConnectionPoolerMutation string //go:embed queries/set_env_tag.graphql SetEnvironmentTagMutation string //go:embed queries/get_all_services.graphql GetAllServicesQuery string //go:embed queries/get_service.graphql GetServiceQuery string //go:embed queries/products.graphql ProductsQuery string //go:embed queries/jwt_cc.graphql JWTFromCCQuery string //go:embed queries/set_replica_count.graphql SetReplicaCountMutation string //go:embed queries/change_service_password.graphql ResetServicePassword string // VCPs /////////////////////////////// //go:embed queries/vpcs.graphql GetVPCsQuery string //go:embed queries/vpc_by_name.graphql GetVPCByNameQuery string //go:embed queries/vpc_by_id.graphql GetVPCByIDQuery string //go:embed queries/attach_service_to_vpc.graphql AttachServiceToVPCMutation string //go:embed queries/detach_service_from_vpc.graphql DetachServiceFromVPCMutation string //go:embed queries/create_vpc.graphql CreateVPCMutation string //go:embed queries/delete_vpc.graphql DeleteVPCMutation string //go:embed queries/rename_vpc.graphql RenameVPCMutation string //go:embed queries/open_peer_request.graphql OpenPeerRequestMutation string //go:embed queries/delete_peer_request.graphql DeletePeeringConnectionMutation string )
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AttachServiceToVPC ¶ added in v1.3.0
func (*Client) CreateService ¶
func (c *Client) CreateService(ctx context.Context, request CreateServiceRequest) (*CreateServiceResponse, error)
func (*Client) DeletePeeringConnection ¶ added in v1.6.0
func (*Client) DeleteService ¶
func (*Client) DetachServiceFromVPC ¶ added in v1.3.0
func (*Client) GetAllServices ¶ added in v1.2.0
func (*Client) GetService ¶
func (*Client) GetVPCByID ¶ added in v1.3.0
func (*Client) GetVPCByName ¶ added in v1.3.0
func (*Client) OpenPeerRequest ¶ added in v1.6.0
func (*Client) RenameService ¶
func (*Client) ResetServicePassword ¶ added in v1.12.0
func (*Client) ResizeInstance ¶
func (*Client) SetEnvironmentTag ¶ added in v1.11.0
func (*Client) SetReplicaCount ¶ added in v0.3.2
func (*Client) ToggleConnectionPooler ¶ added in v1.4.0
type CreateServiceRequest ¶
type CreateServiceRequest struct { Name string MilliCPU string MemoryGB string // StorageGB is used for forks, since the CreateServiceRequest expects a storage to be requested // and the fork instance should match the storage size of the primary. StorageGB string RegionCode string ReplicaCount string VpcID int64 ForkConfig *ForkConfig EnableConnectionPooler bool EnvironmentTag string }
type CreateServiceResponse ¶
type CreateServiceResponseData ¶
type CreateServiceResponseData struct {
CreateServiceResponse CreateServiceResponse `json:"createService"`
}
type CreateVPCResponse ¶ added in v1.3.0
type CreateVPCResponse struct {
VPC *VPC `json:"createVPC"`
}
type DeleteServiceResponse ¶
type DeleteServiceResponse struct {
Service Service `json:"deleteService"`
}
type EndpointAddress ¶ added in v1.11.1
type EndpointAddress struct { // The hostname to use for connections. Host string `json:"host"` // The port to use for connections. Port int `json:"port"` }
EndpointAddress represents the endpoint address
type ForkConfig ¶ added in v1.2.0
type GetAllServicesResponse ¶ added in v1.2.0
type GetAllServicesResponse struct {
Services []*Service `json:"getAllServices"`
}
type GetServiceResponse ¶
type GetServiceResponse struct {
Service Service `json:"getService"`
}
type JWTFromCCResponse ¶
type JWTFromCCResponse struct {
Token string `json:"getJWTForClientCredentials"`
}
type PeeringConnection ¶ added in v0.2.1
type ProductsResponse ¶
type ProductsResponse struct {
Products []*Product `json:"orbProducts"`
}
type ResourceConfig ¶
type ResourceSpec ¶
type Service ¶
type Service struct { ID string `json:"id"` ProjectID string `json:"projectId"` Name string `json:"name"` Status string `json:"status"` RegionCode string `json:"regionCode"` Paused bool `json:"paused"` ServiceSpec ServiceSpec `json:"spec"` Resources []ResourceSpec `json:"resources"` Created string `json:"created"` ReplicaStatus string `json:"replicaStatus"` VPCEndpoint *VPCEndpoint `json:"vpcEndpoint"` ForkSpec *ForkSpec `json:"forkedFromId"` Metadata *Metadata `json:"metadata"` // Endpoints contains the all service endpoints Endpoints *ServiceEndpoints `json:"endpoints,omitempty"` }
type ServiceEndpoints ¶ added in v1.11.1
type ServiceEndpoints struct { Primary *EndpointAddress `json:"primary"` Replica *EndpointAddress `json:"replica"` Pooler *EndpointAddress `json:"pooler"` }
ServiceEndpoints represents all service endpoints
type ServiceSpec ¶
type ToggleServiceResponse ¶ added in v1.8.0
type ToggleServiceResponse struct {
Service Service `json:"toggleService"`
}
type VPC ¶ added in v0.2.1
type VPC struct { ID string `json:"id"` ProvisionedID string `json:"provisionedId"` ProjectID string `json:"projectId"` CIDR string `json:"cidr"` Name string `json:"name"` RegionCode string `json:"regionCode"` Status string `json:"status"` ErrorMessage string `json:"errorMessage"` Created string `json:"created"` Updated string `json:"updated"` PeeringConnections []*PeeringConnection `json:"peeringConnections"` }
type VPCEndpoint ¶ added in v1.3.0
type VPCNameResponse ¶ added in v1.6.0
type VPCNameResponse struct {
VPC *VPC `json:"getVPCByName"`
}
type VPCResponse ¶ added in v1.3.0
type VPCResponse struct {
VPC *VPC `json:"getVPC"`
}
type VPCsResponse ¶ added in v1.3.0
type VPCsResponse struct {
VPCs []*VPC `json:"getAllVPCs"`
}
Click to show internal directories.
Click to hide internal directories.