psc

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ServiceStatusCreateQueued when PSC service creation is queued
	ServiceStatusCreateQueued = "create-queued"
	// ServiceStatusDeleteQueued when PSC service deletion is queued
	ServiceStatusDeleteQueued = "delete-queued"
	// ServiceStatusInitialized when PSC service provisioning started
	ServiceStatusInitialized = "initialized"
	// ServiceStatusCreatePending when PSC service provisioning completed but databases are pending update
	ServiceStatusCreatePending = "create-pending"
	// ServiceStatusActive when PSC service is ready
	ServiceStatusActive = "active"
	// ServiceStatusDeletePending when infrastructure deletion is completed but databases are pending update
	ServiceStatusDeletePending = "delete-pending"
	// ServiceStatusDeleted when PSC service is deleted
	ServiceStatusDeleted = "deleted"
	// ServiceStatusProvisionFailed when PSC service has failed while creation/deletion
	ServiceStatusProvisionFailed = "provision-failed"
	// ServiceStatusFailed when PSC service failed after it's been reported as active
	ServiceStatusFailed = "failed"

	// EndpointStatusInitialized the endpoint was created in the SM but the creation script wasn't yet run
	EndpointStatusInitialized = "initialized"
	// EndpointStatusProcessing Processing the status during deletion or creation of 40 endpoints in cloud provider
	EndpointStatusProcessing = "processing"
	// EndpointStatusPending the endpoint is waiting for the user to accept or reject it
	EndpointStatusPending = "pending"
	// EndpointStatusAcceptPending the user accepted. the endpoint is not yet fully accepted
	EndpointStatusAcceptPending = "accept-pending"
	// EndpointStatusActive the endpoint is ready for use
	EndpointStatusActive = "active"
	// EndpointStatusDeleted the endpoint was successfully deleted
	EndpointStatusDeleted = "deleted"
	// EndpointStatusRejected the endpoint was successfully rejected
	EndpointStatusRejected = "rejected"
	// EndpointStatusRejectPending the user rejected. the endpoint is not yet fully rejected
	EndpointStatusRejectPending = "reject-pending"
	// EndpointStatusFailed endpoint is in error status
	EndpointStatusFailed = "failed"

	// EndpointActionAccept accepts the endpoint
	EndpointActionAccept = "accept"
	// EndpointActionReject rejects the endpoint
	EndpointActionReject = "reject"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(client HttpClient, taskWaiter TaskWaiter, logger Log) *API

func (*API) CreateActiveActiveEndpoint

func (a *API) CreateActiveActiveEndpoint(ctx context.Context, subscription int, regionId int, pscServiceId int, endpoint CreatePrivateServiceConnectEndpoint) (int, error)

func (*API) CreateActiveActiveService

func (a *API) CreateActiveActiveService(ctx context.Context, subscription int, regionId int) (int, error)

func (*API) CreateEndpoint

func (a *API) CreateEndpoint(ctx context.Context, subscription int, pscServiceId int, endpoint CreatePrivateServiceConnectEndpoint) (int, error)

func (*API) CreateService

func (a *API) CreateService(ctx context.Context, subscription int) (int, error)

func (*API) DeleteActiveActiveEndpoint

func (a *API) DeleteActiveActiveEndpoint(ctx context.Context, subscription int, regionId int, pscServiceId int,
	endpointId int) error

func (*API) DeleteActiveActiveService

func (a *API) DeleteActiveActiveService(ctx context.Context, subscription int, regionId int) error

func (*API) DeleteEndpoint

func (a *API) DeleteEndpoint(ctx context.Context, subscription int, pscServiceId int,
	endpointId int) error

func (*API) DeleteService

func (a *API) DeleteService(ctx context.Context, subscription int) error

func (*API) GetActiveActiveEndpointCreationScripts

func (a *API) GetActiveActiveEndpointCreationScripts(ctx context.Context, subscription int, regionId int, pscServiceId int, endpointId int, includeTerraformGcpScript bool) (*CreationScript, error)

func (*API) GetActiveActiveEndpointDeletionScripts

func (a *API) GetActiveActiveEndpointDeletionScripts(ctx context.Context, subscription int, regionId int, pscServiceId int, endpointId int) (*DeletionScript, error)

func (*API) GetActiveActiveEndpoints

func (a *API) GetActiveActiveEndpoints(ctx context.Context, subscription int, regionId int, pscServiceId int) (*PrivateServiceConnectEndpoints, error)

func (*API) GetActiveActiveService

func (a *API) GetActiveActiveService(ctx context.Context, subscription int, regionId int) (*PrivateServiceConnectService, error)

func (*API) GetEndpointCreationScripts

func (a *API) GetEndpointCreationScripts(ctx context.Context, subscription int, pscServiceId int, endpointId int, includeTerraformGcpScript bool) (*CreationScript, error)

func (*API) GetEndpointDeletionScripts

func (a *API) GetEndpointDeletionScripts(ctx context.Context, subscription int, pscServiceId int, endpointId int) (*DeletionScript, error)

func (*API) GetEndpoints

