api

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "BearerAuth.Scopes"
)

Variables

View Source
var HTTPClient = &http.Client{
	Timeout: 30 * time.Second,
}

Singleton HTTP client with a 30 second request timeout

View Source
var NewGhostClient = func(apiURL string, auth AuthMethod) (ClientWithResponsesInterface, error) {
	client, err := NewClientWithResponses(
		apiURL,
		WithHTTPClient(HTTPClient),
		WithRequestEditorFn(func(ctx context.Context, req *http.Request) error {
			auth(req)
			req.Header.Set("User-Agent", fmt.Sprintf("ghost-cli/%s", config.Version))
			return nil
		}))

	if err != nil {
		return nil, fmt.Errorf("failed to create API client: %w", err)
	}

	return client, nil
}

NewGhostClient creates a new API client with the given API URL and auth method. Declared as a var so tests can replace it.

Functions

func NewAnalyticsIdentifyRequest

func NewAnalyticsIdentifyRequest(server string, body AnalyticsIdentifyJSONRequestBody) (*http.Request, error)

NewAnalyticsIdentifyRequest calls the generic AnalyticsIdentify builder with application/json body

func NewAnalyticsIdentifyRequestWithBody

func NewAnalyticsIdentifyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAnalyticsIdentifyRequestWithBody generates requests for AnalyticsIdentify with any type of body

func NewAnalyticsTrackRequest

func NewAnalyticsTrackRequest(server string, body AnalyticsTrackJSONRequestBody) (*http.Request, error)

NewAnalyticsTrackRequest calls the generic AnalyticsTrack builder with application/json body

func NewAnalyticsTrackRequestWithBody

func NewAnalyticsTrackRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAnalyticsTrackRequestWithBody generates requests for AnalyticsTrack with any type of body

func NewAuthInfoRequest

func NewAuthInfoRequest(server string) (*http.Request, error)

NewAuthInfoRequest generates requests for AuthInfo

func NewCancelPaymentMethodDeletionRequest

func NewCancelPaymentMethodDeletionRequest(server string, spaceId SpaceId, paymentId PaymentId) (*http.Request, error)

NewCancelPaymentMethodDeletionRequest generates requests for CancelPaymentMethodDeletion

func NewCreateApiKeyRequest

func NewCreateApiKeyRequest(server string, spaceId SpaceId, body CreateApiKeyJSONRequestBody) (*http.Request, error)

NewCreateApiKeyRequest calls the generic CreateApiKey builder with application/json body

func NewCreateApiKeyRequestWithBody

func NewCreateApiKeyRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error)

NewCreateApiKeyRequestWithBody generates requests for CreateApiKey with any type of body

func NewCreateDatabaseRequest

func NewCreateDatabaseRequest(server string, spaceId SpaceId, body CreateDatabaseJSONRequestBody) (*http.Request, error)

NewCreateDatabaseRequest calls the generic CreateDatabase builder with application/json body

func NewCreateDatabaseRequestWithBody

func NewCreateDatabaseRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error)

NewCreateDatabaseRequestWithBody generates requests for CreateDatabase with any type of body

func NewCreatePaymentMethodSetupRequest

func NewCreatePaymentMethodSetupRequest(server string, spaceId SpaceId) (*http.Request, error)

NewCreatePaymentMethodSetupRequest generates requests for CreatePaymentMethodSetup

func NewCreateSpaceRequest

func NewCreateSpaceRequest(server string, body CreateSpaceJSONRequestBody) (*http.Request, error)

NewCreateSpaceRequest calls the generic CreateSpace builder with application/json body

func NewCreateSpaceRequestWithBody

func NewCreateSpaceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateSpaceRequestWithBody generates requests for CreateSpace with any type of body

func NewDatabaseLogsRequest

func NewDatabaseLogsRequest(server string, spaceId SpaceId, databaseRef DatabaseRef, params *DatabaseLogsParams) (*http.Request, error)

NewDatabaseLogsRequest generates requests for DatabaseLogs

func NewDeleteApiKeyRequest

func NewDeleteApiKeyRequest(server string, spaceId SpaceId, prefix ApiKeyPrefix) (*http.Request, error)

NewDeleteApiKeyRequest generates requests for DeleteApiKey

func NewDeleteDatabaseRequest

func NewDeleteDatabaseRequest(server string, spaceId SpaceId, databaseRef DatabaseRef) (*http.Request, error)

NewDeleteDatabaseRequest generates requests for DeleteDatabase

func NewDeletePaymentMethodRequest

func NewDeletePaymentMethodRequest(server string, spaceId SpaceId, paymentId PaymentId) (*http.Request, error)

NewDeletePaymentMethodRequest generates requests for DeletePaymentMethod

func NewForkDatabaseRequest

func NewForkDatabaseRequest(server string, spaceId SpaceId, databaseRef DatabaseRef, body ForkDatabaseJSONRequestBody) (*http.Request, error)

NewForkDatabaseRequest calls the generic ForkDatabase builder with application/json body

func NewForkDatabaseRequestWithBody

func NewForkDatabaseRequestWithBody(server string, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader) (*http.Request, error)

NewForkDatabaseRequestWithBody generates requests for ForkDatabase with any type of body

func NewGetDatabaseRequest

func NewGetDatabaseRequest(server string, spaceId SpaceId, databaseRef DatabaseRef) (*http.Request, error)

NewGetDatabaseRequest generates requests for GetDatabase

func NewGetInvoiceRequest added in v0.10.0

func NewGetInvoiceRequest(server string, spaceId SpaceId, invoiceId string) (*http.Request, error)

NewGetInvoiceRequest generates requests for GetInvoice

func NewGetPaymentMethodRequest

func NewGetPaymentMethodRequest(server string, spaceId SpaceId, paymentId PaymentId) (*http.Request, error)

NewGetPaymentMethodRequest generates requests for GetPaymentMethod

func NewGetPricingRequest added in v0.13.0

func NewGetPricingRequest(server string) (*http.Request, error)

NewGetPricingRequest generates requests for GetPricing

func NewHealthRequest

func NewHealthRequest(server string) (*http.Request, error)

NewHealthRequest generates requests for Health

func NewListApiKeysRequest

func NewListApiKeysRequest(server string, spaceId SpaceId) (*http.Request, error)

NewListApiKeysRequest generates requests for ListApiKeys

func NewListDatabasesRequest

func NewListDatabasesRequest(server string, spaceId SpaceId) (*http.Request, error)

NewListDatabasesRequest generates requests for ListDatabases

func NewListInvoicesRequest added in v0.10.0

func NewListInvoicesRequest(server string, spaceId SpaceId) (*http.Request, error)

NewListInvoicesRequest generates requests for ListInvoices

func NewListPaymentMethodsRequest

func NewListPaymentMethodsRequest(server string, spaceId SpaceId) (*http.Request, error)

NewListPaymentMethodsRequest generates requests for ListPaymentMethods

func NewListSharesRequest added in v0.10.0

func NewListSharesRequest(server string, spaceId SpaceId) (*http.Request, error)

NewListSharesRequest generates requests for ListShares

func NewListSpacesRequest

func NewListSpacesRequest(server string) (*http.Request, error)

NewListSpacesRequest generates requests for ListSpaces

func NewLogoutRequest

func NewLogoutRequest(server string, body LogoutJSONRequestBody) (*http.Request, error)

NewLogoutRequest calls the generic Logout builder with application/json body

func NewLogoutRequestWithBody

func NewLogoutRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewLogoutRequestWithBody generates requests for Logout with any type of body

func NewPauseDatabaseRequest

func NewPauseDatabaseRequest(server string, spaceId SpaceId, databaseRef DatabaseRef) (*http.Request, error)

NewPauseDatabaseRequest generates requests for PauseDatabase

func NewRenameDatabaseRequest

func NewRenameDatabaseRequest(server string, spaceId SpaceId, databaseRef DatabaseRef, body RenameDatabaseJSONRequestBody) (*http.Request, error)

NewRenameDatabaseRequest calls the generic RenameDatabase builder with application/json body

func NewRenameDatabaseRequestWithBody

func NewRenameDatabaseRequestWithBody(server string, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader) (*http.Request, error)

NewRenameDatabaseRequestWithBody generates requests for RenameDatabase with any type of body

func NewResumeDatabaseRequest

func NewResumeDatabaseRequest(server string, spaceId SpaceId, databaseRef DatabaseRef) (*http.Request, error)

NewResumeDatabaseRequest generates requests for ResumeDatabase

func NewRevokeShareRequest added in v0.10.0

func NewRevokeShareRequest(server string, spaceId SpaceId, shareToken string) (*http.Request, error)

NewRevokeShareRequest generates requests for RevokeShare

func NewSetPaymentMethodPrimaryRequest

func NewSetPaymentMethodPrimaryRequest(server string, spaceId SpaceId, paymentId PaymentId) (*http.Request, error)

NewSetPaymentMethodPrimaryRequest generates requests for SetPaymentMethodPrimary

func NewShareDatabaseRequest added in v0.10.0

func NewShareDatabaseRequest(server string, spaceId SpaceId, databaseRef DatabaseRef, body ShareDatabaseJSONRequestBody) (*http.Request, error)

NewShareDatabaseRequest calls the generic ShareDatabase builder with application/json body

func NewShareDatabaseRequestWithBody added in v0.10.0

func NewShareDatabaseRequestWithBody(server string, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader) (*http.Request, error)

NewShareDatabaseRequestWithBody generates requests for ShareDatabase with any type of body

func NewSpaceStatusRequest

func NewSpaceStatusRequest(server string, spaceId SpaceId) (*http.Request, error)

NewSpaceStatusRequest generates requests for SpaceStatus

func NewSpaceUsageRequest added in v0.15.1

func NewSpaceUsageRequest(server string, spaceId SpaceId) (*http.Request, error)

NewSpaceUsageRequest generates requests for SpaceUsage

func NewSubmitFeedbackRequest

func NewSubmitFeedbackRequest(server string, body SubmitFeedbackJSONRequestBody) (*http.Request, error)

NewSubmitFeedbackRequest calls the generic SubmitFeedback builder with application/json body

