ccloud

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SqlConWithTempUser

func SqlConWithTempUser[Handler func(db *pgx.ConnPool) (*R, error), R any](ctx context.Context, client *CcloudClient, clusterId string, database string, handler Handler) (res *R, err error)

Types

type CcloudClient

type CcloudClient struct {
	ApiKey string
	Host   string
	// contains filtered or unexported fields
}

func NewCcloudClient

func NewCcloudClient(ctx context.Context, apiKey string) *CcloudClient

NewCcloudClient returns a new CcloudClient.

type CockroachCloudClusterNotFoundError

type CockroachCloudClusterNotFoundError struct{}

func (CockroachCloudClusterNotFoundError) Error

type CockroachCloudClusterNotReadyError

type CockroachCloudClusterNotReadyError struct {
}

func (CockroachCloudClusterNotReadyError) Error

type CockroachCloudErrorResponse

type CockroachCloudErrorResponse struct {
	Code    int      `json:"code"`
	Message string   `json:"message"`
	Details []string `json:"details"`
}

type CockroachCloudSqlUserNotFoundError

type CockroachCloudSqlUserNotFoundError struct{}

func (CockroachCloudSqlUserNotFoundError) Error

type ConnectionStringResponse

type ConnectionStringResponse struct {
	ConnectionString string                         `json:"connection_string"`
	Params           ConnectionStringResponseParams `json:"params"`
}

type ConnectionStringResponseParams

type ConnectionStringResponseParams struct {
	Host     string `json:"Host"`
	Port     string `json:"Port"`
	Database string `json:"Database"`
}

type SyncResourceHolder

type SyncResourceHolder[T any] struct {
	// contains filtered or unexported fields
}

func NewSyncResourceHolder

func NewSyncResourceHolder[T any](resource T) *SyncResourceHolder[T]

func (*SyncResourceHolder[T]) Get

func (h *SyncResourceHolder[T]) Get() (T, func())

type UserCredMap

type UserCredMap = map[string]*tempUser

Jump to

Keyboard shortcuts

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