func (a *API) GetEndpoints(ctx context.Context, subscription int, pscServiceId int) (*PrivateServiceConnectEndpoints, error)

func (*API) GetService

func (a *API) GetService(ctx context.Context, subscription int) (*PrivateServiceConnectService, error)

func (*API) UpdateActiveActiveEndpoint

func (a *API) UpdateActiveActiveEndpoint(ctx context.Context, subscription int, regionId int, pscServiceId int,
	endpointId int, endpoint *UpdatePrivateServiceConnectEndpoint) error

func (*API) UpdateEndpoint

func (a *API) UpdateEndpoint(ctx context.Context, subscription int, pscServiceId int, endpointId int,
	endpoint *UpdatePrivateServiceConnectEndpoint) error

type CreatePrivateServiceConnectEndpoint

type CreatePrivateServiceConnectEndpoint struct {
	GCPProjectID           *string `json:"gcpProjectId,omitempty"`
	GCPVPCName             *string `json:"gcpVpcName,omitempty"`
	GCPVPCSubnetName       *string `json:"gcpVpcSubnetName,omitempty"`
	EndpointConnectionName *string `json:"endpointConnectionName,omitempty"`
}

type CreationScript

type CreationScript struct {
	Script *GCPCreationScript `json:"script,omitempty"`
}

type DeletionScript

type DeletionScript struct {
	Script *GCPDeletionScript `json:"script,omitempty"`
}

type GCPCreationScript

type GCPCreationScript struct {
	Bash         *string       `json:"bash,omitempty"`
	Powershell   *string       `json:"powershell,omitempty"`
	TerraformGcp *TerraformGCP `json:"terraformGcp,omitempty"`
}

type GCPDeletionScript

type GCPDeletionScript struct {
	Bash       *string `json:"bash,omitempty"`
	Powershell *string `json:"powershell,omitempty"`
}

type HttpClient

type HttpClient interface {
	Get(ctx context.Context, name, path string, responseBody interface{}) error
	GetWithQuery(ctx context.Context, name, path string, query url.Values, responseBody interface{}) error
	Post(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error
	Put(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error
	Delete(ctx context.Context, name, path string, responseBody interface{}) error
}

type Log

type Log interface {
	Printf(format string, args ...interface{})
}

type NotFound

type NotFound struct {
	// contains filtered or unexported fields
}

func (*NotFound) Error

func (f *NotFound) Error() string

type NotFoundActiveActive

type NotFoundActiveActive struct {
	// contains filtered or unexported fields
}

func (*NotFoundActiveActive) Error

func (f *NotFoundActiveActive) Error() string

type PrivateServiceConnectEndpoint

type PrivateServiceConnectEndpoint struct {
	ID                     *int    `json:"id,omitempty"`
	GCPProjectID           *string `json:"gcpProjectId,omitempty"`
	GCPVPCName             *string `json:"gcpVpcName,omitempty"`
	GCPVPCSubnetName       *string `json:"gcpVpcSubnetName,omitempty"`
	EndpointConnectionName *string `json:"endpointConnectionName,omitempty"`
	Status                 *string `json:"status,omitempty"`
}

type PrivateServiceConnectEndpoints

type PrivateServiceConnectEndpoints struct {
	PSCServiceID *int                             `json:"pscServiceId,omitempty"`
	Endpoints    []*PrivateServiceConnectEndpoint `json:"endpoints,omitempty"`
}

type PrivateServiceConnectService

type PrivateServiceConnectService struct {
	ID                    *int    `json:"id,omitempty"`
	ConnectionHostName    *string `json:"connectionHostName,omitempty"`
	ServiceAttachmentName *string `json:"serviceAttachmentName,omitempty"`
	Status                *string `json:"status,omitempty"`
}

type TaskWaiter

type TaskWaiter interface {
	WaitForResourceId(ctx context.Context, id string) (int, error)
	Wait(ctx context.Context, id string) error
	WaitForResource(ctx context.Context, id string, resource interface{}) error
}

type TerraformGCP

type TerraformGCP struct {
	ServiceAttachments []TerraformGCPServiceAttachment `json:"serviceAttachments,omitempty"`
}

type TerraformGCPServiceAttachment

type TerraformGCPServiceAttachment struct {
	Name               *string `json:"name,omitempty"`
	DNSRecord          *string `json:"dnsRecord,omitempty"`
	IPAddressName      *string `json:"ipAddressName,omitempty"`
	ForwardingRuleName *string `json:"forwardingRuleName,omitempty"`
}

type UpdatePrivateServiceConnectEndpoint

type UpdatePrivateServiceConnectEndpoint struct {
	GCPProjectID           *string `json:"gcpProjectId,omitempty"`
	GCPVPCName             *string `json:"gcpVpcName,omitempty"`
	GCPVPCSubnetName       *string `json:"gcpVpcSubnetName,omitempty"`
	EndpointConnectionName *string `json:"endpointConnectionName,omitempty"`
	Action                 *string `json:"action,omitempty"`
}

Jump to

Keyboard shortcuts

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