func NewSubmitFeedbackRequestWithBody

func NewSubmitFeedbackRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewSubmitFeedbackRequestWithBody generates requests for SubmitFeedback with any type of body

func NewUpdateOveragesRequest added in v0.17.0

func NewUpdateOveragesRequest(server string, spaceId SpaceId, body UpdateOveragesJSONRequestBody) (*http.Request, error)

NewUpdateOveragesRequest calls the generic UpdateOverages builder with application/json body

func NewUpdateOveragesRequestWithBody added in v0.17.0

func NewUpdateOveragesRequestWithBody(server string, spaceId SpaceId, contentType string, body io.Reader) (*http.Request, error)

NewUpdateOveragesRequestWithBody generates requests for UpdateOverages with any type of body

func NewUpdatePasswordRequest

func NewUpdatePasswordRequest(server string, spaceId SpaceId, databaseRef DatabaseRef, body UpdatePasswordJSONRequestBody) (*http.Request, error)

NewUpdatePasswordRequest calls the generic UpdatePassword builder with application/json body

func NewUpdatePasswordRequestWithBody

func NewUpdatePasswordRequestWithBody(server string, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader) (*http.Request, error)

NewUpdatePasswordRequestWithBody generates requests for UpdatePassword with any type of body

Types

type AnalyticsIdentifyJSONRequestBody

type AnalyticsIdentifyJSONRequestBody = IdentifyRequest

AnalyticsIdentifyJSONRequestBody defines body for AnalyticsIdentify for application/json ContentType.

type AnalyticsIdentifyResponse

type AnalyticsIdentifyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *StatusResponse
	JSONDefault  *Error
}

func ParseAnalyticsIdentifyResponse

func ParseAnalyticsIdentifyResponse(rsp *http.Response) (*AnalyticsIdentifyResponse, error)

ParseAnalyticsIdentifyResponse parses an HTTP response from a AnalyticsIdentifyWithResponse call

func (AnalyticsIdentifyResponse) Status

func (r AnalyticsIdentifyResponse) Status() string

Status returns HTTPResponse.Status

func (AnalyticsIdentifyResponse) StatusCode

func (r AnalyticsIdentifyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AnalyticsTrackJSONRequestBody

type AnalyticsTrackJSONRequestBody = TrackRequest

AnalyticsTrackJSONRequestBody defines body for AnalyticsTrack for application/json ContentType.

type AnalyticsTrackResponse

type AnalyticsTrackResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *StatusResponse
	JSONDefault  *Error
}

func ParseAnalyticsTrackResponse

func ParseAnalyticsTrackResponse(rsp *http.Response) (*AnalyticsTrackResponse, error)

ParseAnalyticsTrackResponse parses an HTTP response from a AnalyticsTrackWithResponse call

func (AnalyticsTrackResponse) Status

func (r AnalyticsTrackResponse) Status() string

Status returns HTTPResponse.Status

func (AnalyticsTrackResponse) StatusCode

func (r AnalyticsTrackResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ApiKey

type ApiKey struct {
	// CreatedAt Time the key was created.
	CreatedAt time.Time `json:"created_at"`

	// Name User-provided label for the key.
	Name string `json:"name"`

	// Prefix Stable prefix identifier for the key (starts with `gt_`). Used to identify the key for deletion.
	Prefix string `json:"prefix"`
}

ApiKey An API key in a space.

type ApiKeyCredentials

type ApiKeyCredentials struct {
	// AccessKey Use as the username in HTTP Basic auth.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	AccessKey string `json:"access_key"`

	// ApiKey Bearer token for the key. Use as `Authorization: Bearer <api_key>`.
	ApiKey string `json:"api_key"`

	// SecretKey Use as the password in HTTP Basic auth.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	SecretKey string `json:"secret_key"`
}

ApiKeyCredentials Credentials for a newly created API key. The secret portion cannot be retrieved again later.

type ApiKeyInfo

type ApiKeyInfo struct {
	// SpaceId Space the API key is scoped to.
	SpaceId string `json:"space_id"`

	// SpaceName Name of the space the API key is scoped to.
	SpaceName string `json:"space_name"`

	// UserEmail Email of the user who created the API key.
	UserEmail string `json:"user_email"`

	// UserId ID of the user who created the API key.
	UserId string `json:"user_id"`

	// UserName Name of the user who created the API key.
	UserName string `json:"user_name"`
}

ApiKeyInfo Information about the API key used for authentication.

type ApiKeyPrefix

type ApiKeyPrefix = string

ApiKeyPrefix defines model for ApiKeyPrefix.

type AuthInfo

type AuthInfo struct {
	// ApiKey Information about the API key used for authentication.
	ApiKey *ApiKeyInfo `json:"api_key,omitempty"`

	// Type Type of authentication used.
	Type AuthInfoType `json:"type"`

	// User Authenticated user details.
	User *UserInfo `json:"user,omitempty"`
}

AuthInfo Information about the authenticated caller.

type AuthInfoResponse

type AuthInfoResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AuthInfo
	JSONDefault  *Error
}

func ParseAuthInfoResponse

func ParseAuthInfoResponse(rsp *http.Response) (*AuthInfoResponse, error)

ParseAuthInfoResponse parses an HTTP response from a AuthInfoWithResponse call

func (AuthInfoResponse) Status

func (r AuthInfoResponse) Status() string

Status returns HTTPResponse.Status

func (AuthInfoResponse) StatusCode

func (r AuthInfoResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AuthInfoType

type AuthInfoType string

AuthInfoType Type of authentication used.

const (
	AuthInfoTypeApiKey AuthInfoType = "api_key"
	AuthInfoTypeUser   AuthInfoType = "user"
)

Defines values for AuthInfoType.

type AuthMethod

type AuthMethod func(req *http.Request)

AuthMethod configures the Authorization header on outgoing API requests.

func APIKeyAuth

func APIKeyAuth(apiKey string) AuthMethod

APIKeyAuth returns an AuthMethod that authenticates using a Bearer token. Use this for new-style API keys (format: gt_<access_key>_<secret_key>).

func LegacyAPIKeyAuth

func LegacyAPIKeyAuth(apiKey string) AuthMethod

LegacyAPIKeyAuth returns an AuthMethod that authenticates with an API key using HTTP Basic auth. Use this for legacy API keys stored in credentials (access_key:secret_key encoded as Basic auth).

func TokenAuth

func TokenAuth(token *oauth2.Token) AuthMethod

TokenAuth returns an AuthMethod that authenticates using an OAuth2 token.

type CancelPaymentMethodDeletionResponse

type CancelPaymentMethodDeletionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseCancelPaymentMethodDeletionResponse

func ParseCancelPaymentMethodDeletionResponse(rsp *http.Response) (*CancelPaymentMethodDeletionResponse, error)

ParseCancelPaymentMethodDeletionResponse parses an HTTP response from a CancelPaymentMethodDeletionWithResponse call

func (CancelPaymentMethodDeletionResponse) Status

Status returns HTTPResponse.Status

func (CancelPaymentMethodDeletionResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) AnalyticsIdentify

func (c *Client) AnalyticsIdentify(ctx context.Context, body AnalyticsIdentifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AnalyticsIdentifyWithBody

func (c *Client) AnalyticsIdentifyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AnalyticsTrack

func (c *Client) AnalyticsTrack(ctx context.Context, body AnalyticsTrackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AnalyticsTrackWithBody

func (c *Client) AnalyticsTrackWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AuthInfo

func (c *Client) AuthInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CancelPaymentMethodDeletion

func (c *Client) CancelPaymentMethodDeletion(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateApiKey

func (c *Client) CreateApiKey(ctx context.Context, spaceId SpaceId, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateApiKeyWithBody

func (c *Client) CreateApiKeyWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateDatabase

func (c *Client) CreateDatabase(ctx context.Context, spaceId SpaceId, body CreateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateDatabaseWithBody

func (c *Client) CreateDatabaseWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreatePaymentMethodSetup

func (c *Client) CreatePaymentMethodSetup(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateSpace

func (c *Client) CreateSpace(ctx context.Context, body CreateSpaceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateSpaceWithBody

func (c *Client) CreateSpaceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DatabaseLogs

func (c *Client) DatabaseLogs(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, params *DatabaseLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteApiKey

func (c *Client) DeleteApiKey(ctx context.Context, spaceId SpaceId, prefix ApiKeyPrefix, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteDatabase

func (c *Client) DeleteDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeletePaymentMethod

func (c *Client) DeletePaymentMethod(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ForkDatabase

func (c *Client) ForkDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body ForkDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ForkDatabaseWithBody

func (c *Client) ForkDatabaseWithBody(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetDatabase

func (c *Client) GetDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetInvoice added in v0.10.0

func (c *Client) GetInvoice(ctx context.Context, spaceId SpaceId, invoiceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPaymentMethod

func (c *Client) GetPaymentMethod(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPricing added in v0.13.0

func (c *Client) GetPricing(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Health

func (c *Client) Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListApiKeys

func (c *Client) ListApiKeys(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListDatabases

func (c *Client) ListDatabases(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListInvoices added in v0.10.0

func (c *Client) ListInvoices(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListPaymentMethods

func (c *Client) ListPaymentMethods(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListShares added in v0.10.0

func (c *Client) ListShares(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListSpaces

func (c *Client) ListSpaces(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Logout

func (c *Client) Logout(ctx context.Context, body LogoutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) LogoutWithBody

func (c *Client) LogoutWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PauseDatabase

func (c *Client) PauseDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RenameDatabase

func (c *Client) RenameDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body RenameDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RenameDatabaseWithBody

func (c *Client) RenameDatabaseWithBody(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ResumeDatabase

func (c *Client) ResumeDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RevokeShare added in v0.10.0

func (c *Client) RevokeShare(ctx context.Context, spaceId SpaceId, shareToken string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetPaymentMethodPrimary

func (c *Client) SetPaymentMethodPrimary(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ShareDatabase added in v0.10.0

func (c *Client) ShareDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body ShareDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ShareDatabaseWithBody added in v0.10.0

func (c *Client) ShareDatabaseWithBody(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SpaceStatus

func (c *Client) SpaceStatus(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SpaceUsage added in v0.15.1

func (c *Client) SpaceUsage(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SubmitFeedback

func (c *Client) SubmitFeedback(ctx context.Context, body SubmitFeedbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SubmitFeedbackWithBody

func (c *Client) SubmitFeedbackWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateOverages added in v0.17.0

func (c *Client) UpdateOverages(ctx context.Context, spaceId SpaceId, body UpdateOveragesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateOveragesWithBody added in v0.17.0

func (c *Client) UpdateOveragesWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdatePassword

func (c *Client) UpdatePassword(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body UpdatePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdatePasswordWithBody

func (c *Client) UpdatePasswordWithBody(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// AnalyticsIdentifyWithBody request with any body
	AnalyticsIdentifyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AnalyticsIdentify(ctx context.Context, body AnalyticsIdentifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AnalyticsTrackWithBody request with any body
	AnalyticsTrackWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AnalyticsTrack(ctx context.Context, body AnalyticsTrackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AuthInfo request
	AuthInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LogoutWithBody request with any body
	LogoutWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Logout(ctx context.Context, body LogoutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SubmitFeedbackWithBody request with any body
	SubmitFeedbackWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SubmitFeedback(ctx context.Context, body SubmitFeedbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Health request
	Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPricing request
	GetPricing(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListSpaces request
	ListSpaces(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateSpaceWithBody request with any body
	CreateSpaceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateSpace(ctx context.Context, body CreateSpaceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListApiKeys request
	ListApiKeys(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateApiKeyWithBody request with any body
	CreateApiKeyWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateApiKey(ctx context.Context, spaceId SpaceId, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteApiKey request
	DeleteApiKey(ctx context.Context, spaceId SpaceId, prefix ApiKeyPrefix, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListDatabases request
	ListDatabases(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateDatabaseWithBody request with any body
	CreateDatabaseWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateDatabase(ctx context.Context, spaceId SpaceId, body CreateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteDatabase request
	DeleteDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetDatabase request
	GetDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ForkDatabaseWithBody request with any body
	ForkDatabaseWithBody(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ForkDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body ForkDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DatabaseLogs request
	DatabaseLogs(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, params *DatabaseLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdatePasswordWithBody request with any body
	UpdatePasswordWithBody(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdatePassword(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body UpdatePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PauseDatabase request
	PauseDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RenameDatabaseWithBody request with any body
	RenameDatabaseWithBody(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RenameDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body RenameDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ResumeDatabase request
	ResumeDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ShareDatabaseWithBody request with any body
	ShareDatabaseWithBody(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ShareDatabase(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body ShareDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListInvoices request
	ListInvoices(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetInvoice request
	GetInvoice(ctx context.Context, spaceId SpaceId, invoiceId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateOveragesWithBody request with any body
	UpdateOveragesWithBody(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateOverages(ctx context.Context, spaceId SpaceId, body UpdateOveragesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListPaymentMethods request
	ListPaymentMethods(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreatePaymentMethodSetup request
	CreatePaymentMethodSetup(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeletePaymentMethod request
	DeletePaymentMethod(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPaymentMethod request
	GetPaymentMethod(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CancelPaymentMethodDeletion request
	CancelPaymentMethodDeletion(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetPaymentMethodPrimary request
	SetPaymentMethodPrimary(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListShares request
	ListShares(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RevokeShare request
	RevokeShare(ctx context.Context, spaceId SpaceId, shareToken string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SpaceStatus request
	SpaceStatus(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SpaceUsage request
	SpaceUsage(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) AnalyticsIdentifyWithBodyWithResponse

func (c *ClientWithResponses) AnalyticsIdentifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnalyticsIdentifyResponse, error)

AnalyticsIdentifyWithBodyWithResponse request with arbitrary body returning *AnalyticsIdentifyResponse

func (*ClientWithResponses) AnalyticsIdentifyWithResponse

func (c *ClientWithResponses) AnalyticsIdentifyWithResponse(ctx context.Context, body AnalyticsIdentifyJSONRequestBody, reqEditors ...RequestEditorFn) (*AnalyticsIdentifyResponse, error)

func (*ClientWithResponses) AnalyticsTrackWithBodyWithResponse

func (c *ClientWithResponses) AnalyticsTrackWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnalyticsTrackResponse, error)

AnalyticsTrackWithBodyWithResponse request with arbitrary body returning *AnalyticsTrackResponse

func (*ClientWithResponses) AnalyticsTrackWithResponse

func (c *ClientWithResponses) AnalyticsTrackWithResponse(ctx context.Context, body AnalyticsTrackJSONRequestBody, reqEditors ...RequestEditorFn) (*AnalyticsTrackResponse, error)

func (*ClientWithResponses) AuthInfoWithResponse

func (c *ClientWithResponses) AuthInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AuthInfoResponse, error)

AuthInfoWithResponse request returning *AuthInfoResponse

func (*ClientWithResponses) CancelPaymentMethodDeletionWithResponse

func (c *ClientWithResponses) CancelPaymentMethodDeletionWithResponse(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*CancelPaymentMethodDeletionResponse, error)

CancelPaymentMethodDeletionWithResponse request returning *CancelPaymentMethodDeletionResponse

func (*ClientWithResponses) CreateApiKeyWithBodyWithResponse

func (c *ClientWithResponses) CreateApiKeyWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)

CreateApiKeyWithBodyWithResponse request with arbitrary body returning *CreateApiKeyResponse

func (*ClientWithResponses) CreateApiKeyWithResponse

func (c *ClientWithResponses) CreateApiKeyWithResponse(ctx context.Context, spaceId SpaceId, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)

func (*ClientWithResponses) CreateDatabaseWithBodyWithResponse

func (c *ClientWithResponses) CreateDatabaseWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseResponse, error)

CreateDatabaseWithBodyWithResponse request with arbitrary body returning *CreateDatabaseResponse

func (*ClientWithResponses) CreateDatabaseWithResponse

func (c *ClientWithResponses) CreateDatabaseWithResponse(ctx context.Context, spaceId SpaceId, body CreateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseResponse, error)

func (*ClientWithResponses) CreatePaymentMethodSetupWithResponse

func (c *ClientWithResponses) CreatePaymentMethodSetupWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*CreatePaymentMethodSetupResponse, error)

CreatePaymentMethodSetupWithResponse request returning *CreatePaymentMethodSetupResponse

func (*ClientWithResponses) CreateSpaceWithBodyWithResponse

func (c *ClientWithResponses) CreateSpaceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpaceResponse, error)

CreateSpaceWithBodyWithResponse request with arbitrary body returning *CreateSpaceResponse

func (*ClientWithResponses) CreateSpaceWithResponse

func (c *ClientWithResponses) CreateSpaceWithResponse(ctx context.Context, body CreateSpaceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpaceResponse, error)

func (*ClientWithResponses) DatabaseLogsWithResponse

func (c *ClientWithResponses) DatabaseLogsWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, params *DatabaseLogsParams, reqEditors ...RequestEditorFn) (*DatabaseLogsResponse, error)

DatabaseLogsWithResponse request returning *DatabaseLogsResponse

func (*ClientWithResponses) DeleteApiKeyWithResponse

func (c *ClientWithResponses) DeleteApiKeyWithResponse(ctx context.Context, spaceId SpaceId, prefix ApiKeyPrefix, reqEditors ...RequestEditorFn) (*DeleteApiKeyResponse, error)

DeleteApiKeyWithResponse request returning *DeleteApiKeyResponse

func (*ClientWithResponses) DeleteDatabaseWithResponse

func (c *ClientWithResponses) DeleteDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*DeleteDatabaseResponse, error)

DeleteDatabaseWithResponse request returning *DeleteDatabaseResponse

func (*ClientWithResponses) DeletePaymentMethodWithResponse

func (c *ClientWithResponses) DeletePaymentMethodWithResponse(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*DeletePaymentMethodResponse, error)

DeletePaymentMethodWithResponse request returning *DeletePaymentMethodResponse

func (*ClientWithResponses) ForkDatabaseWithBodyWithResponse

func (c *ClientWithResponses) ForkDatabaseWithBodyWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ForkDatabaseResponse, error)

ForkDatabaseWithBodyWithResponse request with arbitrary body returning *ForkDatabaseResponse

func (*ClientWithResponses) ForkDatabaseWithResponse

func (c *ClientWithResponses) ForkDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body ForkDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*ForkDatabaseResponse, error)

func (*ClientWithResponses) GetDatabaseWithResponse

func (c *ClientWithResponses) GetDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*GetDatabaseResponse, error)

GetDatabaseWithResponse request returning *GetDatabaseResponse

func (*ClientWithResponses) GetInvoiceWithResponse added in v0.10.0

func (c *ClientWithResponses) GetInvoiceWithResponse(ctx context.Context, spaceId SpaceId, invoiceId string, reqEditors ...RequestEditorFn) (*GetInvoiceResponse, error)

GetInvoiceWithResponse request returning *GetInvoiceResponse

func (*ClientWithResponses) GetPaymentMethodWithResponse

func (c *ClientWithResponses) GetPaymentMethodWithResponse(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*GetPaymentMethodResponse, error)

GetPaymentMethodWithResponse request returning *GetPaymentMethodResponse

func (*ClientWithResponses) GetPricingWithResponse added in v0.13.0

func (c *ClientWithResponses) GetPricingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPricingResponse, error)

GetPricingWithResponse request returning *GetPricingResponse

func (*ClientWithResponses) HealthWithResponse

func (c *ClientWithResponses) HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error)

HealthWithResponse request returning *HealthResponse

func (*ClientWithResponses) ListApiKeysWithResponse

func (c *ClientWithResponses) ListApiKeysWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ListApiKeysResponse, error)

ListApiKeysWithResponse request returning *ListApiKeysResponse

func (*ClientWithResponses) ListDatabasesWithResponse

func (c *ClientWithResponses) ListDatabasesWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ListDatabasesResponse, error)

ListDatabasesWithResponse request returning *ListDatabasesResponse

func (*ClientWithResponses) ListInvoicesWithResponse added in v0.10.0

func (c *ClientWithResponses) ListInvoicesWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ListInvoicesResponse, error)

ListInvoicesWithResponse request returning *ListInvoicesResponse

func (*ClientWithResponses) ListPaymentMethodsWithResponse

func (c *ClientWithResponses) ListPaymentMethodsWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ListPaymentMethodsResponse, error)

ListPaymentMethodsWithResponse request returning *ListPaymentMethodsResponse

func (*ClientWithResponses) ListSharesWithResponse added in v0.10.0

func (c *ClientWithResponses) ListSharesWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ListSharesResponse, error)

ListSharesWithResponse request returning *ListSharesResponse

func (*ClientWithResponses) ListSpacesWithResponse

func (c *ClientWithResponses) ListSpacesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListSpacesResponse, error)

ListSpacesWithResponse request returning *ListSpacesResponse

func (*ClientWithResponses) LogoutWithBodyWithResponse

func (c *ClientWithResponses) LogoutWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LogoutResponse, error)

LogoutWithBodyWithResponse request with arbitrary body returning *LogoutResponse

func (*ClientWithResponses) LogoutWithResponse

func (c *ClientWithResponses) LogoutWithResponse(ctx context.Context, body LogoutJSONRequestBody, reqEditors ...RequestEditorFn) (*LogoutResponse, error)

func (*ClientWithResponses) PauseDatabaseWithResponse

func (c *ClientWithResponses) PauseDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*PauseDatabaseResponse, error)

PauseDatabaseWithResponse request returning *PauseDatabaseResponse

func (*ClientWithResponses) RenameDatabaseWithBodyWithResponse

func (c *ClientWithResponses) RenameDatabaseWithBodyWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenameDatabaseResponse, error)

RenameDatabaseWithBodyWithResponse request with arbitrary body returning *RenameDatabaseResponse

func (*ClientWithResponses) RenameDatabaseWithResponse

func (c *ClientWithResponses) RenameDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body RenameDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*RenameDatabaseResponse, error)

func (*ClientWithResponses) ResumeDatabaseWithResponse

func (c *ClientWithResponses) ResumeDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*ResumeDatabaseResponse, error)

ResumeDatabaseWithResponse request returning *ResumeDatabaseResponse

func (*ClientWithResponses) RevokeShareWithResponse added in v0.10.0

func (c *ClientWithResponses) RevokeShareWithResponse(ctx context.Context, spaceId SpaceId, shareToken string, reqEditors ...RequestEditorFn) (*RevokeShareResponse, error)

RevokeShareWithResponse request returning *RevokeShareResponse

func (*ClientWithResponses) SetPaymentMethodPrimaryWithResponse

func (c *ClientWithResponses) SetPaymentMethodPrimaryWithResponse(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*SetPaymentMethodPrimaryResponse, error)

SetPaymentMethodPrimaryWithResponse request returning *SetPaymentMethodPrimaryResponse

func (*ClientWithResponses) ShareDatabaseWithBodyWithResponse added in v0.10.0

func (c *ClientWithResponses) ShareDatabaseWithBodyWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ShareDatabaseResponse, error)

ShareDatabaseWithBodyWithResponse request with arbitrary body returning *ShareDatabaseResponse

func (*ClientWithResponses) ShareDatabaseWithResponse added in v0.10.0

func (c *ClientWithResponses) ShareDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body ShareDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*ShareDatabaseResponse, error)

func (*ClientWithResponses) SpaceStatusWithResponse

func (c *ClientWithResponses) SpaceStatusWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*SpaceStatusResponse, error)

SpaceStatusWithResponse request returning *SpaceStatusResponse

func (*ClientWithResponses) SpaceUsageWithResponse added in v0.15.1

func (c *ClientWithResponses) SpaceUsageWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*SpaceUsageResponse, error)

SpaceUsageWithResponse request returning *SpaceUsageResponse

func (*ClientWithResponses) SubmitFeedbackWithBodyWithResponse

func (c *ClientWithResponses) SubmitFeedbackWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SubmitFeedbackResponse, error)

SubmitFeedbackWithBodyWithResponse request with arbitrary body returning *SubmitFeedbackResponse

func (*ClientWithResponses) SubmitFeedbackWithResponse

func (c *ClientWithResponses) SubmitFeedbackWithResponse(ctx context.Context, body SubmitFeedbackJSONRequestBody, reqEditors ...RequestEditorFn) (*SubmitFeedbackResponse, error)

func (*ClientWithResponses) UpdateOveragesWithBodyWithResponse added in v0.17.0

func (c *ClientWithResponses) UpdateOveragesWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOveragesResponse, error)

UpdateOveragesWithBodyWithResponse request with arbitrary body returning *UpdateOveragesResponse

func (*ClientWithResponses) UpdateOveragesWithResponse added in v0.17.0

func (c *ClientWithResponses) UpdateOveragesWithResponse(ctx context.Context, spaceId SpaceId, body UpdateOveragesJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOveragesResponse, error)

func (*ClientWithResponses) UpdatePasswordWithBodyWithResponse

func (c *ClientWithResponses) UpdatePasswordWithBodyWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePasswordResponse, error)

UpdatePasswordWithBodyWithResponse request with arbitrary body returning *UpdatePasswordResponse

func (*ClientWithResponses) UpdatePasswordWithResponse

func (c *ClientWithResponses) UpdatePasswordWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body UpdatePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePasswordResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// AnalyticsIdentifyWithBodyWithResponse request with any body
	AnalyticsIdentifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnalyticsIdentifyResponse, error)

	AnalyticsIdentifyWithResponse(ctx context.Context, body AnalyticsIdentifyJSONRequestBody, reqEditors ...RequestEditorFn) (*AnalyticsIdentifyResponse, error)

	// AnalyticsTrackWithBodyWithResponse request with any body
	AnalyticsTrackWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnalyticsTrackResponse, error)

	AnalyticsTrackWithResponse(ctx context.Context, body AnalyticsTrackJSONRequestBody, reqEditors ...RequestEditorFn) (*AnalyticsTrackResponse, error)

	// AuthInfoWithResponse request
	AuthInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AuthInfoResponse, error)

	// LogoutWithBodyWithResponse request with any body
	LogoutWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LogoutResponse, error)

	LogoutWithResponse(ctx context.Context, body LogoutJSONRequestBody, reqEditors ...RequestEditorFn) (*LogoutResponse, error)

	// SubmitFeedbackWithBodyWithResponse request with any body
	SubmitFeedbackWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SubmitFeedbackResponse, error)

	SubmitFeedbackWithResponse(ctx context.Context, body SubmitFeedbackJSONRequestBody, reqEditors ...RequestEditorFn) (*SubmitFeedbackResponse, error)

	// HealthWithResponse request
	HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error)

	// GetPricingWithResponse request
	GetPricingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPricingResponse, error)

	// ListSpacesWithResponse request
	ListSpacesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListSpacesResponse, error)

	// CreateSpaceWithBodyWithResponse request with any body
	CreateSpaceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpaceResponse, error)

	CreateSpaceWithResponse(ctx context.Context, body CreateSpaceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpaceResponse, error)

	// ListApiKeysWithResponse request
	ListApiKeysWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ListApiKeysResponse, error)

	// CreateApiKeyWithBodyWithResponse request with any body
	CreateApiKeyWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)

	CreateApiKeyWithResponse(ctx context.Context, spaceId SpaceId, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)

	// DeleteApiKeyWithResponse request
	DeleteApiKeyWithResponse(ctx context.Context, spaceId SpaceId, prefix ApiKeyPrefix, reqEditors ...RequestEditorFn) (*DeleteApiKeyResponse, error)

	// ListDatabasesWithResponse request
	ListDatabasesWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ListDatabasesResponse, error)

	// CreateDatabaseWithBodyWithResponse request with any body
	CreateDatabaseWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseResponse, error)

	CreateDatabaseWithResponse(ctx context.Context, spaceId SpaceId, body CreateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseResponse, error)

	// DeleteDatabaseWithResponse request
	DeleteDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*DeleteDatabaseResponse, error)

	// GetDatabaseWithResponse request
	GetDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*GetDatabaseResponse, error)

	// ForkDatabaseWithBodyWithResponse request with any body
	ForkDatabaseWithBodyWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ForkDatabaseResponse, error)

	ForkDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body ForkDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*ForkDatabaseResponse, error)

	// DatabaseLogsWithResponse request
	DatabaseLogsWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, params *DatabaseLogsParams, reqEditors ...RequestEditorFn) (*DatabaseLogsResponse, error)

	// UpdatePasswordWithBodyWithResponse request with any body
	UpdatePasswordWithBodyWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePasswordResponse, error)

	UpdatePasswordWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body UpdatePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePasswordResponse, error)

	// PauseDatabaseWithResponse request
	PauseDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*PauseDatabaseResponse, error)

	// RenameDatabaseWithBodyWithResponse request with any body
	RenameDatabaseWithBodyWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenameDatabaseResponse, error)

	RenameDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body RenameDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*RenameDatabaseResponse, error)

	// ResumeDatabaseWithResponse request
	ResumeDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*ResumeDatabaseResponse, error)

	// ShareDatabaseWithBodyWithResponse request with any body
	ShareDatabaseWithBodyWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ShareDatabaseResponse, error)

	ShareDatabaseWithResponse(ctx context.Context, spaceId SpaceId, databaseRef DatabaseRef, body ShareDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*ShareDatabaseResponse, error)

	// ListInvoicesWithResponse request
	ListInvoicesWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ListInvoicesResponse, error)

	// GetInvoiceWithResponse request
	GetInvoiceWithResponse(ctx context.Context, spaceId SpaceId, invoiceId string, reqEditors ...RequestEditorFn) (*GetInvoiceResponse, error)

	// UpdateOveragesWithBodyWithResponse request with any body
	UpdateOveragesWithBodyWithResponse(ctx context.Context, spaceId SpaceId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOveragesResponse, error)

	UpdateOveragesWithResponse(ctx context.Context, spaceId SpaceId, body UpdateOveragesJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOveragesResponse, error)

	// ListPaymentMethodsWithResponse request
	ListPaymentMethodsWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ListPaymentMethodsResponse, error)

	// CreatePaymentMethodSetupWithResponse request
	CreatePaymentMethodSetupWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*CreatePaymentMethodSetupResponse, error)

	// DeletePaymentMethodWithResponse request
	DeletePaymentMethodWithResponse(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*DeletePaymentMethodResponse, error)

	// GetPaymentMethodWithResponse request
	GetPaymentMethodWithResponse(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*GetPaymentMethodResponse, error)

	// CancelPaymentMethodDeletionWithResponse request
	CancelPaymentMethodDeletionWithResponse(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*CancelPaymentMethodDeletionResponse, error)

	// SetPaymentMethodPrimaryWithResponse request
	SetPaymentMethodPrimaryWithResponse(ctx context.Context, spaceId SpaceId, paymentId PaymentId, reqEditors ...RequestEditorFn) (*SetPaymentMethodPrimaryResponse, error)

	// ListSharesWithResponse request
	ListSharesWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*ListSharesResponse, error)

	// RevokeShareWithResponse request
	RevokeShareWithResponse(ctx context.Context, spaceId SpaceId, shareToken string, reqEditors ...RequestEditorFn) (*RevokeShareResponse, error)

	// SpaceStatusWithResponse request
	SpaceStatusWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*SpaceStatusResponse, error)

	// SpaceUsageWithResponse request
	SpaceUsageWithResponse(ctx context.Context, spaceId SpaceId, reqEditors ...RequestEditorFn) (*SpaceUsageResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type ComputePrice added in v0.13.0

type ComputePrice struct {
	// MemoryGib Memory allocation in GiB.
	MemoryGib int `json:"memory_gib"`

	// MilliCpu CPU allocation in millicores (1000 = 1 vCPU).
	MilliCpu int `json:"milli_cpu"`

	// PricePerHour Price per hour while the database is running.
	PricePerHour float64 `json:"price_per_hour"`

	// PricePerMonth Price per month while the database is running.
	PricePerMonth float64 `json:"price_per_month"`

	// Size Compute size for dedicated databases. Each step up allocates proportionally more vCPU and RAM.
	Size DatabaseSize `json:"size"`
}

ComputePrice Compute price for one size.

type CreateApiKeyJSONRequestBody

type CreateApiKeyJSONRequestBody = CreateApiKeyRequest

CreateApiKeyJSONRequestBody defines body for CreateApiKey for application/json ContentType.

type CreateApiKeyRequest

type CreateApiKeyRequest struct {
	// Name User-provided label for the new API key.
	Name string `json:"name"`
}

CreateApiKeyRequest defines model for CreateApiKeyRequest.

type CreateApiKeyResponse

type CreateApiKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *ApiKeyCredentials
	JSONDefault  *Error
}

func ParseCreateApiKeyResponse

func ParseCreateApiKeyResponse(rsp *http.Response) (*CreateApiKeyResponse, error)

ParseCreateApiKeyResponse parses an HTTP response from a CreateApiKeyWithResponse call

func (CreateApiKeyResponse) Status

func (r CreateApiKeyResponse) Status() string

Status returns HTTPResponse.Status

func (CreateApiKeyResponse) StatusCode

func (r CreateApiKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateDatabaseJSONRequestBody

type CreateDatabaseJSONRequestBody = CreateDatabaseRequest

CreateDatabaseJSONRequestBody defines body for CreateDatabase for application/json ContentType.

type CreateDatabaseRequest

type CreateDatabaseRequest struct {
	// Name Name for the new database. Auto-generated if omitted.
	Name *string `json:"name,omitempty"`

	// ShareToken Share token from a database share (begins with `gs_`). When provided, creates the new database from the shared snapshot.
	ShareToken *string `json:"share_token,omitempty"`

	// Size Compute size for dedicated databases. Each step up allocates proportionally more vCPU and RAM.
	Size *DatabaseSize `json:"size,omitempty"`

	// Type Database deployment model.
	// - `standard` — shared-resource databases subject to the space's compute and storage limits.
	// - `dedicated` — per-instance paid databases with guaranteed resources, exempt from space-level auto-pause.
	Type *DatabaseType `json:"type,omitempty"`
}

CreateDatabaseRequest defines model for CreateDatabaseRequest.

type CreateDatabaseResponse

type CreateDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Database
	JSONDefault  *Error
}

func ParseCreateDatabaseResponse

func ParseCreateDatabaseResponse(rsp *http.Response) (*CreateDatabaseResponse, error)

ParseCreateDatabaseResponse parses an HTTP response from a CreateDatabaseWithResponse call

func (CreateDatabaseResponse) Status

func (r CreateDatabaseResponse) Status() string

Status returns HTTPResponse.Status

func (CreateDatabaseResponse) StatusCode

func (r CreateDatabaseResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreatePaymentMethodSetupResponse

type CreatePaymentMethodSetupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaymentSetupResponse
	JSONDefault  *Error
}

func ParseCreatePaymentMethodSetupResponse

func ParseCreatePaymentMethodSetupResponse(rsp *http.Response) (*CreatePaymentMethodSetupResponse, error)

ParseCreatePaymentMethodSetupResponse parses an HTTP response from a CreatePaymentMethodSetupWithResponse call

func (CreatePaymentMethodSetupResponse) Status

Status returns HTTPResponse.Status

func (CreatePaymentMethodSetupResponse) StatusCode

func (r CreatePaymentMethodSetupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateSpaceJSONRequestBody

type CreateSpaceJSONRequestBody = CreateSpaceRequest

CreateSpaceJSONRequestBody defines body for CreateSpace for application/json ContentType.

type CreateSpaceRequest

type CreateSpaceRequest struct {
	// Name Name for the new space.
	Name string `json:"name"`
}

CreateSpaceRequest defines model for CreateSpaceRequest.

type CreateSpaceResponse

type CreateSpaceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Space
	JSONDefault  *Error
}

func ParseCreateSpaceResponse

func ParseCreateSpaceResponse(rsp *http.Response) (*CreateSpaceResponse, error)

ParseCreateSpaceResponse parses an HTTP response from a CreateSpaceWithResponse call

func (CreateSpaceResponse) Status

func (r CreateSpaceResponse) Status() string

Status returns HTTPResponse.Status

func (CreateSpaceResponse) StatusCode

func (r CreateSpaceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Database

type Database struct {
	// Host PostgreSQL hostname for connections.
	Host string `json:"host"`

	// Id Database ID.
	Id string `json:"id"`

	// Name Database name. Unique within the space.
	Name string `json:"name"`

	// Password PostgreSQL password for the default user. Returned on every GET for authorized callers.
	Password *string `json:"password"`

	// Port PostgreSQL port for connections.
	Port int `json:"port"`

	// Size Compute size for dedicated databases. Each step up allocates proportionally more vCPU and RAM.
	Size *DatabaseSize `json:"size,omitempty"`

	// Status Current lifecycle status of the database.
	Status DatabaseStatus `json:"status"`

	// StorageMib Current disk usage in MiB. Null if not yet available.
	StorageMib *int `json:"storage_mib"`

	// Type Database deployment model.
	// - `standard` — shared-resource databases subject to the space's compute and storage limits.
	// - `dedicated` — per-instance paid databases with guaranteed resources, exempt from space-level auto-pause.
	Type DatabaseType `json:"type"`
}

Database A Ghost database.

type DatabaseLogsParams

type DatabaseLogsParams struct {
	// Page Zero-indexed page number for backward pagination. Page 0 returns the most recent logs; each successive page fetches older entries.
	Page *int `form:"page,omitempty" json:"page,omitempty"`

	// Until Return logs at or before this timestamp. Defaults to now.
	Until *time.Time `form:"until,omitempty" json:"until,omitempty"`
}

DatabaseLogsParams defines parameters for DatabaseLogs.

type DatabaseLogsResponse

type DatabaseLogsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LogsResponse
	JSONDefault  *Error
}

func ParseDatabaseLogsResponse

func ParseDatabaseLogsResponse(rsp *http.Response) (*DatabaseLogsResponse, error)

ParseDatabaseLogsResponse parses an HTTP response from a DatabaseLogsWithResponse call

func (DatabaseLogsResponse) Status

func (r DatabaseLogsResponse) Status() string

Status returns HTTPResponse.Status

func (DatabaseLogsResponse) StatusCode

func (r DatabaseLogsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DatabaseRef

type DatabaseRef = string

DatabaseRef defines model for DatabaseRef.

type DatabaseShare added in v0.10.0

type DatabaseShare struct {
	// CreatedAt Time the share was created.
	CreatedAt time.Time `json:"created_at"`

	// DatabaseId ID of the source database.
	DatabaseId string `json:"database_id"`

	// DatabaseName Name of the source database.
	DatabaseName string `json:"database_name"`

	// ExpiresAt Time the share expires. Absent if the share does not expire.
	ExpiresAt *time.Time `json:"expires_at,omitempty"`

	// RevokedAt Time the share was revoked. Absent if the share is still active.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`

	// ShareToken Token passed to `createDatabase` (via `share_token`) to create a new database from the shared snapshot in another space. Also used to revoke the share via `revokeShare`. Always begins with `gs_`.
	ShareToken string `json:"share_token"`
}

DatabaseShare A shareable snapshot of a database. Can be used to create a new database from the snapshot in another space.

type DatabaseSize

type DatabaseSize string

DatabaseSize Compute size for dedicated databases. Each step up allocates proportionally more vCPU and RAM.

const (
	DatabaseSizeN1x DatabaseSize = "1x"
	DatabaseSizeN2x DatabaseSize = "2x"
	DatabaseSizeN4x DatabaseSize = "4x"
	DatabaseSizeN8x DatabaseSize = "8x"
)

Defines values for DatabaseSize.

type DatabaseStatus

type DatabaseStatus string

DatabaseStatus Current lifecycle status of the database.

const (
	DatabaseStatusConfiguring DatabaseStatus = "configuring"
	DatabaseStatusDeleted     DatabaseStatus = "deleted"
	DatabaseStatusDeleting    DatabaseStatus = "deleting"
	DatabaseStatusPaused      DatabaseStatus = "paused"
	DatabaseStatusPausing     DatabaseStatus = "pausing"
	DatabaseStatusQueued      DatabaseStatus = "queued"
	DatabaseStatusResuming    DatabaseStatus = "resuming"
	DatabaseStatusRunning     DatabaseStatus = "running"
	DatabaseStatusUnknown     DatabaseStatus = "unknown"
	DatabaseStatusUnstable    DatabaseStatus = "unstable"
	DatabaseStatusUpgrading   DatabaseStatus = "upgrading"
)

Defines values for DatabaseStatus.

type DatabaseType

type DatabaseType string

DatabaseType Database deployment model. - `standard` — shared-resource databases subject to the space's compute and storage limits. - `dedicated` — per-instance paid databases with guaranteed resources, exempt from space-level auto-pause.

const (
	DatabaseTypeDedicated DatabaseType = "dedicated"
	DatabaseTypeStandard  DatabaseType = "standard"
)

Defines values for DatabaseType.

type DatabaseWithUsage added in v0.12.0

type DatabaseWithUsage struct {
	// ComputeMinutes Compute minutes used by this database during the current billing cycle. Only populated for `standard` databases.
	ComputeMinutes *int64 `json:"compute_minutes"`

	// Host PostgreSQL hostname for connections.
	Host string `json:"host"`

	// Id Database ID.
	Id string `json:"id"`

	// Name Database name. Unique within the space.
	Name string `json:"name"`

	// Password PostgreSQL password for the default user. Returned on every GET for authorized callers.
	Password *string `json:"password"`

	// Port PostgreSQL port for connections.
	Port int `json:"port"`

	// Size Compute size for dedicated databases. Each step up allocates proportionally more vCPU and RAM.
	Size *DatabaseSize `json:"size,omitempty"`

	// Status Current lifecycle status of the database.
	Status DatabaseStatus `json:"status"`

	// StorageMib Current disk usage in MiB. Null if not yet available.
	StorageMib *int `json:"storage_mib"`

	// Type Database deployment model.
	// - `standard` — shared-resource databases subject to the space's compute and storage limits.
	// - `dedicated` — per-instance paid databases with guaranteed resources, exempt from space-level auto-pause.
	Type DatabaseType `json:"type"`
}

DatabaseWithUsage defines model for DatabaseWithUsage.

type DedicatedPricing added in v0.13.0

type DedicatedPricing struct {
	// Compute Per-size compute pricing, ordered smallest to largest.
	Compute []ComputePrice `json:"compute"`

	// Storage Storage pricing.
	Storage StoragePrice `json:"storage"`
}

DedicatedPricing Pricing for dedicated databases.

type DeleteApiKeyResponse

type DeleteApiKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseDeleteApiKeyResponse

func ParseDeleteApiKeyResponse(rsp *http.Response) (*DeleteApiKeyResponse, error)

ParseDeleteApiKeyResponse parses an HTTP response from a DeleteApiKeyWithResponse call

func (DeleteApiKeyResponse) Status

func (r DeleteApiKeyResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteApiKeyResponse) StatusCode

func (r DeleteApiKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteDatabaseResponse

type DeleteDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Database
	JSONDefault  *Error
}

func ParseDeleteDatabaseResponse

func ParseDeleteDatabaseResponse(rsp *http.Response) (*DeleteDatabaseResponse, error)

ParseDeleteDatabaseResponse parses an HTTP response from a DeleteDatabaseWithResponse call

func (DeleteDatabaseResponse) Status

func (r DeleteDatabaseResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteDatabaseResponse) StatusCode

func (r DeleteDatabaseResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeletePaymentMethodResponse

type DeletePaymentMethodResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseDeletePaymentMethodResponse

func ParseDeletePaymentMethodResponse(rsp *http.Response) (*DeletePaymentMethodResponse, error)

ParseDeletePaymentMethodResponse parses an HTTP response from a DeletePaymentMethodWithResponse call

func (DeletePaymentMethodResponse) Status

Status returns HTTPResponse.Status

func (DeletePaymentMethodResponse) StatusCode

func (r DeletePaymentMethodResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Error

type Error struct {
	// Message Human-readable error message.
	Message string `json:"message"`
}

Error Standard error response.

func (*Error) Error

func (e *Error) Error() string

Error implements the error interface for the Error type. This allows Error values to be used directly as Go errors.

type FeedbackRequest

type FeedbackRequest struct {
	// Message Feedback message from the user.
	Message string `json:"message"`

	// Os Operating system of the client submitting the feedback.
	Os string `json:"os"`

	// Source Source of the feedback request (e.g. `cli`, `mcp`).
	Source string `json:"source"`

	// Version Version of the client submitting the feedback.
	Version string `json:"version"`
}

FeedbackRequest User-submitted feedback or bug report.

type ForkDatabaseJSONRequestBody

type ForkDatabaseJSONRequestBody = ForkDatabaseRequest

ForkDatabaseJSONRequestBody defines body for ForkDatabase for application/json ContentType.

type ForkDatabaseRequest

type ForkDatabaseRequest struct {
	// Name Name for the forked database. Auto-generated from the source name if omitted.
	Name *string `json:"name,omitempty"`

	// Size Compute size for dedicated databases. Each step up allocates proportionally more vCPU and RAM.
	Size *DatabaseSize `json:"size,omitempty"`

	// Type Database deployment model.
	// - `standard` — shared-resource databases subject to the space's compute and storage limits.
	// - `dedicated` — per-instance paid databases with guaranteed resources, exempt from space-level auto-pause.
	Type *DatabaseType `json:"type,omitempty"`
}

ForkDatabaseRequest Request body for forking a database. Fields default to the source database's values when omitted.

type ForkDatabaseResponse

type ForkDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Database
	JSONDefault  *Error
}

func ParseForkDatabaseResponse

func ParseForkDatabaseResponse(rsp *http.Response) (*ForkDatabaseResponse, error)

ParseForkDatabaseResponse parses an HTTP response from a ForkDatabaseWithResponse call

func (ForkDatabaseResponse) Status

func (r ForkDatabaseResponse) Status() string

Status returns HTTPResponse.Status

func (ForkDatabaseResponse) StatusCode

func (r ForkDatabaseResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetDatabaseResponse

type GetDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Database
	JSONDefault  *Error
}

func ParseGetDatabaseResponse

func ParseGetDatabaseResponse(rsp *http.Response) (*GetDatabaseResponse, error)

ParseGetDatabaseResponse parses an HTTP response from a GetDatabaseWithResponse call

func (GetDatabaseResponse) Status

func (r GetDatabaseResponse) Status() string

Status returns HTTPResponse.Status

func (GetDatabaseResponse) StatusCode

func (r GetDatabaseResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInvoiceResponse added in v0.10.0

type GetInvoiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InvoiceDetail
	JSONDefault  *Error
}

func ParseGetInvoiceResponse added in v0.10.0

func ParseGetInvoiceResponse(rsp *http.Response) (*GetInvoiceResponse, error)

ParseGetInvoiceResponse parses an HTTP response from a GetInvoiceWithResponse call

func (GetInvoiceResponse) Status added in v0.10.0

func (r GetInvoiceResponse) Status() string

Status returns HTTPResponse.Status

func (GetInvoiceResponse) StatusCode added in v0.10.0

func (r GetInvoiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPaymentMethodResponse

type GetPaymentMethodResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaymentMethod
	JSONDefault  *Error
}

func ParseGetPaymentMethodResponse

func ParseGetPaymentMethodResponse(rsp *http.Response) (*GetPaymentMethodResponse, error)

ParseGetPaymentMethodResponse parses an HTTP response from a GetPaymentMethodWithResponse call

func (GetPaymentMethodResponse) Status

func (r GetPaymentMethodResponse) Status() string

Status returns HTTPResponse.Status

func (GetPaymentMethodResponse) StatusCode

func (r GetPaymentMethodResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPricingResponse added in v0.13.0

type GetPricingResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Pricing
	JSONDefault  *Error
}

func ParseGetPricingResponse added in v0.13.0

func ParseGetPricingResponse(rsp *http.Response) (*GetPricingResponse, error)

ParseGetPricingResponse parses an HTTP response from a GetPricingWithResponse call

func (GetPricingResponse) Status added in v0.13.0

func (r GetPricingResponse) Status() string

Status returns HTTPResponse.Status

func (GetPricingResponse) StatusCode added in v0.13.0

func (r GetPricingResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HealthResponse

type HealthResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseHealthResponse

func ParseHealthResponse(rsp *http.Response) (*HealthResponse, error)

ParseHealthResponse parses an HTTP response from a HealthWithResponse call

func (HealthResponse) Status

func (r HealthResponse) Status() string

Status returns HTTPResponse.Status

func (HealthResponse) StatusCode

func (r HealthResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IdentifyRequest

type IdentifyRequest struct {
	// Properties Free-form user properties.
	Properties map[string]interface{} `json:"properties"`
}

IdentifyRequest User properties to associate with the authenticated user in analytics.

type Invoice added in v0.10.0

type Invoice struct {
	// Id Opaque invoice ID used to look up invoice details.
	Id string `json:"id"`

	// InvoiceDate Date the invoice was issued.
	InvoiceDate time.Time `json:"invoice_date"`

	// InvoiceNumber Human-readable invoice number (e.g. "INV-12345").
	InvoiceNumber string `json:"invoice_number"`

	// Status Invoice status:
	// - `paid` — invoice has been paid.
	// - `issued` — invoice has been issued and is within its net-terms payment window (not yet paid, not yet delinquent).
	// - `delinquent` — payment has failed and the invoice needs to be resolved by the user.
	Status InvoiceStatus `json:"status"`

	// Total Invoice total.
	Total float64 `json:"total"`
}

Invoice Invoice summary.

type InvoiceDetail added in v0.10.0

type InvoiceDetail struct {
	// LineItems Line items that make up the invoice.
	LineItems []InvoiceLineItem `json:"line_items"`
}

InvoiceDetail Line-item breakdown of an invoice.

type InvoiceLineItem added in v0.10.0

type InvoiceLineItem struct {
	// DatabaseId Ghost database ID this line item is attributed to, if any.
	DatabaseId *string `json:"database_id,omitempty"`

	// DetailedSpec Additional spec details (e.g. tier, size).
	DetailedSpec *string `json:"detailed_spec,omitempty"`

	// LineTotal Total charge for this line (`quantity` × `unit_price`).
	LineTotal float64 `json:"line_total"`

	// ProductType Product category (e.g. storage, compute).
	ProductType string `json:"product_type"`

	// Quantity Quantity billed. Units depend on `product_type`.
	Quantity float64 `json:"quantity"`

	// UnitPrice Price per unit of `quantity`.
	UnitPrice float64 `json:"unit_price"`
}

InvoiceLineItem defines model for InvoiceLineItem.

type InvoiceStatus added in v0.10.0

type InvoiceStatus string

InvoiceStatus Invoice status: - `paid` — invoice has been paid. - `issued` — invoice has been issued and is within its net-terms payment window (not yet paid, not yet delinquent). - `delinquent` — payment has failed and the invoice needs to be resolved by the user.

const (
	InvoiceStatusDelinquent InvoiceStatus = "delinquent"
	InvoiceStatusIssued     InvoiceStatus = "issued"
	InvoiceStatusPaid       InvoiceStatus = "paid"
)

Defines values for InvoiceStatus.

type InvoicesResponse added in v0.10.0

type InvoicesResponse struct {
	// Invoices Recent invoices, most recent first.
	Invoices []Invoice `json:"invoices"`
}

InvoicesResponse defines model for InvoicesResponse.

type ListApiKeysResponse

type ListApiKeysResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]ApiKey
	JSONDefault  *Error
}

func ParseListApiKeysResponse

func ParseListApiKeysResponse(rsp *http.Response) (*ListApiKeysResponse, error)

ParseListApiKeysResponse parses an HTTP response from a ListApiKeysWithResponse call

func (ListApiKeysResponse) Status

func (r ListApiKeysResponse) Status() string

Status returns HTTPResponse.Status

func (ListApiKeysResponse) StatusCode

func (r ListApiKeysResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListDatabasesResponse

type ListDatabasesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]DatabaseWithUsage
	JSONDefault  *Error
}

func ParseListDatabasesResponse

func ParseListDatabasesResponse(rsp *http.Response) (*ListDatabasesResponse, error)

ParseListDatabasesResponse parses an HTTP response from a ListDatabasesWithResponse call

func (ListDatabasesResponse) Status

func (r ListDatabasesResponse) Status() string

Status returns HTTPResponse.Status

func (ListDatabasesResponse) StatusCode

func (r ListDatabasesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListInvoicesResponse added in v0.10.0

type ListInvoicesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InvoicesResponse
	JSONDefault  *Error
}

func ParseListInvoicesResponse added in v0.10.0

func ParseListInvoicesResponse(rsp *http.Response) (*ListInvoicesResponse, error)

ParseListInvoicesResponse parses an HTTP response from a ListInvoicesWithResponse call

func (ListInvoicesResponse) Status added in v0.10.0

func (r ListInvoicesResponse) Status() string

Status returns HTTPResponse.Status

func (ListInvoicesResponse) StatusCode added in v0.10.0

func (r ListInvoicesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListPaymentMethodsResponse

type ListPaymentMethodsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PaymentMethodsResponse
	JSONDefault  *Error
}

func ParseListPaymentMethodsResponse

func ParseListPaymentMethodsResponse(rsp *http.Response) (*ListPaymentMethodsResponse, error)

ParseListPaymentMethodsResponse parses an HTTP response from a ListPaymentMethodsWithResponse call

func (ListPaymentMethodsResponse) Status

Status returns HTTPResponse.Status

func (ListPaymentMethodsResponse) StatusCode

func (r ListPaymentMethodsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListSharesResponse added in v0.10.0

type ListSharesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]DatabaseShare
	JSONDefault  *Error
}

func ParseListSharesResponse added in v0.10.0

func ParseListSharesResponse(rsp *http.Response) (*ListSharesResponse, error)

ParseListSharesResponse parses an HTTP response from a ListSharesWithResponse call

func (ListSharesResponse) Status added in v0.10.0

func (r ListSharesResponse) Status() string

Status returns HTTPResponse.Status

func (ListSharesResponse) StatusCode added in v0.10.0

func (r ListSharesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListSpacesResponse

type ListSpacesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Space
	JSONDefault  *Error
}

func ParseListSpacesResponse

func ParseListSpacesResponse(rsp *http.Response) (*ListSpacesResponse, error)

ParseListSpacesResponse parses an HTTP response from a ListSpacesWithResponse call

func (ListSpacesResponse) Status

func (r ListSpacesResponse) Status() string

Status returns HTTPResponse.Status

func (ListSpacesResponse) StatusCode

func (r ListSpacesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LogoutJSONRequestBody

type LogoutJSONRequestBody = LogoutRequest

LogoutJSONRequestBody defines body for Logout for application/json ContentType.

type LogoutRequest

type LogoutRequest struct {
	// RefreshToken Refresh token to revoke.
	RefreshToken string `json:"refreshToken"`
}

LogoutRequest defines model for LogoutRequest.

type LogoutResponse

type LogoutResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseLogoutResponse

func ParseLogoutResponse(rsp *http.Response) (*LogoutResponse, error)

ParseLogoutResponse parses an HTTP response from a LogoutWithResponse call

func (LogoutResponse) Status

func (r LogoutResponse) Status() string

Status returns HTTPResponse.Status

func (LogoutResponse) StatusCode

func (r LogoutResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LogsResponse

type LogsResponse struct {
	// Logs Log lines, most recent first.
	Logs []string `json:"logs"`
}

LogsResponse defines model for LogsResponse.

type PauseDatabaseResponse

type PauseDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Database
	JSONDefault  *Error
}

func ParsePauseDatabaseResponse

func ParsePauseDatabaseResponse(rsp *http.Response) (*PauseDatabaseResponse, error)

ParsePauseDatabaseResponse parses an HTTP response from a PauseDatabaseWithResponse call

func (PauseDatabaseResponse) Status

func (r PauseDatabaseResponse) Status() string

Status returns HTTPResponse.Status

func (PauseDatabaseResponse) StatusCode

func (r PauseDatabaseResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PaymentId

type PaymentId = string

PaymentId defines model for PaymentId.

type PaymentMethod

type PaymentMethod struct {
	// Brand Card brand (e.g. `visa`, `mastercard`).
	Brand string `json:"brand"`

	// ExpMonth Card expiration month (1-12).
	ExpMonth int `json:"exp_month"`

	// ExpYear Card expiration year (four digits).
	ExpYear int `json:"exp_year"`

	// Id Payment method ID.
	Id string `json:"id"`

	// Last4 Last four digits of the card number.
	Last4 string `json:"last4"`

	// PendingDeletion True if deletion has been scheduled for this payment method. The deletion can be cancelled until processed.
	PendingDeletion bool `json:"pending_deletion"`

	// Primary True if this is the primary payment method for the space.
	Primary bool `json:"primary"`
}

PaymentMethod A payment method on file for a space.

type PaymentMethodsResponse

type PaymentMethodsResponse struct {
	// PaymentMethods Payment methods on file for the space.
	PaymentMethods []PaymentMethod `json:"payment_methods"`
}

PaymentMethodsResponse defines model for PaymentMethodsResponse.

type PaymentSetupResponse

type PaymentSetupResponse struct {
	// ClientSecret Stripe Setup Intent client secret.
	ClientSecret string `json:"client_secret"`

	// PaymentUrl URL of the hosted payment page for collecting card details.
	PaymentUrl string `json:"payment_url"`
}

PaymentSetupResponse Stripe Setup Intent details for collecting a new payment method.

type Pricing added in v0.13.0

type Pricing struct {
	// Dedicated Pricing for dedicated databases.
	Dedicated DedicatedPricing `json:"dedicated"`

	// Standard Pricing for standard (non-dedicated) databases, which share a
	// space-wide compute allowance.
	Standard StandardPricing `json:"standard"`
}

Pricing Pricing data grouped by category.

type RenameDatabaseJSONRequestBody

type RenameDatabaseJSONRequestBody = RenameDatabaseRequest

RenameDatabaseJSONRequestBody defines body for RenameDatabase for application/json ContentType.

type RenameDatabaseRequest

type RenameDatabaseRequest struct {
	// Name New name for the database.
	Name string `json:"name"`
}

RenameDatabaseRequest defines model for RenameDatabaseRequest.

type RenameDatabaseResponse

type RenameDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseRenameDatabaseResponse

func ParseRenameDatabaseResponse(rsp *http.Response) (*RenameDatabaseResponse, error)

ParseRenameDatabaseResponse parses an HTTP response from a RenameDatabaseWithResponse call

func (RenameDatabaseResponse) Status

func (r RenameDatabaseResponse) Status() string

Status returns HTTPResponse.Status

func (RenameDatabaseResponse) StatusCode

func (r RenameDatabaseResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ResumeDatabaseResponse

type ResumeDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *Database
	JSONDefault  *Error
}

func ParseResumeDatabaseResponse

func ParseResumeDatabaseResponse(rsp *http.Response) (*ResumeDatabaseResponse, error)

ParseResumeDatabaseResponse parses an HTTP response from a ResumeDatabaseWithResponse call

func (ResumeDatabaseResponse) Status

func (r ResumeDatabaseResponse) Status() string

Status returns HTTPResponse.Status

func (ResumeDatabaseResponse) StatusCode

func (r ResumeDatabaseResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RevokeShareResponse added in v0.10.0

type RevokeShareResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DatabaseShare
	JSONDefault  *Error
}

func ParseRevokeShareResponse added in v0.10.0

func ParseRevokeShareResponse(rsp *http.Response) (*RevokeShareResponse, error)

ParseRevokeShareResponse parses an HTTP response from a RevokeShareWithResponse call

func (RevokeShareResponse) Status added in v0.10.0

func (r RevokeShareResponse) Status() string

Status returns HTTPResponse.Status

func (RevokeShareResponse) StatusCode added in v0.10.0

func (r RevokeShareResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SetPaymentMethodPrimaryResponse

type SetPaymentMethodPrimaryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseSetPaymentMethodPrimaryResponse

func ParseSetPaymentMethodPrimaryResponse(rsp *http.Response) (*SetPaymentMethodPrimaryResponse, error)

ParseSetPaymentMethodPrimaryResponse parses an HTTP response from a SetPaymentMethodPrimaryWithResponse call

func (SetPaymentMethodPrimaryResponse) Status

Status returns HTTPResponse.Status

func (SetPaymentMethodPrimaryResponse) StatusCode

func (r SetPaymentMethodPrimaryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ShareDatabaseJSONRequestBody added in v0.10.0

type ShareDatabaseJSONRequestBody = ShareDatabaseRequest

ShareDatabaseJSONRequestBody defines body for ShareDatabase for application/json ContentType.

type ShareDatabaseRequest added in v0.10.0

type ShareDatabaseRequest struct {
	// ExpiresAt Time after which the share expires. If omitted, the share does not expire.
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
}

ShareDatabaseRequest Options for creating a database share.

type ShareDatabaseResponse added in v0.10.0

type ShareDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *DatabaseShare
	JSONDefault  *Error
}

func ParseShareDatabaseResponse added in v0.10.0

func ParseShareDatabaseResponse(rsp *http.Response) (*ShareDatabaseResponse, error)

ParseShareDatabaseResponse parses an HTTP response from a ShareDatabaseWithResponse call

func (ShareDatabaseResponse) Status added in v0.10.0

func (r ShareDatabaseResponse) Status() string

Status returns HTTPResponse.Status

func (ShareDatabaseResponse) StatusCode added in v0.10.0

func (r ShareDatabaseResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Space

type Space struct {
	// Id Space ID.
	Id string `json:"id"`

	// Name Space name.
	Name string `json:"name"`
}

Space A Ghost space.

type SpaceId

type SpaceId = string

SpaceId defines model for SpaceId.

type SpaceStatusResponse

type SpaceStatusResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SpaceUsage
	JSONDefault  *Error
}

func ParseSpaceStatusResponse

func ParseSpaceStatusResponse(rsp *http.Response) (*SpaceStatusResponse, error)

ParseSpaceStatusResponse parses an HTTP response from a SpaceStatusWithResponse call

func (SpaceStatusResponse) Status

func (r SpaceStatusResponse) Status() string

Status returns HTTPResponse.Status

func (SpaceStatusResponse) StatusCode

func (r SpaceStatusResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SpaceUsage added in v0.15.1

type SpaceUsage struct {
	// BillingPeriodEnd End of the current billing cycle.
	BillingPeriodEnd *time.Time `json:"billing_period_end,omitempty"`

	// BillingPeriodStart Start of the current billing cycle.
	BillingPeriodStart *time.Time `json:"billing_period_start,omitempty"`

	// ComputeLimitMinutes Compute-minute quota for the space. When exceeded, all standard
	// databases in the space are automatically paused. `null` means no
	// limit — only possible when `overages_enabled` is true.
	ComputeLimitMinutes *int64 `json:"compute_limit_minutes"`

	// ComputeMinutes Total compute minutes used across all databases in the space during the current billing cycle.
	ComputeMinutes int64 `json:"compute_minutes"`

	// CostToDate Gross cost accrued so far this billing cycle.
	CostToDate *float64 `json:"cost_to_date,omitempty"`

	// EstimatedTotalCost Projected gross total for the current billing cycle based on usage to date.
	EstimatedTotalCost *float64 `json:"estimated_total_cost,omitempty"`

	// FreeComputeMinutes Compute minutes included per billing cycle at no additional charge,
	// shared across all standard databases in the space. Usage beyond this
	// is billed only when `overages_enabled` is true.
	FreeComputeMinutes int64 `json:"free_compute_minutes"`

	// OveragesEnabled Whether the space has compute overages enabled.
	OveragesEnabled bool `json:"overages_enabled"`

	// StorageLimitMib Storage quota for the space, in MiB.
	StorageLimitMib int64 `json:"storage_limit_mib"`

	// StorageMib Total storage used across all databases in the space, in MiB.
	StorageMib int64 `json:"storage_mib"`
}

SpaceUsage Space-level usage and cost for the current billing cycle.

type SpaceUsageResponse added in v0.15.1

type SpaceUsageResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SpaceUsage
	JSONDefault  *Error
}

func ParseSpaceUsageResponse added in v0.15.1

func ParseSpaceUsageResponse(rsp *http.Response) (*SpaceUsageResponse, error)

ParseSpaceUsageResponse parses an HTTP response from a SpaceUsageWithResponse call

func (SpaceUsageResponse) Status added in v0.15.1

func (r SpaceUsageResponse) Status() string

Status returns HTTPResponse.Status

func (SpaceUsageResponse) StatusCode added in v0.15.1

func (r SpaceUsageResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type StandardComputePrice added in v0.17.0

type StandardComputePrice struct {
	// IncludedComputeHoursPerMonth Compute-hours included per month at no additional charge, shared
	// across all standard databases in the space. Only usage above this
	// amount is billed at `price_per_hour`.
	IncludedComputeHoursPerMonth int `json:"included_compute_hours_per_month"`

	// PricePerHour Price per compute-hour used beyond the included monthly allowance,
	// metered in 15-minute increments.
	PricePerHour float64 `json:"price_per_hour"`
}

StandardComputePrice Pricing for standard (shared) compute used beyond the free monthly allowance.

type StandardPricing added in v0.17.0

type StandardPricing struct {
	// Compute Pricing for standard (shared) compute used beyond the free monthly
	// allowance.
	Compute StandardComputePrice `json:"compute"`
}

StandardPricing Pricing for standard (non-dedicated) databases, which share a space-wide compute allowance.

type StatusResponse

type StatusResponse struct {
	// Status Status string (e.g. `success`).
	Status string `json:"status"`
}

StatusResponse Generic success response.

type StoragePrice added in v0.13.0

type StoragePrice struct {
	// IncludedGibPerDatabase GiB of storage included per database at no additional charge. Only
	// storage above this amount is billed at `price_per_gib_hour`.
	IncludedGibPerDatabase int `json:"included_gib_per_database"`

	// PricePerGibHour Price per GiB per hour of provisioned storage above the included amount.
	PricePerGibHour float64 `json:"price_per_gib_hour"`

	// PricePerGibMonth Price per GiB per month of provisioned storage above the included amount.
	PricePerGibMonth float64 `json:"price_per_gib_month"`
}

StoragePrice Storage pricing.

type SubmitFeedbackJSONRequestBody

type SubmitFeedbackJSONRequestBody = FeedbackRequest

SubmitFeedbackJSONRequestBody defines body for SubmitFeedback for application/json ContentType.

type SubmitFeedbackResponse

type SubmitFeedbackResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *StatusResponse
	JSONDefault  *Error
}

func ParseSubmitFeedbackResponse

func ParseSubmitFeedbackResponse(rsp *http.Response) (*SubmitFeedbackResponse, error)

ParseSubmitFeedbackResponse parses an HTTP response from a SubmitFeedbackWithResponse call

func (SubmitFeedbackResponse) Status

func (r SubmitFeedbackResponse) Status() string

Status returns HTTPResponse.Status

func (SubmitFeedbackResponse) StatusCode

func (r SubmitFeedbackResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type TrackRequest

type TrackRequest struct {
	// Event Event name.
	Event string `json:"event"`

	// Properties Free-form event properties.
	Properties *map[string]interface{} `json:"properties,omitempty"`
}

TrackRequest An analytics event to record.

type UpdateOverageSettingsRequest added in v0.17.0

type UpdateOverageSettingsRequest struct {
	// ComputeLimitMinutes Optional when `enabled` is true: the monthly compute-minute limit
	// above which standard databases auto-pause. Must be greater than
	// the free-tier limit (6000 minutes). Omit or set to `null` for no
	// limit — the user is billed for all overage usage with no upper
	// bound. Must be omitted (or `null`) when `enabled` is false; on
	// disable the server resets the limit to the free-tier default.
	ComputeLimitMinutes *int64 `json:"compute_limit_minutes"`

	// Enabled Set to true to enable overages, false to disable.
	Enabled bool `json:"enabled"`
}

UpdateOverageSettingsRequest Request body for updating compute overage settings on a space.

type UpdateOveragesJSONRequestBody added in v0.17.0

type UpdateOveragesJSONRequestBody = UpdateOverageSettingsRequest

UpdateOveragesJSONRequestBody defines body for UpdateOverages for application/json ContentType.

type UpdateOveragesResponse added in v0.17.0

type UpdateOveragesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseUpdateOveragesResponse added in v0.17.0

func ParseUpdateOveragesResponse(rsp *http.Response) (*UpdateOveragesResponse, error)

ParseUpdateOveragesResponse parses an HTTP response from a UpdateOveragesWithResponse call

func (UpdateOveragesResponse) Status added in v0.17.0

func (r UpdateOveragesResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateOveragesResponse) StatusCode added in v0.17.0

func (r UpdateOveragesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdatePasswordJSONRequestBody

type UpdatePasswordJSONRequestBody = UpdatePasswordRequest

UpdatePasswordJSONRequestBody defines body for UpdatePassword for application/json ContentType.

type UpdatePasswordRequest

type UpdatePasswordRequest struct {
	// Password New PostgreSQL password for the default user.
	Password string `json:"password"`
}

UpdatePasswordRequest defines model for UpdatePasswordRequest.

type UpdatePasswordResponse

type UpdatePasswordResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseUpdatePasswordResponse

func ParseUpdatePasswordResponse(rsp *http.Response) (*UpdatePasswordResponse, error)

ParseUpdatePasswordResponse parses an HTTP response from a UpdatePasswordWithResponse call

func (UpdatePasswordResponse) Status

func (r UpdatePasswordResponse) Status() string

Status returns HTTPResponse.Status

func (UpdatePasswordResponse) StatusCode

func (r UpdatePasswordResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UserInfo

type UserInfo struct {
	// Email User email address.
	Email string `json:"email"`

	// Id User ID.
	Id string `json:"id"`

	// Name User's full name.
	Name string `json:"name"`
}

UserInfo Authenticated user details.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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