api

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 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.8.0 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.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

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 NewAcceptInviteRequest added in v0.21.0

func NewAcceptInviteRequest(server string, spaceID SpaceID) (*http.Request, error)

NewAcceptInviteRequest constructs an http.Request for the AcceptInvite method

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 constructs an http.Request for the AnalyticsIdentify method, with any body, and a specified content type

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 constructs an http.Request for the AnalyticsTrack method, with any body, and a specified content type

func NewAuthInfoRequest

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

NewAuthInfoRequest constructs an http.Request for the AuthInfo method

func NewCancelInviteRequest added in v0.21.0

func NewCancelInviteRequest(server string, spaceID SpaceID, email InviteEmail) (*http.Request, error)

NewCancelInviteRequest constructs an http.Request for the CancelInvite method

func NewCancelPaymentMethodDeletionRequest

func NewCancelPaymentMethodDeletionRequest(server string, spaceID SpaceID, paymentID PaymentID) (*http.Request, error)

NewCancelPaymentMethodDeletionRequest constructs an http.Request for the CancelPaymentMethodDeletion method

func NewCreateAPIKeyRequest added in v0.27.0

func NewCreateAPIKeyRequest(server string, spaceID SpaceID, body CreateAPIKeyJSONRequestBody) (*http.Request, error)

NewCreateAPIKeyRequest calls the generic CreateAPIKey builder with application/json body

func NewCreateAPIKeyRequestWithBody added in v0.27.0

func NewCreateAPIKeyRequestWithBody(server string, spaceID SpaceID, contentType string, body io.Reader) (*http.Request, error)

NewCreateAPIKeyRequestWithBody constructs an http.Request for the CreateAPIKey method, with any body, and a specified content type

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 constructs an http.Request for the CreateDatabase method, with any body, and a specified content type

func NewCreateInviteRequest added in v0.21.0

func NewCreateInviteRequest(server string, spaceID SpaceID, body CreateInviteJSONRequestBody) (*http.Request, error)

NewCreateInviteRequest calls the generic CreateInvite builder with application/json body

func NewCreateInviteRequestWithBody added in v0.21.0

func NewCreateInviteRequestWithBody(server string, spaceID SpaceID, contentType string, body io.Reader) (*http.Request, error)

NewCreateInviteRequestWithBody constructs an http.Request for the CreateInvite method, with any body, and a specified content type

func NewCreatePaymentMethodSetupRequest

func NewCreatePaymentMethodSetupRequest(server string, spaceID SpaceID) (*http.Request, error)

NewCreatePaymentMethodSetupRequest constructs an http.Request for the CreatePaymentMethodSetup method

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 constructs an http.Request for the CreateSpace method, with any body, and a specified content type

func NewDatabaseLogsRequest

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

NewDatabaseLogsRequest constructs an http.Request for the DatabaseLogs method

func NewDeclineInviteRequest added in v0.21.0

func NewDeclineInviteRequest(server string, spaceID SpaceID) (*http.Request, error)

NewDeclineInviteRequest constructs an http.Request for the DeclineInvite method

func NewDeleteAPIKeyRequest added in v0.27.0

func NewDeleteAPIKeyRequest(server string, spaceID SpaceID, prefix APIKeyPrefix) (*http.Request, error)

NewDeleteAPIKeyRequest constructs an http.Request for the DeleteAPIKey method

func NewDeleteDatabaseRequest

func NewDeleteDatabaseRequest(server string, spaceID SpaceID, databaseRef DatabaseRef) (*http.Request, error)

NewDeleteDatabaseRequest constructs an http.Request for the DeleteDatabase method

func NewDeletePaymentMethodRequest

func NewDeletePaymentMethodRequest(server string, spaceID SpaceID, paymentID PaymentID) (*http.Request, error)

NewDeletePaymentMethodRequest constructs an http.Request for the DeletePaymentMethod method

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 constructs an http.Request for the ForkDatabase method, with any body, and a specified content type

func NewGetDatabaseRequest

func NewGetDatabaseRequest(server string, spaceID SpaceID, databaseRef DatabaseRef) (*http.Request, error)

NewGetDatabaseRequest constructs an http.Request for the GetDatabase method

func NewGetInvoiceRequest added in v0.10.0

func NewGetInvoiceRequest(server string, spaceID SpaceID, invoiceID InvoiceID) (*http.Request, error)

NewGetInvoiceRequest constructs an http.Request for the GetInvoice method

func NewGetPaymentMethodRequest

func NewGetPaymentMethodRequest(server string, spaceID SpaceID, paymentID PaymentID) (*http.Request, error)

NewGetPaymentMethodRequest constructs an http.Request for the GetPaymentMethod method

func NewGetPricingRequest added in v0.13.0

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

NewGetPricingRequest constructs an http.Request for the GetPricing method

func NewGetSpaceRequest added in v0.23.0

func NewGetSpaceRequest(server string, spaceID SpaceID) (*http.Request, error)

NewGetSpaceRequest constructs an http.Request for the GetSpace method

func NewHealthRequest

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

NewHealthRequest constructs an http.Request for the Health method

func NewLeaveSpaceRequest added in v0.24.0

func NewLeaveSpaceRequest(server string, spaceID SpaceID) (*http.Request, error)

NewLeaveSpaceRequest constructs an http.Request for the LeaveSpace method

func NewListAPIKeysRequest added in v0.27.0

func NewListAPIKeysRequest(server string, spaceID SpaceID) (*http.Request, error)

NewListAPIKeysRequest constructs an http.Request for the ListAPIKeys method

func NewListDatabasesRequest

func NewListDatabasesRequest(server string, spaceID SpaceID) (*http.Request, error)

NewListDatabasesRequest constructs an http.Request for the ListDatabases method

func NewListInvitesRequest added in v0.21.0

func NewListInvitesRequest(server string, spaceID SpaceID) (*http.Request, error)

NewListInvitesRequest constructs an http.Request for the ListInvites method

func NewListInvoicesRequest added in v0.10.0

func NewListInvoicesRequest(server string, spaceID SpaceID) (*http.Request, error)

NewListInvoicesRequest constructs an http.Request for the ListInvoices method

func NewListMembersRequest added in v0.20.0

func NewListMembersRequest(server string, spaceID SpaceID) (*http.Request, error)

NewListMembersRequest constructs an http.Request for the ListMembers method

func NewListPaymentMethodsRequest

func NewListPaymentMethodsRequest(server string, spaceID SpaceID) (*http.Request, error)

NewListPaymentMethodsRequest constructs an http.Request for the ListPaymentMethods method

func NewListReceivedInvitesRequest added in v0.21.0

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

NewListReceivedInvitesRequest constructs an http.Request for the ListReceivedInvites method

func NewListSharesRequest added in v0.10.0

func NewListSharesRequest(server string, spaceID SpaceID) (*http.Request, error)

NewListSharesRequest constructs an http.Request for the ListShares method

func NewListSpacesRequest

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

NewListSpacesRequest constructs an http.Request for the ListSpaces method

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 constructs an http.Request for the Logout method, with any body, and a specified content type

func NewPauseDatabaseRequest

func NewPauseDatabaseRequest(server string, spaceID SpaceID, databaseRef DatabaseRef) (*http.Request, error)

NewPauseDatabaseRequest constructs an http.Request for the PauseDatabase method

func NewRemoveMemberRequest added in v0.20.0

func NewRemoveMemberRequest(server string, spaceID SpaceID, userID MemberUserID) (*http.Request, error)

NewRemoveMemberRequest constructs an http.Request for the RemoveMember method

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 constructs an http.Request for the RenameDatabase method, with any body, and a specified content type

func NewRenameSpaceRequest added in v0.20.0

func NewRenameSpaceRequest(server string, spaceID SpaceID, body RenameSpaceJSONRequestBody) (*http.Request, error)

NewRenameSpaceRequest calls the generic RenameSpace builder with application/json body

func NewRenameSpaceRequestWithBody added in v0.20.0

func NewRenameSpaceRequestWithBody(server string, spaceID SpaceID, contentType string, body io.Reader) (*http.Request, error)

NewRenameSpaceRequestWithBody constructs an http.Request for the RenameSpace method, with any body, and a specified content type

func NewResumeDatabaseRequest

func NewResumeDatabaseRequest(server string, spaceID SpaceID, databaseRef DatabaseRef) (*http.Request, error)

NewResumeDatabaseRequest constructs an http.Request for the ResumeDatabase method

func NewRevokeShareRequest added in v0.10.0

func NewRevokeShareRequest(server string, spaceID SpaceID, shareToken ShareToken) (*http.Request, error)

NewRevokeShareRequest constructs an http.Request for the RevokeShare method

func NewSetPaymentMethodPrimaryRequest

func NewSetPaymentMethodPrimaryRequest(server string, spaceID SpaceID, paymentID PaymentID) (*http.Request, error)

NewSetPaymentMethodPrimaryRequest constructs an http.Request for the SetPaymentMethodPrimary method

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 constructs an http.Request for the ShareDatabase method, with any body, and a specified content type

func NewSpaceStatusRequest

func NewSpaceStatusRequest(server string, spaceID SpaceID) (*http.Request, error)

NewSpaceStatusRequest constructs an http.Request for the SpaceStatus method

func NewSpaceUsageRequest added in v0.15.1

func NewSpaceUsageRequest(server string, spaceID SpaceID) (*http.Request, error)

NewSpaceUsageRequest constructs an http.Request for the SpaceUsage method

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 constructs an http.Request for the SubmitFeedback method, with any body, and a specified content type

func NewUpdateMemberRoleRequest added in v0.20.0

func NewUpdateMemberRoleRequest(server string, spaceID SpaceID, userID MemberUserID, body UpdateMemberRoleJSONRequestBody) (*http.Request, error)

NewUpdateMemberRoleRequest calls the generic UpdateMemberRole builder with application/json body

func NewUpdateMemberRoleRequestWithBody added in v0.20.0

func NewUpdateMemberRoleRequestWithBody(server string, spaceID SpaceID, userID MemberUserID, contentType string, body io.Reader) (*http.Request, error)

NewUpdateMemberRoleRequestWithBody constructs an http.Request for the UpdateMemberRole method, with any body, and a specified content type

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 constructs an http.Request for the UpdateOverages method, with any body, and a specified content type

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 constructs an http.Request for the UpdatePassword method, with any body, and a specified content type

Types

type APIKey added in v0.27.0

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

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

	// Prefix Stable prefix identifier for the API key (starts with `gt_`), identifying the key without exposing the secret.
	Prefix string `json:"prefix"`
}

APIKey An API key in a space.

type APIKeyCredentials added in v0.27.0

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 added in v0.27.0

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

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

	// Prefix Stable prefix identifier for the API key (starts with `gt_`), identifying the key without exposing the secret.
	Prefix string `json:"prefix"`

	// 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 added in v0.27.0

type APIKeyPrefix = string

APIKeyPrefix defines model for ApiKeyPrefix.

type AcceptInviteResponse added in v0.21.0

type AcceptInviteResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *InviteActionResult
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseAcceptInviteResponse added in v0.21.0

func ParseAcceptInviteResponse(rsp *http.Response) (*AcceptInviteResponse, error)

ParseAcceptInviteResponse parses an HTTP response from a AcceptInviteWithResponse call

func (AcceptInviteResponse) ContentType added in v0.27.1

func (r AcceptInviteResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AcceptInviteResponse) GetBody added in v0.27.1

func (r AcceptInviteResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AcceptInviteResponse) GetJSON200 added in v0.27.1

func (r AcceptInviteResponse) GetJSON200() *InviteActionResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AcceptInviteResponse) GetJSONDefault added in v0.27.1

func (r AcceptInviteResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (AcceptInviteResponse) Status added in v0.21.0

func (r AcceptInviteResponse) Status() string

Status returns HTTPResponse.Status

func (AcceptInviteResponse) StatusCode added in v0.21.0

func (r AcceptInviteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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 the response for an HTTP 200 `application/json` response
	JSON200 *StatusResponse
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseAnalyticsIdentifyResponse

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

ParseAnalyticsIdentifyResponse parses an HTTP response from a AnalyticsIdentifyWithResponse call

func (AnalyticsIdentifyResponse) ContentType added in v0.27.1

func (r AnalyticsIdentifyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AnalyticsIdentifyResponse) GetBody added in v0.27.1

func (r AnalyticsIdentifyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AnalyticsIdentifyResponse) GetJSON200 added in v0.27.1

func (r AnalyticsIdentifyResponse) GetJSON200() *StatusResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AnalyticsIdentifyResponse) GetJSONDefault added in v0.27.1

func (r AnalyticsIdentifyResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 the response for an HTTP 200 `application/json` response
	JSON200 *StatusResponse
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseAnalyticsTrackResponse

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

ParseAnalyticsTrackResponse parses an HTTP response from a AnalyticsTrackWithResponse call

func (AnalyticsTrackResponse) ContentType added in v0.27.1

func (r AnalyticsTrackResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AnalyticsTrackResponse) GetBody added in v0.27.1

func (r AnalyticsTrackResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AnalyticsTrackResponse) GetJSON200 added in v0.27.1

func (r AnalyticsTrackResponse) GetJSON200() *StatusResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AnalyticsTrackResponse) GetJSONDefault added in v0.27.1

func (r AnalyticsTrackResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 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 the response for an HTTP 200 `application/json` response
	JSON200 *AuthInfo
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseAuthInfoResponse

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

ParseAuthInfoResponse parses an HTTP response from a AuthInfoWithResponse call

func (AuthInfoResponse) ContentType added in v0.27.1

func (r AuthInfoResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AuthInfoResponse) GetBody added in v0.27.1

func (r AuthInfoResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AuthInfoResponse) GetJSON200 added in v0.27.1

func (r AuthInfoResponse) GetJSON200() *AuthInfo

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AuthInfoResponse) GetJSONDefault added in v0.27.1

func (r AuthInfoResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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.

func (AuthInfoType) Valid added in v0.27.1

func (e AuthInfoType) Valid() bool

Valid indicates whether the value is a known member of the AuthInfoType enum.

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 CancelInviteResponse added in v0.21.0

type CancelInviteResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Invite
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseCancelInviteResponse added in v0.21.0

func ParseCancelInviteResponse(rsp *http.Response) (*CancelInviteResponse, error)

ParseCancelInviteResponse parses an HTTP response from a CancelInviteWithResponse call

func (CancelInviteResponse) ContentType added in v0.27.1

func (r CancelInviteResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CancelInviteResponse) GetBody added in v0.27.1

func (r CancelInviteResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CancelInviteResponse) GetJSON200 added in v0.27.1

func (r CancelInviteResponse) GetJSON200() *Invite

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (CancelInviteResponse) GetJSONDefault added in v0.27.1

func (r CancelInviteResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (CancelInviteResponse) Status added in v0.21.0

func (r CancelInviteResponse) Status() string

Status returns HTTPResponse.Status

func (CancelInviteResponse) StatusCode added in v0.21.0

func (r CancelInviteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CancelPaymentMethodDeletionResponse

type CancelPaymentMethodDeletionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseCancelPaymentMethodDeletionResponse

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

ParseCancelPaymentMethodDeletionResponse parses an HTTP response from a CancelPaymentMethodDeletionWithResponse call

func (CancelPaymentMethodDeletionResponse) ContentType added in v0.27.1

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CancelPaymentMethodDeletionResponse) GetBody added in v0.27.1

GetBody returns the raw response body bytes

func (CancelPaymentMethodDeletionResponse) GetJSONDefault added in v0.27.1

func (r CancelPaymentMethodDeletionResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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) AcceptInvite added in v0.21.0

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

AcceptInvite Accept a received invite

Accepts the invite the authenticated user has received to the given space, joining it. Requires user authentication (JWT).

Corresponds with POST /invites/{space_id}/accept (the `AcceptInvite` operationId).

func (*Client) AnalyticsIdentify

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

AnalyticsIdentify Identify user

Identifies a user for analytics.

Takes a body of the `application/json` content type.

Corresponds with POST /analytics/identify (the `AnalyticsIdentify` operationId).

func (*Client) AnalyticsIdentifyWithBody

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

AnalyticsIdentifyWithBody Identify user

Identifies a user for analytics.

Takes any type of body and a specified content type.

Corresponds with POST /analytics/identify (the `AnalyticsIdentify` operationId).

func (*Client) AnalyticsTrack

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

AnalyticsTrack Track event

Tracks an analytics event.

Takes a body of the `application/json` content type.

Corresponds with POST /analytics/track (the `AnalyticsTrack` operationId).

func (*Client) AnalyticsTrackWithBody

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

AnalyticsTrackWithBody Track event

Tracks an analytics event.

Takes any type of body and a specified content type.

Corresponds with POST /analytics/track (the `AnalyticsTrack` operationId).

func (*Client) AuthInfo

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

AuthInfo Get authentication info

Returns info about the authenticated API key.

Corresponds with GET /auth/info (the `AuthInfo` operationId).

func (*Client) CancelInvite added in v0.21.0

func (c *Client) CancelInvite(ctx context.Context, spaceID SpaceID, email InviteEmail, reqEditors ...RequestEditorFn) (*http.Response, error)

CancelInvite Cancel a sent invite

Cancels the pending invite sent to the given email address for a space. Requires user authentication (JWT). API keys cannot manage invites.

Corresponds with DELETE /spaces/{space_id}/invites/{email} (the `CancelInvite` operationId).

func (*Client) CancelPaymentMethodDeletion

func (c *Client) CancelPaymentMethodDeletion(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*http.Response, error)

CancelPaymentMethodDeletion Cancel pending payment method deletion

Cancels a pending deletion for a payment method.

Corresponds with DELETE /spaces/{space_id}/payment/{payment_id}/deletion (the `CancelPaymentMethodDeletion` operationId).

func (*Client) CreateAPIKey added in v0.27.0

func (c *Client) CreateAPIKey(ctx context.Context, spaceID SpaceID, body CreateAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateAPIKey Create an API key

Creates a new API key (client credentials) for the specified space. Requires user authentication (JWT). API keys cannot create other API keys.

Takes a body of the `application/json` content type.

Corresponds with POST /spaces/{space_id}/api_keys (the `CreateAPIKey` operationId).

func (*Client) CreateAPIKeyWithBody added in v0.27.0

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

CreateAPIKeyWithBody Create an API key

Creates a new API key (client credentials) for the specified space. Requires user authentication (JWT). API keys cannot create other API keys.

Takes any type of body and a specified content type.

Corresponds with POST /spaces/{space_id}/api_keys (the `CreateAPIKey` operationId).

func (*Client) CreateDatabase

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

CreateDatabase Create a database

Creates a new database in a space.

Takes a body of the `application/json` content type.

Corresponds with POST /spaces/{space_id}/databases (the `CreateDatabase` operationId).

func (*Client) CreateDatabaseWithBody

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

CreateDatabaseWithBody Create a database

Creates a new database in a space.

Takes any type of body and a specified content type.

Corresponds with POST /spaces/{space_id}/databases (the `CreateDatabase` operationId).

func (*Client) CreateInvite added in v0.21.0

func (c *Client) CreateInvite(ctx context.Context, spaceID SpaceID, body CreateInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

CreateInvite Invite a user to a space

Invites a user to a space by email address. The invitee accepts the invitation with their own Ghost account. Requires user authentication (JWT). API keys cannot manage invites.

Takes a body of the `application/json` content type.

Corresponds with POST /spaces/{space_id}/invites (the `CreateInvite` operationId).

func (*Client) CreateInviteWithBody added in v0.21.0

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

CreateInviteWithBody Invite a user to a space

Invites a user to a space by email address. The invitee accepts the invitation with their own Ghost account. Requires user authentication (JWT). API keys cannot manage invites.

Takes any type of body and a specified content type.

Corresponds with POST /spaces/{space_id}/invites (the `CreateInvite` operationId).

func (*Client) CreatePaymentMethodSetup

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

CreatePaymentMethodSetup Create payment method setup

Creates a Stripe Setup Intent for payment method collection and returns the client secret and payment page URL.

Corresponds with POST /spaces/{space_id}/payment (the `CreatePaymentMethodSetup` operationId).

func (*Client) CreateSpace

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

CreateSpace Create a space

Creates a new Ghost space. Requires user authentication (JWT). API keys cannot be used to create spaces. When no name is provided, the space is named after its owner (e.g. "Jane Doe's space").

Takes a body of the `application/json` content type.

Corresponds with POST /spaces (the `CreateSpace` operationId).

func (*Client) CreateSpaceWithBody

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

CreateSpaceWithBody Create a space

Creates a new Ghost space. Requires user authentication (JWT). API keys cannot be used to create spaces. When no name is provided, the space is named after its owner (e.g. "Jane Doe's space").

Takes any type of body and a specified content type.

Corresponds with POST /spaces (the `CreateSpace` operationId).

func (*Client) DatabaseLogs

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

DatabaseLogs Get database logs

Fetch logs for a specific database. Returns up to 500 log entries in reverse chronological order. Supports cursor-based pagination via the `cursor` parameter and the `last_cursor` field in the response.

Corresponds with GET /spaces/{space_id}/databases/{database_ref}/logs (the `DatabaseLogs` operationId).

func (*Client) DeclineInvite added in v0.21.0

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

DeclineInvite Decline a received invite

Declines the invite the authenticated user has received to the given space. Requires user authentication (JWT).

Corresponds with POST /invites/{space_id}/decline (the `DeclineInvite` operationId).

func (*Client) DeleteAPIKey added in v0.27.0

func (c *Client) DeleteAPIKey(ctx context.Context, spaceID SpaceID, prefix APIKeyPrefix, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteAPIKey Delete an API key

Deletes an API key from the specified space. Requires user authentication (JWT). API keys cannot delete other API keys.

Corresponds with DELETE /spaces/{space_id}/api_keys/{prefix} (the `DeleteAPIKey` operationId).

func (*Client) DeleteDatabase

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

DeleteDatabase Delete a database

Deletes a database.

Corresponds with DELETE /spaces/{space_id}/databases/{database_ref} (the `DeleteDatabase` operationId).

func (*Client) DeletePaymentMethod

func (c *Client) DeletePaymentMethod(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*http.Response, error)

DeletePaymentMethod Delete a payment method

Deletes a payment method.

Corresponds with DELETE /spaces/{space_id}/payment/{payment_id} (the `DeletePaymentMethod` operationId).

func (*Client) ForkDatabase

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

ForkDatabase Fork a database

Forks an existing database.

Takes a body of the `application/json` content type.

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/fork (the `ForkDatabase` operationId).

func (*Client) ForkDatabaseWithBody

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

ForkDatabaseWithBody Fork a database

Forks an existing database.

Takes any type of body and a specified content type.

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/fork (the `ForkDatabase` operationId).

func (*Client) GetDatabase

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

GetDatabase Get a database

Gets a single database by ID or name.

Corresponds with GET /spaces/{space_id}/databases/{database_ref} (the `GetDatabase` operationId).

func (*Client) GetInvoice added in v0.10.0

func (c *Client) GetInvoice(ctx context.Context, spaceID SpaceID, invoiceID InvoiceID, reqEditors ...RequestEditorFn) (*http.Response, error)

GetInvoice Get invoice detail

Returns the line-item breakdown for a single invoice, looked up by the invoice ID returned from `listInvoices`. Requires a user JWT; API keys are not authorized.

Corresponds with GET /spaces/{space_id}/invoices/{invoice_id} (the `GetInvoice` operationId).

func (*Client) GetPaymentMethod

func (c *Client) GetPaymentMethod(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*http.Response, error)

GetPaymentMethod Get a payment method

Returns a single payment method by ID.

Corresponds with GET /spaces/{space_id}/payment/{payment_id} (the `GetPaymentMethod` operationId).

func (*Client) GetPricing added in v0.13.0

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

GetPricing Get pricing

Returns current pricing.

This endpoint is unauthenticated.

Corresponds with GET /pricing (the `GetPricing` operationId).

func (*Client) GetSpace added in v0.23.0

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

GetSpace Get a space

Returns details about a single space, including the owner and the caller's role. For user JWTs the role and owner are populated; for API keys they are omitted (the members lookup that resolves the owner is not available to API keys).

Corresponds with GET /spaces/{space_id} (the `GetSpace` operationId).

func (*Client) Health

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

Health Health check

Returns 200 OK if the service is healthy.

Corresponds with GET /health (the `Health` operationId).

func (*Client) LeaveSpace added in v0.24.0

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

LeaveSpace Leave a space

Removes the authenticated user from the space. Requires user authentication (JWT). API keys cannot leave a space. The space owner cannot leave their own space.

Corresponds with POST /spaces/{space_id}/leave (the `LeaveSpace` operationId).

func (*Client) ListAPIKeys added in v0.27.0

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

ListAPIKeys List API keys

Lists all API keys for the specified space. Requires user authentication (JWT). API keys cannot list other API keys.

Corresponds with GET /spaces/{space_id}/api_keys (the `ListAPIKeys` operationId).

func (*Client) ListDatabases

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

ListDatabases List databases

Lists all databases in a space.

Corresponds with GET /spaces/{space_id}/databases (the `ListDatabases` operationId).

func (*Client) ListInvites added in v0.21.0

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

ListInvites List sent invites

Lists the pending invites that have been sent for a space. Requires user authentication (JWT). API keys cannot manage invites.

Corresponds with GET /spaces/{space_id}/invites (the `ListInvites` operationId).

func (*Client) ListInvoices added in v0.10.0

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

ListInvoices List invoices

Lists the most recent invoices for a space. Requires a user JWT; API keys are not authorized.

Corresponds with GET /spaces/{space_id}/invoices (the `ListInvoices` operationId).

func (*Client) ListMembers added in v0.20.0

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

ListMembers List space members

Lists the members of a space. Requires user authentication (JWT). API keys cannot manage members.

Corresponds with GET /spaces/{space_id}/members (the `ListMembers` operationId).

func (*Client) ListPaymentMethods

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

ListPaymentMethods List payment methods

Lists payment methods on file for a space.

Corresponds with GET /spaces/{space_id}/payment (the `ListPaymentMethods` operationId).

func (*Client) ListReceivedInvites added in v0.21.0

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

ListReceivedInvites List received invites

Lists the pending invites the authenticated user has received, across all spaces. Requires user authentication (JWT).

Corresponds with GET /invites (the `ListReceivedInvites` operationId).

func (*Client) ListShares added in v0.10.0

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

ListShares List database shares

Lists all shared snapshots for a space.

Corresponds with GET /spaces/{space_id}/shares (the `ListShares` operationId).

func (*Client) ListSpaces

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

ListSpaces List spaces

Returns Ghost spaces accessible to the authenticated user. For user JWTs, returns all Ghost spaces the user is a member of. For API keys, returns the single space the key is scoped to.

Corresponds with GET /spaces (the `ListSpaces` operationId).

func (*Client) Logout

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

Logout Log out

Logs the user out by revoking the given refresh token. Requires user authentication (JWT). API keys and project access tokens cannot be used with this endpoint.

Takes a body of the `application/json` content type.

Corresponds with POST /auth/logout (the `Logout` operationId).

func (*Client) LogoutWithBody

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

LogoutWithBody Log out

Logs the user out by revoking the given refresh token. Requires user authentication (JWT). API keys and project access tokens cannot be used with this endpoint.

Takes any type of body and a specified content type.

Corresponds with POST /auth/logout (the `Logout` operationId).

func (*Client) PauseDatabase

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

PauseDatabase Pause a database

Pauses a running database.

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/pause (the `PauseDatabase` operationId).

func (*Client) RemoveMember added in v0.20.0

func (c *Client) RemoveMember(ctx context.Context, spaceID SpaceID, userID MemberUserID, reqEditors ...RequestEditorFn) (*http.Response, error)

RemoveMember Remove a member

Removes a member from a space. The space owner cannot be removed, and callers cannot remove themselves. Requires user authentication (JWT). API keys cannot manage members.

Corresponds with DELETE /spaces/{space_id}/members/{user_id} (the `RemoveMember` operationId).

func (*Client) RenameDatabase

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

RenameDatabase Rename a database

Renames a database.

Takes a body of the `application/json` content type.

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/rename (the `RenameDatabase` operationId).

func (*Client) RenameDatabaseWithBody

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

RenameDatabaseWithBody Rename a database

Renames a database.

Takes any type of body and a specified content type.

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/rename (the `RenameDatabase` operationId).

func (*Client) RenameSpace added in v0.20.0

func (c *Client) RenameSpace(ctx context.Context, spaceID SpaceID, body RenameSpaceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

RenameSpace Rename a space

Renames a space. Requires user authentication (JWT). API keys cannot be used to rename spaces.

Takes a body of the `application/json` content type.

Corresponds with POST /spaces/{space_id}/rename (the `RenameSpace` operationId).

func (*Client) RenameSpaceWithBody added in v0.20.0

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

RenameSpaceWithBody Rename a space

Renames a space. Requires user authentication (JWT). API keys cannot be used to rename spaces.

Takes any type of body and a specified content type.

Corresponds with POST /spaces/{space_id}/rename (the `RenameSpace` operationId).

func (*Client) ResumeDatabase

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

ResumeDatabase Resume a database

Resumes a paused database.

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/resume (the `ResumeDatabase` operationId).

func (*Client) RevokeShare added in v0.10.0

func (c *Client) RevokeShare(ctx context.Context, spaceID SpaceID, shareToken ShareToken, reqEditors ...RequestEditorFn) (*http.Response, error)

RevokeShare Revoke a database share

Revokes a shared snapshot, deleting the underlying storage snapshot. The share is identified by its share token.

Corresponds with DELETE /spaces/{space_id}/shares/{share_token} (the `RevokeShare` operationId).

func (*Client) SetPaymentMethodPrimary

func (c *Client) SetPaymentMethodPrimary(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*http.Response, error)

SetPaymentMethodPrimary Set primary payment method

Sets a payment method as the primary payment method for the space.

Corresponds with PUT /spaces/{space_id}/payment/{payment_id}/primary (the `SetPaymentMethodPrimary` operationId).

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)

ShareDatabase Share a database

Creates a shareable snapshot of a database. Returns a share token that can be used to create a new database from the snapshot in another space.

Takes a body of the `application/json` content type.

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/share (the `ShareDatabase` operationId).

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)

ShareDatabaseWithBody Share a database

Creates a shareable snapshot of a database. Returns a share token that can be used to create a new database from the snapshot in another space.

Takes any type of body and a specified content type.

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/share (the `ShareDatabase` operationId).

func (*Client) SpaceStatus

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

SpaceStatus Get space usage (deprecated)

Deprecated alias for `GET /spaces/{space_id}/usage`. Use the `/usage` endpoint instead.

Corresponds with GET /spaces/{space_id}/status (the `SpaceStatus` operationId). Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set

func (*Client) SpaceUsage added in v0.15.1

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

SpaceUsage Get space usage

Returns compute usage, storage usage, and billing/cost information for a space.

Corresponds with GET /spaces/{space_id}/usage (the `SpaceUsage` operationId).

func (*Client) SubmitFeedback

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

SubmitFeedback Submit feedback

Submits feedback or bug report.

Takes a body of the `application/json` content type.

Corresponds with POST /feedback (the `SubmitFeedback` operationId).

func (*Client) SubmitFeedbackWithBody

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

SubmitFeedbackWithBody Submit feedback

Submits feedback or bug report.

Takes any type of body and a specified content type.

Corresponds with POST /feedback (the `SubmitFeedback` operationId).

func (*Client) UpdateMemberRole added in v0.20.0

func (c *Client) UpdateMemberRole(ctx context.Context, spaceID SpaceID, userID MemberUserID, body UpdateMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateMemberRole Update a member's role

Changes a member's role within a space. The `owner` role cannot be granted, the owner's role cannot be changed, and callers cannot change their own role. Requires user authentication (JWT). API keys cannot manage members.

Takes a body of the `application/json` content type.

Corresponds with PUT /spaces/{space_id}/members/{user_id}/role (the `UpdateMemberRole` operationId).

func (*Client) UpdateMemberRoleWithBody added in v0.20.0

func (c *Client) UpdateMemberRoleWithBody(ctx context.Context, spaceID SpaceID, userID MemberUserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

UpdateMemberRoleWithBody Update a member's role

Changes a member's role within a space. The `owner` role cannot be granted, the owner's role cannot be changed, and callers cannot change their own role. Requires user authentication (JWT). API keys cannot manage members.

Takes any type of body and a specified content type.

Corresponds with PUT /spaces/{space_id}/members/{user_id}/role (the `UpdateMemberRole` operationId).

func (*Client) UpdateOverages added in v0.17.0

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

UpdateOverages Update compute overage settings

Enables or disables compute overage billing for the space, optionally setting a monthly compute-minute cap above which standard databases auto-pause. Requires a user JWT and a payment method on file.

Takes a body of the `application/json` content type.

Corresponds with PUT /spaces/{space_id}/overages (the `UpdateOverages` operationId).

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)

UpdateOveragesWithBody Update compute overage settings

Enables or disables compute overage billing for the space, optionally setting a monthly compute-minute cap above which standard databases auto-pause. Requires a user JWT and a payment method on file.

Takes any type of body and a specified content type.

Corresponds with PUT /spaces/{space_id}/overages (the `UpdateOverages` operationId).

func (*Client) UpdatePassword

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

UpdatePassword Update database password

Resets the database password.

Takes a body of the `application/json` content type.

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/password (the `UpdatePassword` operationId).

func (*Client) UpdatePasswordWithBody

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

UpdatePasswordWithBody Update database password

Resets the database password.

Takes any type of body and a specified content type.

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/password (the `UpdatePassword` operationId).

type ClientInterface

type ClientInterface interface {

	// AnalyticsIdentifyWithBody Identify user
	//
	// Identifies a user for analytics.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /analytics/identify (the `AnalyticsIdentify` operationId).
	AnalyticsIdentifyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AnalyticsIdentify Identify user
	//
	// Identifies a user for analytics.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /analytics/identify (the `AnalyticsIdentify` operationId).
	AnalyticsIdentify(ctx context.Context, body AnalyticsIdentifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AnalyticsTrackWithBody Track event
	//
	// Tracks an analytics event.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /analytics/track (the `AnalyticsTrack` operationId).
	AnalyticsTrackWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AnalyticsTrack Track event
	//
	// Tracks an analytics event.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /analytics/track (the `AnalyticsTrack` operationId).
	AnalyticsTrack(ctx context.Context, body AnalyticsTrackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AuthInfo Get authentication info
	//
	// Returns info about the authenticated API key.
	//
	// Corresponds with GET /auth/info (the `AuthInfo` operationId).
	AuthInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LogoutWithBody Log out
	//
	// Logs the user out by revoking the given refresh token.
	// Requires user authentication (JWT). API keys and project access tokens
	// cannot be used with this endpoint.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /auth/logout (the `Logout` operationId).
	LogoutWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Logout Log out
	//
	// Logs the user out by revoking the given refresh token.
	// Requires user authentication (JWT). API keys and project access tokens
	// cannot be used with this endpoint.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /auth/logout (the `Logout` operationId).
	Logout(ctx context.Context, body LogoutJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SubmitFeedbackWithBody Submit feedback
	//
	// Submits feedback or bug report.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /feedback (the `SubmitFeedback` operationId).
	SubmitFeedbackWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SubmitFeedback Submit feedback
	//
	// Submits feedback or bug report.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /feedback (the `SubmitFeedback` operationId).
	SubmitFeedback(ctx context.Context, body SubmitFeedbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Health Health check
	//
	// Returns 200 OK if the service is healthy.
	//
	// Corresponds with GET /health (the `Health` operationId).
	Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListReceivedInvites List received invites
	//
	// Lists the pending invites the authenticated user has received, across
	// all spaces. Requires user authentication (JWT).
	//
	// Corresponds with GET /invites (the `ListReceivedInvites` operationId).
	ListReceivedInvites(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AcceptInvite Accept a received invite
	//
	// Accepts the invite the authenticated user has received to the given
	// space, joining it. Requires user authentication (JWT).
	//
	// Corresponds with POST /invites/{space_id}/accept (the `AcceptInvite` operationId).
	AcceptInvite(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeclineInvite Decline a received invite
	//
	// Declines the invite the authenticated user has received to the given
	// space. Requires user authentication (JWT).
	//
	// Corresponds with POST /invites/{space_id}/decline (the `DeclineInvite` operationId).
	DeclineInvite(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPricing Get pricing
	//
	// Returns current pricing.
	//
	// This endpoint is unauthenticated.
	//
	// Corresponds with GET /pricing (the `GetPricing` operationId).
	GetPricing(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListSpaces List spaces
	//
	// Returns Ghost spaces accessible to the authenticated user.
	// For user JWTs, returns all Ghost spaces the user is a member of.
	// For API keys, returns the single space the key is scoped to.
	//
	// Corresponds with GET /spaces (the `ListSpaces` operationId).
	ListSpaces(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateSpaceWithBody Create a space
	//
	// Creates a new Ghost space. Requires user authentication (JWT).
	// API keys cannot be used to create spaces.
	// When no name is provided, the space is named after its owner
	// (e.g. "Jane Doe's space").
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /spaces (the `CreateSpace` operationId).
	CreateSpaceWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateSpace Create a space
	//
	// Creates a new Ghost space. Requires user authentication (JWT).
	// API keys cannot be used to create spaces.
	// When no name is provided, the space is named after its owner
	// (e.g. "Jane Doe's space").
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /spaces (the `CreateSpace` operationId).
	CreateSpace(ctx context.Context, body CreateSpaceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSpace Get a space
	//
	// Returns details about a single space, including the owner and the
	// caller's role. For user JWTs the role and owner are populated; for API
	// keys they are omitted (the members lookup that resolves the owner is not
	// available to API keys).
	//
	// Corresponds with GET /spaces/{space_id} (the `GetSpace` operationId).
	GetSpace(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListAPIKeys List API keys
	//
	// Lists all API keys for the specified space.
	// Requires user authentication (JWT). API keys cannot list other API keys.
	//
	// Corresponds with GET /spaces/{space_id}/api_keys (the `ListAPIKeys` operationId).
	ListAPIKeys(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateAPIKeyWithBody Create an API key
	//
	// Creates a new API key (client credentials) for the specified space.
	// Requires user authentication (JWT). API keys cannot create other API keys.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /spaces/{space_id}/api_keys (the `CreateAPIKey` operationId).
	CreateAPIKeyWithBody(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateAPIKey Create an API key
	//
	// Creates a new API key (client credentials) for the specified space.
	// Requires user authentication (JWT). API keys cannot create other API keys.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /spaces/{space_id}/api_keys (the `CreateAPIKey` operationId).
	CreateAPIKey(ctx context.Context, spaceID SpaceID, body CreateAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteAPIKey Delete an API key
	//
	// Deletes an API key from the specified space.
	// Requires user authentication (JWT). API keys cannot delete other API keys.
	//
	// Corresponds with DELETE /spaces/{space_id}/api_keys/{prefix} (the `DeleteAPIKey` operationId).
	DeleteAPIKey(ctx context.Context, spaceID SpaceID, prefix APIKeyPrefix, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListDatabases List databases
	//
	// Lists all databases in a space.
	//
	// Corresponds with GET /spaces/{space_id}/databases (the `ListDatabases` operationId).
	ListDatabases(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateDatabaseWithBody Create a database
	//
	// Creates a new database in a space.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /spaces/{space_id}/databases (the `CreateDatabase` operationId).
	CreateDatabaseWithBody(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateDatabase Create a database
	//
	// Creates a new database in a space.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /spaces/{space_id}/databases (the `CreateDatabase` operationId).
	CreateDatabase(ctx context.Context, spaceID SpaceID, body CreateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteDatabase Delete a database
	//
	// Deletes a database.
	//
	// Corresponds with DELETE /spaces/{space_id}/databases/{database_ref} (the `DeleteDatabase` operationId).
	DeleteDatabase(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetDatabase Get a database
	//
	// Gets a single database by ID or name.
	//
	// Corresponds with GET /spaces/{space_id}/databases/{database_ref} (the `GetDatabase` operationId).
	GetDatabase(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ForkDatabaseWithBody Fork a database
	//
	// Forks an existing database.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/fork (the `ForkDatabase` operationId).
	ForkDatabaseWithBody(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ForkDatabase Fork a database
	//
	// Forks an existing database.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/fork (the `ForkDatabase` operationId).
	ForkDatabase(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, body ForkDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DatabaseLogs Get database logs
	//
	// Fetch logs for a specific database. Returns up to 500 log entries in
	// reverse chronological order. Supports cursor-based pagination via the
	// `cursor` parameter and the `last_cursor` field in the response.
	//
	// Corresponds with GET /spaces/{space_id}/databases/{database_ref}/logs (the `DatabaseLogs` operationId).
	DatabaseLogs(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, params *DatabaseLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdatePasswordWithBody Update database password
	//
	// Resets the database password.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/password (the `UpdatePassword` operationId).
	UpdatePasswordWithBody(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdatePassword Update database password
	//
	// Resets the database password.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/password (the `UpdatePassword` operationId).
	UpdatePassword(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, body UpdatePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PauseDatabase Pause a database
	//
	// Pauses a running database.
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/pause (the `PauseDatabase` operationId).
	PauseDatabase(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RenameDatabaseWithBody Rename a database
	//
	// Renames a database.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/rename (the `RenameDatabase` operationId).
	RenameDatabaseWithBody(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RenameDatabase Rename a database
	//
	// Renames a database.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/rename (the `RenameDatabase` operationId).
	RenameDatabase(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, body RenameDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ResumeDatabase Resume a database
	//
	// Resumes a paused database.
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/resume (the `ResumeDatabase` operationId).
	ResumeDatabase(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ShareDatabaseWithBody Share a database
	//
	// Creates a shareable snapshot of a database. Returns a share token that can be used to create a new database from the snapshot in another space.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/share (the `ShareDatabase` operationId).
	ShareDatabaseWithBody(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ShareDatabase Share a database
	//
	// Creates a shareable snapshot of a database. Returns a share token that can be used to create a new database from the snapshot in another space.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/share (the `ShareDatabase` operationId).
	ShareDatabase(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, body ShareDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListInvites List sent invites
	//
	// Lists the pending invites that have been sent for a space.
	// Requires user authentication (JWT). API keys cannot manage invites.
	//
	// Corresponds with GET /spaces/{space_id}/invites (the `ListInvites` operationId).
	ListInvites(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateInviteWithBody Invite a user to a space
	//
	// Invites a user to a space by email address. The invitee accepts the
	// invitation with their own Ghost account.
	// Requires user authentication (JWT). API keys cannot manage invites.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /spaces/{space_id}/invites (the `CreateInvite` operationId).
	CreateInviteWithBody(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateInvite Invite a user to a space
	//
	// Invites a user to a space by email address. The invitee accepts the
	// invitation with their own Ghost account.
	// Requires user authentication (JWT). API keys cannot manage invites.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /spaces/{space_id}/invites (the `CreateInvite` operationId).
	CreateInvite(ctx context.Context, spaceID SpaceID, body CreateInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CancelInvite Cancel a sent invite
	//
	// Cancels the pending invite sent to the given email address for a space.
	// Requires user authentication (JWT). API keys cannot manage invites.
	//
	// Corresponds with DELETE /spaces/{space_id}/invites/{email} (the `CancelInvite` operationId).
	CancelInvite(ctx context.Context, spaceID SpaceID, email InviteEmail, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListInvoices List invoices
	//
	// Lists the most recent invoices for a space.
	// Requires a user JWT; API keys are not authorized.
	//
	// Corresponds with GET /spaces/{space_id}/invoices (the `ListInvoices` operationId).
	ListInvoices(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetInvoice Get invoice detail
	//
	// Returns the line-item breakdown for a single invoice, looked up by the
	// invoice ID returned from `listInvoices`.
	// Requires a user JWT; API keys are not authorized.
	//
	// Corresponds with GET /spaces/{space_id}/invoices/{invoice_id} (the `GetInvoice` operationId).
	GetInvoice(ctx context.Context, spaceID SpaceID, invoiceID InvoiceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// LeaveSpace Leave a space
	//
	// Removes the authenticated user from the space. Requires user
	// authentication (JWT). API keys cannot leave a space. The space owner
	// cannot leave their own space.
	//
	// Corresponds with POST /spaces/{space_id}/leave (the `LeaveSpace` operationId).
	LeaveSpace(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListMembers List space members
	//
	// Lists the members of a space.
	// Requires user authentication (JWT). API keys cannot manage members.
	//
	// Corresponds with GET /spaces/{space_id}/members (the `ListMembers` operationId).
	ListMembers(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RemoveMember Remove a member
	//
	// Removes a member from a space. The space owner cannot be removed,
	// and callers cannot remove themselves.
	// Requires user authentication (JWT). API keys cannot manage members.
	//
	// Corresponds with DELETE /spaces/{space_id}/members/{user_id} (the `RemoveMember` operationId).
	RemoveMember(ctx context.Context, spaceID SpaceID, userID MemberUserID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateMemberRoleWithBody Update a member's role
	//
	// Changes a member's role within a space. The `owner` role cannot be
	// granted, the owner's role cannot be changed, and callers cannot
	// change their own role.
	// Requires user authentication (JWT). API keys cannot manage members.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /spaces/{space_id}/members/{user_id}/role (the `UpdateMemberRole` operationId).
	UpdateMemberRoleWithBody(ctx context.Context, spaceID SpaceID, userID MemberUserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateMemberRole Update a member's role
	//
	// Changes a member's role within a space. The `owner` role cannot be
	// granted, the owner's role cannot be changed, and callers cannot
	// change their own role.
	// Requires user authentication (JWT). API keys cannot manage members.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /spaces/{space_id}/members/{user_id}/role (the `UpdateMemberRole` operationId).
	UpdateMemberRole(ctx context.Context, spaceID SpaceID, userID MemberUserID, body UpdateMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateOveragesWithBody Update compute overage settings
	//
	// Enables or disables compute overage billing for the space, optionally
	// setting a monthly compute-minute cap above which standard databases
	// auto-pause. Requires a user JWT and a payment method on file.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with PUT /spaces/{space_id}/overages (the `UpdateOverages` operationId).
	UpdateOveragesWithBody(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateOverages Update compute overage settings
	//
	// Enables or disables compute overage billing for the space, optionally
	// setting a monthly compute-minute cap above which standard databases
	// auto-pause. Requires a user JWT and a payment method on file.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with PUT /spaces/{space_id}/overages (the `UpdateOverages` operationId).
	UpdateOverages(ctx context.Context, spaceID SpaceID, body UpdateOveragesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListPaymentMethods List payment methods
	//
	// Lists payment methods on file for a space.
	//
	// Corresponds with GET /spaces/{space_id}/payment (the `ListPaymentMethods` operationId).
	ListPaymentMethods(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreatePaymentMethodSetup Create payment method setup
	//
	// Creates a Stripe Setup Intent for payment method collection and returns the client secret and payment page URL.
	//
	// Corresponds with POST /spaces/{space_id}/payment (the `CreatePaymentMethodSetup` operationId).
	CreatePaymentMethodSetup(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeletePaymentMethod Delete a payment method
	//
	// Deletes a payment method.
	//
	// Corresponds with DELETE /spaces/{space_id}/payment/{payment_id} (the `DeletePaymentMethod` operationId).
	DeletePaymentMethod(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPaymentMethod Get a payment method
	//
	// Returns a single payment method by ID.
	//
	// Corresponds with GET /spaces/{space_id}/payment/{payment_id} (the `GetPaymentMethod` operationId).
	GetPaymentMethod(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CancelPaymentMethodDeletion Cancel pending payment method deletion
	//
	// Cancels a pending deletion for a payment method.
	//
	// Corresponds with DELETE /spaces/{space_id}/payment/{payment_id}/deletion (the `CancelPaymentMethodDeletion` operationId).
	CancelPaymentMethodDeletion(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetPaymentMethodPrimary Set primary payment method
	//
	// Sets a payment method as the primary payment method for the space.
	//
	// Corresponds with PUT /spaces/{space_id}/payment/{payment_id}/primary (the `SetPaymentMethodPrimary` operationId).
	SetPaymentMethodPrimary(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RenameSpaceWithBody Rename a space
	//
	// Renames a space. Requires user authentication (JWT).
	// API keys cannot be used to rename spaces.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /spaces/{space_id}/rename (the `RenameSpace` operationId).
	RenameSpaceWithBody(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RenameSpace Rename a space
	//
	// Renames a space. Requires user authentication (JWT).
	// API keys cannot be used to rename spaces.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /spaces/{space_id}/rename (the `RenameSpace` operationId).
	RenameSpace(ctx context.Context, spaceID SpaceID, body RenameSpaceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListShares List database shares
	//
	// Lists all shared snapshots for a space.
	//
	// Corresponds with GET /spaces/{space_id}/shares (the `ListShares` operationId).
	ListShares(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RevokeShare Revoke a database share
	//
	// Revokes a shared snapshot, deleting the underlying storage snapshot. The share is identified by its share token.
	//
	// Corresponds with DELETE /spaces/{space_id}/shares/{share_token} (the `RevokeShare` operationId).
	RevokeShare(ctx context.Context, spaceID SpaceID, shareToken ShareToken, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SpaceStatus Get space usage (deprecated)
	//
	// Deprecated alias for `GET /spaces/{space_id}/usage`. Use the `/usage` endpoint instead.
	//
	// Corresponds with GET /spaces/{space_id}/status (the `SpaceStatus` operationId).
	//
	// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	SpaceStatus(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SpaceUsage Get space usage
	//
	// Returns compute usage, storage usage, and billing/cost information for a space.
	//
	// Corresponds with GET /spaces/{space_id}/usage (the `SpaceUsage` operationId).
	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) AcceptInviteWithResponse added in v0.21.0

func (c *ClientWithResponses) AcceptInviteWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*AcceptInviteResponse, error)

AcceptInviteWithResponse Accept a received invite

Accepts the invite the authenticated user has received to the given space, joining it. Requires user authentication (JWT).

Returns a wrapper object for the known response body format(s).

Corresponds with POST /invites/{space_id}/accept (the `AcceptInvite` operationId).

func (*ClientWithResponses) AnalyticsIdentifyWithBodyWithResponse

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

AnalyticsIdentifyWithBodyWithResponse Identify user

Identifies a user for analytics.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /analytics/identify (the `AnalyticsIdentify` operationId).

func (*ClientWithResponses) AnalyticsIdentifyWithResponse

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

AnalyticsIdentifyWithResponse Identify user

Identifies a user for analytics.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /analytics/identify (the `AnalyticsIdentify` operationId).

func (*ClientWithResponses) AnalyticsTrackWithBodyWithResponse

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

AnalyticsTrackWithBodyWithResponse Track event

Tracks an analytics event.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /analytics/track (the `AnalyticsTrack` operationId).

func (*ClientWithResponses) AnalyticsTrackWithResponse

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

AnalyticsTrackWithResponse Track event

Tracks an analytics event.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /analytics/track (the `AnalyticsTrack` operationId).

func (*ClientWithResponses) AuthInfoWithResponse

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

AuthInfoWithResponse Get authentication info

Returns info about the authenticated API key.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /auth/info (the `AuthInfo` operationId).

func (*ClientWithResponses) CancelInviteWithResponse added in v0.21.0

func (c *ClientWithResponses) CancelInviteWithResponse(ctx context.Context, spaceID SpaceID, email InviteEmail, reqEditors ...RequestEditorFn) (*CancelInviteResponse, error)

CancelInviteWithResponse Cancel a sent invite

Cancels the pending invite sent to the given email address for a space. Requires user authentication (JWT). API keys cannot manage invites.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /spaces/{space_id}/invites/{email} (the `CancelInvite` operationId).

func (*ClientWithResponses) CancelPaymentMethodDeletionWithResponse

func (c *ClientWithResponses) CancelPaymentMethodDeletionWithResponse(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*CancelPaymentMethodDeletionResponse, error)

CancelPaymentMethodDeletionWithResponse Cancel pending payment method deletion

Cancels a pending deletion for a payment method.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /spaces/{space_id}/payment/{payment_id}/deletion (the `CancelPaymentMethodDeletion` operationId).

func (*ClientWithResponses) CreateAPIKeyWithBodyWithResponse added in v0.27.0

func (c *ClientWithResponses) CreateAPIKeyWithBodyWithResponse(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAPIKeyResponse, error)

CreateAPIKeyWithBodyWithResponse Create an API key

Creates a new API key (client credentials) for the specified space. Requires user authentication (JWT). API keys cannot create other API keys.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/api_keys (the `CreateAPIKey` operationId).

func (*ClientWithResponses) CreateAPIKeyWithResponse added in v0.27.0

func (c *ClientWithResponses) CreateAPIKeyWithResponse(ctx context.Context, spaceID SpaceID, body CreateAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAPIKeyResponse, error)

CreateAPIKeyWithResponse Create an API key

Creates a new API key (client credentials) for the specified space. Requires user authentication (JWT). API keys cannot create other API keys.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/api_keys (the `CreateAPIKey` operationId).

func (*ClientWithResponses) CreateDatabaseWithBodyWithResponse

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

CreateDatabaseWithBodyWithResponse Create a database

Creates a new database in a space.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases (the `CreateDatabase` operationId).

func (*ClientWithResponses) CreateDatabaseWithResponse

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

CreateDatabaseWithResponse Create a database

Creates a new database in a space.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases (the `CreateDatabase` operationId).

func (*ClientWithResponses) CreateInviteWithBodyWithResponse added in v0.21.0

func (c *ClientWithResponses) CreateInviteWithBodyWithResponse(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInviteResponse, error)

CreateInviteWithBodyWithResponse Invite a user to a space

Invites a user to a space by email address. The invitee accepts the invitation with their own Ghost account. Requires user authentication (JWT). API keys cannot manage invites.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/invites (the `CreateInvite` operationId).

func (*ClientWithResponses) CreateInviteWithResponse added in v0.21.0

func (c *ClientWithResponses) CreateInviteWithResponse(ctx context.Context, spaceID SpaceID, body CreateInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInviteResponse, error)

CreateInviteWithResponse Invite a user to a space

Invites a user to a space by email address. The invitee accepts the invitation with their own Ghost account. Requires user authentication (JWT). API keys cannot manage invites.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/invites (the `CreateInvite` operationId).

func (*ClientWithResponses) CreatePaymentMethodSetupWithResponse

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

CreatePaymentMethodSetupWithResponse Create payment method setup

Creates a Stripe Setup Intent for payment method collection and returns the client secret and payment page URL.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/payment (the `CreatePaymentMethodSetup` operationId).

func (*ClientWithResponses) CreateSpaceWithBodyWithResponse

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

CreateSpaceWithBodyWithResponse Create a space

Creates a new Ghost space. Requires user authentication (JWT). API keys cannot be used to create spaces. When no name is provided, the space is named after its owner (e.g. "Jane Doe's space").

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces (the `CreateSpace` operationId).

func (*ClientWithResponses) CreateSpaceWithResponse

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

CreateSpaceWithResponse Create a space

Creates a new Ghost space. Requires user authentication (JWT). API keys cannot be used to create spaces. When no name is provided, the space is named after its owner (e.g. "Jane Doe's space").

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces (the `CreateSpace` operationId).

func (*ClientWithResponses) DatabaseLogsWithResponse

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

DatabaseLogsWithResponse Get database logs

Fetch logs for a specific database. Returns up to 500 log entries in reverse chronological order. Supports cursor-based pagination via the `cursor` parameter and the `last_cursor` field in the response.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/databases/{database_ref}/logs (the `DatabaseLogs` operationId).

func (*ClientWithResponses) DeclineInviteWithResponse added in v0.21.0

func (c *ClientWithResponses) DeclineInviteWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*DeclineInviteResponse, error)

DeclineInviteWithResponse Decline a received invite

Declines the invite the authenticated user has received to the given space. Requires user authentication (JWT).

Returns a wrapper object for the known response body format(s).

Corresponds with POST /invites/{space_id}/decline (the `DeclineInvite` operationId).

func (*ClientWithResponses) DeleteAPIKeyWithResponse added in v0.27.0

func (c *ClientWithResponses) DeleteAPIKeyWithResponse(ctx context.Context, spaceID SpaceID, prefix APIKeyPrefix, reqEditors ...RequestEditorFn) (*DeleteAPIKeyResponse, error)

DeleteAPIKeyWithResponse Delete an API key

Deletes an API key from the specified space. Requires user authentication (JWT). API keys cannot delete other API keys.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /spaces/{space_id}/api_keys/{prefix} (the `DeleteAPIKey` operationId).

func (*ClientWithResponses) DeleteDatabaseWithResponse

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

DeleteDatabaseWithResponse Delete a database

Deletes a database.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /spaces/{space_id}/databases/{database_ref} (the `DeleteDatabase` operationId).

func (*ClientWithResponses) DeletePaymentMethodWithResponse

func (c *ClientWithResponses) DeletePaymentMethodWithResponse(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*DeletePaymentMethodResponse, error)

DeletePaymentMethodWithResponse Delete a payment method

Deletes a payment method.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /spaces/{space_id}/payment/{payment_id} (the `DeletePaymentMethod` operationId).

func (*ClientWithResponses) ForkDatabaseWithBodyWithResponse

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

ForkDatabaseWithBodyWithResponse Fork a database

Forks an existing database.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/fork (the `ForkDatabase` operationId).

func (*ClientWithResponses) ForkDatabaseWithResponse

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

ForkDatabaseWithResponse Fork a database

Forks an existing database.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/fork (the `ForkDatabase` operationId).

func (*ClientWithResponses) GetDatabaseWithResponse

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

GetDatabaseWithResponse Get a database

Gets a single database by ID or name.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/databases/{database_ref} (the `GetDatabase` operationId).

func (*ClientWithResponses) GetInvoiceWithResponse added in v0.10.0

func (c *ClientWithResponses) GetInvoiceWithResponse(ctx context.Context, spaceID SpaceID, invoiceID InvoiceID, reqEditors ...RequestEditorFn) (*GetInvoiceResponse, error)

GetInvoiceWithResponse Get invoice detail

Returns the line-item breakdown for a single invoice, looked up by the invoice ID returned from `listInvoices`. Requires a user JWT; API keys are not authorized.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/invoices/{invoice_id} (the `GetInvoice` operationId).

func (*ClientWithResponses) GetPaymentMethodWithResponse

func (c *ClientWithResponses) GetPaymentMethodWithResponse(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*GetPaymentMethodResponse, error)

GetPaymentMethodWithResponse Get a payment method

Returns a single payment method by ID.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/payment/{payment_id} (the `GetPaymentMethod` operationId).

func (*ClientWithResponses) GetPricingWithResponse added in v0.13.0

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

GetPricingWithResponse Get pricing

Returns current pricing.

This endpoint is unauthenticated.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /pricing (the `GetPricing` operationId).

func (*ClientWithResponses) GetSpaceWithResponse added in v0.23.0

func (c *ClientWithResponses) GetSpaceWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*GetSpaceResponse, error)

GetSpaceWithResponse Get a space

Returns details about a single space, including the owner and the caller's role. For user JWTs the role and owner are populated; for API keys they are omitted (the members lookup that resolves the owner is not available to API keys).

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id} (the `GetSpace` operationId).

func (*ClientWithResponses) HealthWithResponse

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

HealthWithResponse Health check

Returns 200 OK if the service is healthy.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /health (the `Health` operationId).

func (*ClientWithResponses) LeaveSpaceWithResponse added in v0.24.0

func (c *ClientWithResponses) LeaveSpaceWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*LeaveSpaceResponse, error)

LeaveSpaceWithResponse Leave a space

Removes the authenticated user from the space. Requires user authentication (JWT). API keys cannot leave a space. The space owner cannot leave their own space.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/leave (the `LeaveSpace` operationId).

func (*ClientWithResponses) ListAPIKeysWithResponse added in v0.27.0

func (c *ClientWithResponses) ListAPIKeysWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*ListAPIKeysResponse, error)

ListAPIKeysWithResponse List API keys

Lists all API keys for the specified space. Requires user authentication (JWT). API keys cannot list other API keys.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/api_keys (the `ListAPIKeys` operationId).

func (*ClientWithResponses) ListDatabasesWithResponse

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

ListDatabasesWithResponse List databases

Lists all databases in a space.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/databases (the `ListDatabases` operationId).

func (*ClientWithResponses) ListInvitesWithResponse added in v0.21.0

func (c *ClientWithResponses) ListInvitesWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*ListInvitesResponse, error)

ListInvitesWithResponse List sent invites

Lists the pending invites that have been sent for a space. Requires user authentication (JWT). API keys cannot manage invites.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/invites (the `ListInvites` operationId).

func (*ClientWithResponses) ListInvoicesWithResponse added in v0.10.0

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

ListInvoicesWithResponse List invoices

Lists the most recent invoices for a space. Requires a user JWT; API keys are not authorized.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/invoices (the `ListInvoices` operationId).

func (*ClientWithResponses) ListMembersWithResponse added in v0.20.0

func (c *ClientWithResponses) ListMembersWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*ListMembersResponse, error)

ListMembersWithResponse List space members

Lists the members of a space. Requires user authentication (JWT). API keys cannot manage members.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/members (the `ListMembers` operationId).

func (*ClientWithResponses) ListPaymentMethodsWithResponse

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

ListPaymentMethodsWithResponse List payment methods

Lists payment methods on file for a space.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/payment (the `ListPaymentMethods` operationId).

func (*ClientWithResponses) ListReceivedInvitesWithResponse added in v0.21.0

func (c *ClientWithResponses) ListReceivedInvitesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListReceivedInvitesResponse, error)

ListReceivedInvitesWithResponse List received invites

Lists the pending invites the authenticated user has received, across all spaces. Requires user authentication (JWT).

Returns a wrapper object for the known response body format(s).

Corresponds with GET /invites (the `ListReceivedInvites` operationId).

func (*ClientWithResponses) ListSharesWithResponse added in v0.10.0

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

ListSharesWithResponse List database shares

Lists all shared snapshots for a space.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/shares (the `ListShares` operationId).

func (*ClientWithResponses) ListSpacesWithResponse

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

ListSpacesWithResponse List spaces

Returns Ghost spaces accessible to the authenticated user. For user JWTs, returns all Ghost spaces the user is a member of. For API keys, returns the single space the key is scoped to.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces (the `ListSpaces` operationId).

func (*ClientWithResponses) LogoutWithBodyWithResponse

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

LogoutWithBodyWithResponse Log out

Logs the user out by revoking the given refresh token. Requires user authentication (JWT). API keys and project access tokens cannot be used with this endpoint.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /auth/logout (the `Logout` operationId).

func (*ClientWithResponses) LogoutWithResponse

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

LogoutWithResponse Log out

Logs the user out by revoking the given refresh token. Requires user authentication (JWT). API keys and project access tokens cannot be used with this endpoint.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /auth/logout (the `Logout` operationId).

func (*ClientWithResponses) PauseDatabaseWithResponse

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

PauseDatabaseWithResponse Pause a database

Pauses a running database.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/pause (the `PauseDatabase` operationId).

func (*ClientWithResponses) RemoveMemberWithResponse added in v0.20.0

func (c *ClientWithResponses) RemoveMemberWithResponse(ctx context.Context, spaceID SpaceID, userID MemberUserID, reqEditors ...RequestEditorFn) (*RemoveMemberResponse, error)

RemoveMemberWithResponse Remove a member

Removes a member from a space. The space owner cannot be removed, and callers cannot remove themselves. Requires user authentication (JWT). API keys cannot manage members.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /spaces/{space_id}/members/{user_id} (the `RemoveMember` operationId).

func (*ClientWithResponses) RenameDatabaseWithBodyWithResponse

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

RenameDatabaseWithBodyWithResponse Rename a database

Renames a database.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/rename (the `RenameDatabase` operationId).

func (*ClientWithResponses) RenameDatabaseWithResponse

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

RenameDatabaseWithResponse Rename a database

Renames a database.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/rename (the `RenameDatabase` operationId).

func (*ClientWithResponses) RenameSpaceWithBodyWithResponse added in v0.20.0

func (c *ClientWithResponses) RenameSpaceWithBodyWithResponse(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenameSpaceResponse, error)

RenameSpaceWithBodyWithResponse Rename a space

Renames a space. Requires user authentication (JWT). API keys cannot be used to rename spaces.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/rename (the `RenameSpace` operationId).

func (*ClientWithResponses) RenameSpaceWithResponse added in v0.20.0

func (c *ClientWithResponses) RenameSpaceWithResponse(ctx context.Context, spaceID SpaceID, body RenameSpaceJSONRequestBody, reqEditors ...RequestEditorFn) (*RenameSpaceResponse, error)

RenameSpaceWithResponse Rename a space

Renames a space. Requires user authentication (JWT). API keys cannot be used to rename spaces.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/rename (the `RenameSpace` operationId).

func (*ClientWithResponses) ResumeDatabaseWithResponse

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

ResumeDatabaseWithResponse Resume a database

Resumes a paused database.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/resume (the `ResumeDatabase` operationId).

func (*ClientWithResponses) RevokeShareWithResponse added in v0.10.0

func (c *ClientWithResponses) RevokeShareWithResponse(ctx context.Context, spaceID SpaceID, shareToken ShareToken, reqEditors ...RequestEditorFn) (*RevokeShareResponse, error)

RevokeShareWithResponse Revoke a database share

Revokes a shared snapshot, deleting the underlying storage snapshot. The share is identified by its share token.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /spaces/{space_id}/shares/{share_token} (the `RevokeShare` operationId).

func (*ClientWithResponses) SetPaymentMethodPrimaryWithResponse

func (c *ClientWithResponses) SetPaymentMethodPrimaryWithResponse(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*SetPaymentMethodPrimaryResponse, error)

SetPaymentMethodPrimaryWithResponse Set primary payment method

Sets a payment method as the primary payment method for the space.

Returns a wrapper object for the known response body format(s).

Corresponds with PUT /spaces/{space_id}/payment/{payment_id}/primary (the `SetPaymentMethodPrimary` operationId).

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 Share a database

Creates a shareable snapshot of a database. Returns a share token that can be used to create a new database from the snapshot in another space.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/share (the `ShareDatabase` operationId).

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)

ShareDatabaseWithResponse Share a database

Creates a shareable snapshot of a database. Returns a share token that can be used to create a new database from the snapshot in another space.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/share (the `ShareDatabase` operationId).

func (*ClientWithResponses) SpaceStatusWithResponse deprecated

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

SpaceStatusWithResponse Get space usage (deprecated)

Deprecated alias for `GET /spaces/{space_id}/usage`. Use the `/usage` endpoint instead.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/status (the `SpaceStatus` operationId).

Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set

func (*ClientWithResponses) SpaceUsageWithResponse added in v0.15.1

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

SpaceUsageWithResponse Get space usage

Returns compute usage, storage usage, and billing/cost information for a space.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /spaces/{space_id}/usage (the `SpaceUsage` operationId).

func (*ClientWithResponses) SubmitFeedbackWithBodyWithResponse

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

SubmitFeedbackWithBodyWithResponse Submit feedback

Submits feedback or bug report.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /feedback (the `SubmitFeedback` operationId).

func (*ClientWithResponses) SubmitFeedbackWithResponse

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

SubmitFeedbackWithResponse Submit feedback

Submits feedback or bug report.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /feedback (the `SubmitFeedback` operationId).

func (*ClientWithResponses) UpdateMemberRoleWithBodyWithResponse added in v0.20.0

func (c *ClientWithResponses) UpdateMemberRoleWithBodyWithResponse(ctx context.Context, spaceID SpaceID, userID MemberUserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMemberRoleResponse, error)

UpdateMemberRoleWithBodyWithResponse Update a member's role

Changes a member's role within a space. The `owner` role cannot be granted, the owner's role cannot be changed, and callers cannot change their own role. Requires user authentication (JWT). API keys cannot manage members.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /spaces/{space_id}/members/{user_id}/role (the `UpdateMemberRole` operationId).

func (*ClientWithResponses) UpdateMemberRoleWithResponse added in v0.20.0

func (c *ClientWithResponses) UpdateMemberRoleWithResponse(ctx context.Context, spaceID SpaceID, userID MemberUserID, body UpdateMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMemberRoleResponse, error)

UpdateMemberRoleWithResponse Update a member's role

Changes a member's role within a space. The `owner` role cannot be granted, the owner's role cannot be changed, and callers cannot change their own role. Requires user authentication (JWT). API keys cannot manage members.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /spaces/{space_id}/members/{user_id}/role (the `UpdateMemberRole` operationId).

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 Update compute overage settings

Enables or disables compute overage billing for the space, optionally setting a monthly compute-minute cap above which standard databases auto-pause. Requires a user JWT and a payment method on file.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /spaces/{space_id}/overages (the `UpdateOverages` operationId).

func (*ClientWithResponses) UpdateOveragesWithResponse added in v0.17.0

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

UpdateOveragesWithResponse Update compute overage settings

Enables or disables compute overage billing for the space, optionally setting a monthly compute-minute cap above which standard databases auto-pause. Requires a user JWT and a payment method on file.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with PUT /spaces/{space_id}/overages (the `UpdateOverages` operationId).

func (*ClientWithResponses) UpdatePasswordWithBodyWithResponse

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

UpdatePasswordWithBodyWithResponse Update database password

Resets the database password.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/password (the `UpdatePassword` operationId).

func (*ClientWithResponses) UpdatePasswordWithResponse

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

UpdatePasswordWithResponse Update database password

Resets the database password.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /spaces/{space_id}/databases/{database_ref}/password (the `UpdatePassword` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// AnalyticsIdentifyWithBodyWithResponse Identify user
	//
	// Identifies a user for analytics.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /analytics/identify (the `AnalyticsIdentify` operationId).
	AnalyticsIdentifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnalyticsIdentifyResponse, error)

	// AnalyticsIdentifyWithResponse Identify user
	//
	// Identifies a user for analytics.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /analytics/identify (the `AnalyticsIdentify` operationId).
	AnalyticsIdentifyWithResponse(ctx context.Context, body AnalyticsIdentifyJSONRequestBody, reqEditors ...RequestEditorFn) (*AnalyticsIdentifyResponse, error)

	// AnalyticsTrackWithBodyWithResponse Track event
	//
	// Tracks an analytics event.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /analytics/track (the `AnalyticsTrack` operationId).
	AnalyticsTrackWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AnalyticsTrackResponse, error)

	// AnalyticsTrackWithResponse Track event
	//
	// Tracks an analytics event.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /analytics/track (the `AnalyticsTrack` operationId).
	AnalyticsTrackWithResponse(ctx context.Context, body AnalyticsTrackJSONRequestBody, reqEditors ...RequestEditorFn) (*AnalyticsTrackResponse, error)

	// AuthInfoWithResponse Get authentication info
	//
	// Returns info about the authenticated API key.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /auth/info (the `AuthInfo` operationId).
	AuthInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*AuthInfoResponse, error)

	// LogoutWithBodyWithResponse Log out
	//
	// Logs the user out by revoking the given refresh token.
	// Requires user authentication (JWT). API keys and project access tokens
	// cannot be used with this endpoint.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /auth/logout (the `Logout` operationId).
	LogoutWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LogoutResponse, error)

	// LogoutWithResponse Log out
	//
	// Logs the user out by revoking the given refresh token.
	// Requires user authentication (JWT). API keys and project access tokens
	// cannot be used with this endpoint.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /auth/logout (the `Logout` operationId).
	LogoutWithResponse(ctx context.Context, body LogoutJSONRequestBody, reqEditors ...RequestEditorFn) (*LogoutResponse, error)

	// SubmitFeedbackWithBodyWithResponse Submit feedback
	//
	// Submits feedback or bug report.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /feedback (the `SubmitFeedback` operationId).
	SubmitFeedbackWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SubmitFeedbackResponse, error)

	// SubmitFeedbackWithResponse Submit feedback
	//
	// Submits feedback or bug report.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /feedback (the `SubmitFeedback` operationId).
	SubmitFeedbackWithResponse(ctx context.Context, body SubmitFeedbackJSONRequestBody, reqEditors ...RequestEditorFn) (*SubmitFeedbackResponse, error)

	// HealthWithResponse Health check
	//
	// Returns 200 OK if the service is healthy.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /health (the `Health` operationId).
	HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error)

	// ListReceivedInvitesWithResponse List received invites
	//
	// Lists the pending invites the authenticated user has received, across
	// all spaces. Requires user authentication (JWT).
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /invites (the `ListReceivedInvites` operationId).
	ListReceivedInvitesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListReceivedInvitesResponse, error)

	// AcceptInviteWithResponse Accept a received invite
	//
	// Accepts the invite the authenticated user has received to the given
	// space, joining it. Requires user authentication (JWT).
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /invites/{space_id}/accept (the `AcceptInvite` operationId).
	AcceptInviteWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*AcceptInviteResponse, error)

	// DeclineInviteWithResponse Decline a received invite
	//
	// Declines the invite the authenticated user has received to the given
	// space. Requires user authentication (JWT).
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /invites/{space_id}/decline (the `DeclineInvite` operationId).
	DeclineInviteWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*DeclineInviteResponse, error)

	// GetPricingWithResponse Get pricing
	//
	// Returns current pricing.
	//
	// This endpoint is unauthenticated.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /pricing (the `GetPricing` operationId).
	GetPricingWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPricingResponse, error)

	// ListSpacesWithResponse List spaces
	//
	// Returns Ghost spaces accessible to the authenticated user.
	// For user JWTs, returns all Ghost spaces the user is a member of.
	// For API keys, returns the single space the key is scoped to.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces (the `ListSpaces` operationId).
	ListSpacesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListSpacesResponse, error)

	// CreateSpaceWithBodyWithResponse Create a space
	//
	// Creates a new Ghost space. Requires user authentication (JWT).
	// API keys cannot be used to create spaces.
	// When no name is provided, the space is named after its owner
	// (e.g. "Jane Doe's space").
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces (the `CreateSpace` operationId).
	CreateSpaceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSpaceResponse, error)

	// CreateSpaceWithResponse Create a space
	//
	// Creates a new Ghost space. Requires user authentication (JWT).
	// API keys cannot be used to create spaces.
	// When no name is provided, the space is named after its owner
	// (e.g. "Jane Doe's space").
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces (the `CreateSpace` operationId).
	CreateSpaceWithResponse(ctx context.Context, body CreateSpaceJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSpaceResponse, error)

	// GetSpaceWithResponse Get a space
	//
	// Returns details about a single space, including the owner and the
	// caller's role. For user JWTs the role and owner are populated; for API
	// keys they are omitted (the members lookup that resolves the owner is not
	// available to API keys).
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id} (the `GetSpace` operationId).
	GetSpaceWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*GetSpaceResponse, error)

	// ListAPIKeysWithResponse List API keys
	//
	// Lists all API keys for the specified space.
	// Requires user authentication (JWT). API keys cannot list other API keys.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/api_keys (the `ListAPIKeys` operationId).
	ListAPIKeysWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*ListAPIKeysResponse, error)

	// CreateAPIKeyWithBodyWithResponse Create an API key
	//
	// Creates a new API key (client credentials) for the specified space.
	// Requires user authentication (JWT). API keys cannot create other API keys.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/api_keys (the `CreateAPIKey` operationId).
	CreateAPIKeyWithBodyWithResponse(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAPIKeyResponse, error)

	// CreateAPIKeyWithResponse Create an API key
	//
	// Creates a new API key (client credentials) for the specified space.
	// Requires user authentication (JWT). API keys cannot create other API keys.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/api_keys (the `CreateAPIKey` operationId).
	CreateAPIKeyWithResponse(ctx context.Context, spaceID SpaceID, body CreateAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAPIKeyResponse, error)

	// DeleteAPIKeyWithResponse Delete an API key
	//
	// Deletes an API key from the specified space.
	// Requires user authentication (JWT). API keys cannot delete other API keys.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /spaces/{space_id}/api_keys/{prefix} (the `DeleteAPIKey` operationId).
	DeleteAPIKeyWithResponse(ctx context.Context, spaceID SpaceID, prefix APIKeyPrefix, reqEditors ...RequestEditorFn) (*DeleteAPIKeyResponse, error)

	// ListDatabasesWithResponse List databases
	//
	// Lists all databases in a space.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/databases (the `ListDatabases` operationId).
	ListDatabasesWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*ListDatabasesResponse, error)

	// CreateDatabaseWithBodyWithResponse Create a database
	//
	// Creates a new database in a space.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases (the `CreateDatabase` operationId).
	CreateDatabaseWithBodyWithResponse(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseResponse, error)

	// CreateDatabaseWithResponse Create a database
	//
	// Creates a new database in a space.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases (the `CreateDatabase` operationId).
	CreateDatabaseWithResponse(ctx context.Context, spaceID SpaceID, body CreateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseResponse, error)

	// DeleteDatabaseWithResponse Delete a database
	//
	// Deletes a database.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /spaces/{space_id}/databases/{database_ref} (the `DeleteDatabase` operationId).
	DeleteDatabaseWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*DeleteDatabaseResponse, error)

	// GetDatabaseWithResponse Get a database
	//
	// Gets a single database by ID or name.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/databases/{database_ref} (the `GetDatabase` operationId).
	GetDatabaseWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*GetDatabaseResponse, error)

	// ForkDatabaseWithBodyWithResponse Fork a database
	//
	// Forks an existing database.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/fork (the `ForkDatabase` operationId).
	ForkDatabaseWithBodyWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ForkDatabaseResponse, error)

	// ForkDatabaseWithResponse Fork a database
	//
	// Forks an existing database.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/fork (the `ForkDatabase` operationId).
	ForkDatabaseWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, body ForkDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*ForkDatabaseResponse, error)

	// DatabaseLogsWithResponse Get database logs
	//
	// Fetch logs for a specific database. Returns up to 500 log entries in
	// reverse chronological order. Supports cursor-based pagination via the
	// `cursor` parameter and the `last_cursor` field in the response.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/databases/{database_ref}/logs (the `DatabaseLogs` operationId).
	DatabaseLogsWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, params *DatabaseLogsParams, reqEditors ...RequestEditorFn) (*DatabaseLogsResponse, error)

	// UpdatePasswordWithBodyWithResponse Update database password
	//
	// Resets the database password.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/password (the `UpdatePassword` operationId).
	UpdatePasswordWithBodyWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdatePasswordResponse, error)

	// UpdatePasswordWithResponse Update database password
	//
	// Resets the database password.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/password (the `UpdatePassword` operationId).
	UpdatePasswordWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, body UpdatePasswordJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdatePasswordResponse, error)

	// PauseDatabaseWithResponse Pause a database
	//
	// Pauses a running database.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/pause (the `PauseDatabase` operationId).
	PauseDatabaseWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*PauseDatabaseResponse, error)

	// RenameDatabaseWithBodyWithResponse Rename a database
	//
	// Renames a database.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/rename (the `RenameDatabase` operationId).
	RenameDatabaseWithBodyWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenameDatabaseResponse, error)

	// RenameDatabaseWithResponse Rename a database
	//
	// Renames a database.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/rename (the `RenameDatabase` operationId).
	RenameDatabaseWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, body RenameDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*RenameDatabaseResponse, error)

	// ResumeDatabaseWithResponse Resume a database
	//
	// Resumes a paused database.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/resume (the `ResumeDatabase` operationId).
	ResumeDatabaseWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, reqEditors ...RequestEditorFn) (*ResumeDatabaseResponse, error)

	// ShareDatabaseWithBodyWithResponse Share a database
	//
	// Creates a shareable snapshot of a database. Returns a share token that can be used to create a new database from the snapshot in another space.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/share (the `ShareDatabase` operationId).
	ShareDatabaseWithBodyWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ShareDatabaseResponse, error)

	// ShareDatabaseWithResponse Share a database
	//
	// Creates a shareable snapshot of a database. Returns a share token that can be used to create a new database from the snapshot in another space.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/databases/{database_ref}/share (the `ShareDatabase` operationId).
	ShareDatabaseWithResponse(ctx context.Context, spaceID SpaceID, databaseRef DatabaseRef, body ShareDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*ShareDatabaseResponse, error)

	// ListInvitesWithResponse List sent invites
	//
	// Lists the pending invites that have been sent for a space.
	// Requires user authentication (JWT). API keys cannot manage invites.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/invites (the `ListInvites` operationId).
	ListInvitesWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*ListInvitesResponse, error)

	// CreateInviteWithBodyWithResponse Invite a user to a space
	//
	// Invites a user to a space by email address. The invitee accepts the
	// invitation with their own Ghost account.
	// Requires user authentication (JWT). API keys cannot manage invites.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/invites (the `CreateInvite` operationId).
	CreateInviteWithBodyWithResponse(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateInviteResponse, error)

	// CreateInviteWithResponse Invite a user to a space
	//
	// Invites a user to a space by email address. The invitee accepts the
	// invitation with their own Ghost account.
	// Requires user authentication (JWT). API keys cannot manage invites.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/invites (the `CreateInvite` operationId).
	CreateInviteWithResponse(ctx context.Context, spaceID SpaceID, body CreateInviteJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateInviteResponse, error)

	// CancelInviteWithResponse Cancel a sent invite
	//
	// Cancels the pending invite sent to the given email address for a space.
	// Requires user authentication (JWT). API keys cannot manage invites.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /spaces/{space_id}/invites/{email} (the `CancelInvite` operationId).
	CancelInviteWithResponse(ctx context.Context, spaceID SpaceID, email InviteEmail, reqEditors ...RequestEditorFn) (*CancelInviteResponse, error)

	// ListInvoicesWithResponse List invoices
	//
	// Lists the most recent invoices for a space.
	// Requires a user JWT; API keys are not authorized.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/invoices (the `ListInvoices` operationId).
	ListInvoicesWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*ListInvoicesResponse, error)

	// GetInvoiceWithResponse Get invoice detail
	//
	// Returns the line-item breakdown for a single invoice, looked up by the
	// invoice ID returned from `listInvoices`.
	// Requires a user JWT; API keys are not authorized.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/invoices/{invoice_id} (the `GetInvoice` operationId).
	GetInvoiceWithResponse(ctx context.Context, spaceID SpaceID, invoiceID InvoiceID, reqEditors ...RequestEditorFn) (*GetInvoiceResponse, error)

	// LeaveSpaceWithResponse Leave a space
	//
	// Removes the authenticated user from the space. Requires user
	// authentication (JWT). API keys cannot leave a space. The space owner
	// cannot leave their own space.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/leave (the `LeaveSpace` operationId).
	LeaveSpaceWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*LeaveSpaceResponse, error)

	// ListMembersWithResponse List space members
	//
	// Lists the members of a space.
	// Requires user authentication (JWT). API keys cannot manage members.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/members (the `ListMembers` operationId).
	ListMembersWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*ListMembersResponse, error)

	// RemoveMemberWithResponse Remove a member
	//
	// Removes a member from a space. The space owner cannot be removed,
	// and callers cannot remove themselves.
	// Requires user authentication (JWT). API keys cannot manage members.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /spaces/{space_id}/members/{user_id} (the `RemoveMember` operationId).
	RemoveMemberWithResponse(ctx context.Context, spaceID SpaceID, userID MemberUserID, reqEditors ...RequestEditorFn) (*RemoveMemberResponse, error)

	// UpdateMemberRoleWithBodyWithResponse Update a member's role
	//
	// Changes a member's role within a space. The `owner` role cannot be
	// granted, the owner's role cannot be changed, and callers cannot
	// change their own role.
	// Requires user authentication (JWT). API keys cannot manage members.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /spaces/{space_id}/members/{user_id}/role (the `UpdateMemberRole` operationId).
	UpdateMemberRoleWithBodyWithResponse(ctx context.Context, spaceID SpaceID, userID MemberUserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateMemberRoleResponse, error)

	// UpdateMemberRoleWithResponse Update a member's role
	//
	// Changes a member's role within a space. The `owner` role cannot be
	// granted, the owner's role cannot be changed, and callers cannot
	// change their own role.
	// Requires user authentication (JWT). API keys cannot manage members.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /spaces/{space_id}/members/{user_id}/role (the `UpdateMemberRole` operationId).
	UpdateMemberRoleWithResponse(ctx context.Context, spaceID SpaceID, userID MemberUserID, body UpdateMemberRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateMemberRoleResponse, error)

	// UpdateOveragesWithBodyWithResponse Update compute overage settings
	//
	// Enables or disables compute overage billing for the space, optionally
	// setting a monthly compute-minute cap above which standard databases
	// auto-pause. Requires a user JWT and a payment method on file.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /spaces/{space_id}/overages (the `UpdateOverages` operationId).
	UpdateOveragesWithBodyWithResponse(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateOveragesResponse, error)

	// UpdateOveragesWithResponse Update compute overage settings
	//
	// Enables or disables compute overage billing for the space, optionally
	// setting a monthly compute-minute cap above which standard databases
	// auto-pause. Requires a user JWT and a payment method on file.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /spaces/{space_id}/overages (the `UpdateOverages` operationId).
	UpdateOveragesWithResponse(ctx context.Context, spaceID SpaceID, body UpdateOveragesJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateOveragesResponse, error)

	// ListPaymentMethodsWithResponse List payment methods
	//
	// Lists payment methods on file for a space.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/payment (the `ListPaymentMethods` operationId).
	ListPaymentMethodsWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*ListPaymentMethodsResponse, error)

	// CreatePaymentMethodSetupWithResponse Create payment method setup
	//
	// Creates a Stripe Setup Intent for payment method collection and returns the client secret and payment page URL.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/payment (the `CreatePaymentMethodSetup` operationId).
	CreatePaymentMethodSetupWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*CreatePaymentMethodSetupResponse, error)

	// DeletePaymentMethodWithResponse Delete a payment method
	//
	// Deletes a payment method.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /spaces/{space_id}/payment/{payment_id} (the `DeletePaymentMethod` operationId).
	DeletePaymentMethodWithResponse(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*DeletePaymentMethodResponse, error)

	// GetPaymentMethodWithResponse Get a payment method
	//
	// Returns a single payment method by ID.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/payment/{payment_id} (the `GetPaymentMethod` operationId).
	GetPaymentMethodWithResponse(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*GetPaymentMethodResponse, error)

	// CancelPaymentMethodDeletionWithResponse Cancel pending payment method deletion
	//
	// Cancels a pending deletion for a payment method.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /spaces/{space_id}/payment/{payment_id}/deletion (the `CancelPaymentMethodDeletion` operationId).
	CancelPaymentMethodDeletionWithResponse(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*CancelPaymentMethodDeletionResponse, error)

	// SetPaymentMethodPrimaryWithResponse Set primary payment method
	//
	// Sets a payment method as the primary payment method for the space.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with PUT /spaces/{space_id}/payment/{payment_id}/primary (the `SetPaymentMethodPrimary` operationId).
	SetPaymentMethodPrimaryWithResponse(ctx context.Context, spaceID SpaceID, paymentID PaymentID, reqEditors ...RequestEditorFn) (*SetPaymentMethodPrimaryResponse, error)

	// RenameSpaceWithBodyWithResponse Rename a space
	//
	// Renames a space. Requires user authentication (JWT).
	// API keys cannot be used to rename spaces.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/rename (the `RenameSpace` operationId).
	RenameSpaceWithBodyWithResponse(ctx context.Context, spaceID SpaceID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenameSpaceResponse, error)

	// RenameSpaceWithResponse Rename a space
	//
	// Renames a space. Requires user authentication (JWT).
	// API keys cannot be used to rename spaces.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /spaces/{space_id}/rename (the `RenameSpace` operationId).
	RenameSpaceWithResponse(ctx context.Context, spaceID SpaceID, body RenameSpaceJSONRequestBody, reqEditors ...RequestEditorFn) (*RenameSpaceResponse, error)

	// ListSharesWithResponse List database shares
	//
	// Lists all shared snapshots for a space.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/shares (the `ListShares` operationId).
	ListSharesWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*ListSharesResponse, error)

	// RevokeShareWithResponse Revoke a database share
	//
	// Revokes a shared snapshot, deleting the underlying storage snapshot. The share is identified by its share token.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /spaces/{space_id}/shares/{share_token} (the `RevokeShare` operationId).
	RevokeShareWithResponse(ctx context.Context, spaceID SpaceID, shareToken ShareToken, reqEditors ...RequestEditorFn) (*RevokeShareResponse, error)

	// SpaceStatusWithResponse Get space usage (deprecated)
	//
	// Deprecated alias for `GET /spaces/{space_id}/usage`. Use the `/usage` endpoint instead.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/status (the `SpaceStatus` operationId).
	//
	// Deprecated: this operation has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	SpaceStatusWithResponse(ctx context.Context, spaceID SpaceID, reqEditors ...RequestEditorFn) (*SpaceStatusResponse, error)

	// SpaceUsageWithResponse Get space usage
	//
	// Returns compute usage, storage usage, and billing/cost information for a space.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /spaces/{space_id}/usage (the `SpaceUsage` operationId).
	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 added in v0.27.0

type CreateAPIKeyJSONRequestBody = CreateAPIKeyRequest

CreateAPIKeyJSONRequestBody defines body for CreateAPIKey for application/json ContentType.

type CreateAPIKeyRequest added in v0.27.0

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

CreateAPIKeyRequest Request to create a new API key in a space.

type CreateAPIKeyResponse added in v0.27.0

type CreateAPIKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *APIKeyCredentials
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseCreateAPIKeyResponse added in v0.27.0

func ParseCreateAPIKeyResponse(rsp *http.Response) (*CreateAPIKeyResponse, error)

ParseCreateAPIKeyResponse parses an HTTP response from a CreateAPIKeyWithResponse call

func (CreateAPIKeyResponse) ContentType added in v0.27.1

func (r CreateAPIKeyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateAPIKeyResponse) GetBody added in v0.27.1

func (r CreateAPIKeyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateAPIKeyResponse) GetJSON201 added in v0.27.1

func (r CreateAPIKeyResponse) GetJSON201() *APIKeyCredentials

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateAPIKeyResponse) GetJSONDefault added in v0.27.1

func (r CreateAPIKeyResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (CreateAPIKeyResponse) Status added in v0.27.0

func (r CreateAPIKeyResponse) Status() string

Status returns HTTPResponse.Status

func (CreateAPIKeyResponse) StatusCode added in v0.27.0

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 Request to create a new database in a space.

type CreateDatabaseResponse

type CreateDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON202 the response for an HTTP 202 `application/json` response
	JSON202 *Database
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseCreateDatabaseResponse

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

ParseCreateDatabaseResponse parses an HTTP response from a CreateDatabaseWithResponse call

func (CreateDatabaseResponse) ContentType added in v0.27.1

func (r CreateDatabaseResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateDatabaseResponse) GetBody added in v0.27.1

func (r CreateDatabaseResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateDatabaseResponse) GetJSON202 added in v0.27.1

func (r CreateDatabaseResponse) GetJSON202() *Database

GetJSON202 returns the response for an HTTP 202 `application/json` response

func (CreateDatabaseResponse) GetJSONDefault added in v0.27.1

func (r CreateDatabaseResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 CreateInviteJSONRequestBody added in v0.21.0

type CreateInviteJSONRequestBody = CreateInviteRequest

CreateInviteJSONRequestBody defines body for CreateInvite for application/json ContentType.

type CreateInviteRequest added in v0.21.0

type CreateInviteRequest struct {
	// Email Email address to invite.
	Email string `json:"email"`

	// Role A member's role within a space. The `owner` role belongs to the user
	// who created the space; every space has exactly one owner, so `owner`
	// is never accepted as an input when granting a role. On the `Space`
	// schema, this is the caller's own role in the space, omitted for
	// API-key authentication (API keys are space-scoped and carry no
	// member identity).
	Role *MemberRole `json:"role,omitempty"`
}

CreateInviteRequest Request to invite a user to a space.

type CreateInviteResponse added in v0.21.0

type CreateInviteResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *Invite
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseCreateInviteResponse added in v0.21.0

func ParseCreateInviteResponse(rsp *http.Response) (*CreateInviteResponse, error)

ParseCreateInviteResponse parses an HTTP response from a CreateInviteWithResponse call

func (CreateInviteResponse) ContentType added in v0.27.1

func (r CreateInviteResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateInviteResponse) GetBody added in v0.27.1

func (r CreateInviteResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateInviteResponse) GetJSON201 added in v0.27.1

func (r CreateInviteResponse) GetJSON201() *Invite

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateInviteResponse) GetJSONDefault added in v0.27.1

func (r CreateInviteResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (CreateInviteResponse) Status added in v0.21.0

func (r CreateInviteResponse) Status() string

Status returns HTTPResponse.Status

func (CreateInviteResponse) StatusCode added in v0.21.0

func (r CreateInviteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreatePaymentMethodSetupResponse

type CreatePaymentMethodSetupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *PaymentSetupResponse
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseCreatePaymentMethodSetupResponse

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

ParseCreatePaymentMethodSetupResponse parses an HTTP response from a CreatePaymentMethodSetupWithResponse call

func (CreatePaymentMethodSetupResponse) ContentType added in v0.27.1

func (r CreatePaymentMethodSetupResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreatePaymentMethodSetupResponse) GetBody added in v0.27.1

func (r CreatePaymentMethodSetupResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreatePaymentMethodSetupResponse) GetJSON200 added in v0.27.1

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (CreatePaymentMethodSetupResponse) GetJSONDefault added in v0.27.1

func (r CreatePaymentMethodSetupResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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. When omitted, the space is named after its owner (e.g. "Jane Doe's space").
	Name *string `json:"name,omitempty"`
}

CreateSpaceRequest Request to create a new space.

type CreateSpaceResponse

type CreateSpaceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *Space
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseCreateSpaceResponse

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

ParseCreateSpaceResponse parses an HTTP response from a CreateSpaceWithResponse call

func (CreateSpaceResponse) ContentType added in v0.27.1

func (r CreateSpaceResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateSpaceResponse) GetBody added in v0.27.1

func (r CreateSpaceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CreateSpaceResponse) GetJSON201 added in v0.27.1

func (r CreateSpaceResponse) GetJSON201() *Space

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (CreateSpaceResponse) GetJSONDefault added in v0.27.1

func (r CreateSpaceResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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,omitempty"`

	// 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 *int64 `json:"storage_mib,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"`
}

Database A Ghost database.

type DatabaseLogsParams

type DatabaseLogsParams struct {
	// Cursor Opaque pagination cursor returned as `last_cursor` in a previous
	// response. When provided, returns the next page of logs older than
	// the cursor position.
	Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`

	// Until Upper bound timestamp — return logs at or before this time (RFC3339 format, e.g., 2024-01-15T10:00:00Z). Defaults to now.
	Until *time.Time `form:"until,omitempty" json:"until,omitempty"`

	// Since Lower bound timestamp — fetch logs after this time (RFC3339 format, e.g., 2024-01-15T09:00:00Z)
	Since *time.Time `form:"since,omitempty" json:"since,omitempty"`

	// Search Full-text search terms to filter log lines. Repeat the parameter
	// for multiple values (e.g. `?search=slow+query&search=ERROR`).
	Search *[]string `form:"search,omitempty" json:"search,omitempty"`

	// Severity Severity levels to filter results. Repeat the parameter for multiple
	// values (e.g. `?severity=ERROR&severity=WARNING`). Common values
	// include `LOG`, `WARNING`, `ERROR`, and `FATAL`; PostgreSQL may also
	// emit `DEBUG*`, `INFO`, `NOTICE`, and `PANIC`.
	Severity *[]string `form:"severity,omitempty" json:"severity,omitempty"`
}

DatabaseLogsParams defines parameters for DatabaseLogs.

type DatabaseLogsResponse

type DatabaseLogsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *LogsResponse
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseDatabaseLogsResponse

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

ParseDatabaseLogsResponse parses an HTTP response from a DatabaseLogsWithResponse call

func (DatabaseLogsResponse) ContentType added in v0.27.1

func (r DatabaseLogsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DatabaseLogsResponse) GetBody added in v0.27.1

func (r DatabaseLogsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DatabaseLogsResponse) GetJSON200 added in v0.27.1

func (r DatabaseLogsResponse) GetJSON200() *LogsResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (DatabaseLogsResponse) GetJSONDefault added in v0.27.1

func (r DatabaseLogsResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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.

func (DatabaseSize) Valid added in v0.27.1

func (e DatabaseSize) Valid() bool

Valid indicates whether the value is a known member of the DatabaseSize enum.

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.

func (DatabaseStatus) Valid added in v0.27.1

func (e DatabaseStatus) Valid() bool

Valid indicates whether the value is a known member of the DatabaseStatus enum.

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.

func (DatabaseType) Valid added in v0.27.1

func (e DatabaseType) Valid() bool

Valid indicates whether the value is a known member of the DatabaseType enum.

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,omitempty"`

	// 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,omitempty"`

	// 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 *int64 `json:"storage_mib,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"`
}

DatabaseWithUsage A Ghost database with current billing-cycle usage included.

type DeclineInviteResponse added in v0.21.0

type DeclineInviteResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *InviteActionResult
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseDeclineInviteResponse added in v0.21.0

func ParseDeclineInviteResponse(rsp *http.Response) (*DeclineInviteResponse, error)

ParseDeclineInviteResponse parses an HTTP response from a DeclineInviteWithResponse call

func (DeclineInviteResponse) ContentType added in v0.27.1

func (r DeclineInviteResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeclineInviteResponse) GetBody added in v0.27.1

func (r DeclineInviteResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeclineInviteResponse) GetJSON200 added in v0.27.1

func (r DeclineInviteResponse) GetJSON200() *InviteActionResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (DeclineInviteResponse) GetJSONDefault added in v0.27.1

func (r DeclineInviteResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (DeclineInviteResponse) Status added in v0.21.0

func (r DeclineInviteResponse) Status() string

Status returns HTTPResponse.Status

func (DeclineInviteResponse) StatusCode added in v0.21.0

func (r DeclineInviteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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 added in v0.27.0

type DeleteAPIKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseDeleteAPIKeyResponse added in v0.27.0

func ParseDeleteAPIKeyResponse(rsp *http.Response) (*DeleteAPIKeyResponse, error)

ParseDeleteAPIKeyResponse parses an HTTP response from a DeleteAPIKeyWithResponse call

func (DeleteAPIKeyResponse) ContentType added in v0.27.1

func (r DeleteAPIKeyResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteAPIKeyResponse) GetBody added in v0.27.1

func (r DeleteAPIKeyResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteAPIKeyResponse) GetJSONDefault added in v0.27.1

func (r DeleteAPIKeyResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (DeleteAPIKeyResponse) Status added in v0.27.0

func (r DeleteAPIKeyResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteAPIKeyResponse) StatusCode added in v0.27.0

func (r DeleteAPIKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteDatabaseResponse

type DeleteDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON202 the response for an HTTP 202 `application/json` response
	JSON202 *Database
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseDeleteDatabaseResponse

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

ParseDeleteDatabaseResponse parses an HTTP response from a DeleteDatabaseWithResponse call

func (DeleteDatabaseResponse) ContentType added in v0.27.1

func (r DeleteDatabaseResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteDatabaseResponse) GetBody added in v0.27.1

func (r DeleteDatabaseResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteDatabaseResponse) GetJSON202 added in v0.27.1

func (r DeleteDatabaseResponse) GetJSON202() *Database

GetJSON202 returns the response for an HTTP 202 `application/json` response

func (DeleteDatabaseResponse) GetJSONDefault added in v0.27.1

func (r DeleteDatabaseResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseDeletePaymentMethodResponse

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

ParseDeletePaymentMethodResponse parses an HTTP response from a DeletePaymentMethodWithResponse call

func (DeletePaymentMethodResponse) ContentType added in v0.27.1

func (r DeletePaymentMethodResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeletePaymentMethodResponse) GetBody added in v0.27.1

func (r DeletePaymentMethodResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeletePaymentMethodResponse) GetJSONDefault added in v0.27.1

func (r DeletePaymentMethodResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (DeletePaymentMethodResponse) Status

Status returns HTTPResponse.Status

func (DeletePaymentMethodResponse) StatusCode

func (r DeletePaymentMethodResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Error

type Error struct {
	// Code Machine-readable error code identifying a specific, client-actionable
	// error condition. Clients can match on this to react to specific errors
	// without parsing the human-readable message. Errors without a recognized
	// code omit this field.
	Code *ErrorCode `json:"code,omitempty"`

	// 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 ErrorCode added in v0.22.0

type ErrorCode string

ErrorCode Machine-readable error code identifying a specific, client-actionable error condition. Clients can match on this to react to specific errors without parsing the human-readable message. Errors without a recognized code omit this field.

const (
	ErrorCodeComputeLimitExceeded ErrorCode = "compute_limit_exceeded"
	ErrorCodeNoPaymentMethod      ErrorCode = "no_payment_method"
	ErrorCodeSignupsDisabled      ErrorCode = "signups_disabled"
)

Defines values for ErrorCode.

func (ErrorCode) Valid added in v0.27.1

func (e ErrorCode) Valid() bool

Valid indicates whether the value is a known member of the ErrorCode enum.

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 the response for an HTTP 202 `application/json` response
	JSON202 *Database
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseForkDatabaseResponse

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

ParseForkDatabaseResponse parses an HTTP response from a ForkDatabaseWithResponse call

func (ForkDatabaseResponse) ContentType added in v0.27.1

func (r ForkDatabaseResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ForkDatabaseResponse) GetBody added in v0.27.1

func (r ForkDatabaseResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ForkDatabaseResponse) GetJSON202 added in v0.27.1

func (r ForkDatabaseResponse) GetJSON202() *Database

GetJSON202 returns the response for an HTTP 202 `application/json` response

func (ForkDatabaseResponse) GetJSONDefault added in v0.27.1

func (r ForkDatabaseResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 the response for an HTTP 200 `application/json` response
	JSON200 *Database
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseGetDatabaseResponse

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

ParseGetDatabaseResponse parses an HTTP response from a GetDatabaseWithResponse call

func (GetDatabaseResponse) ContentType added in v0.27.1

func (r GetDatabaseResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetDatabaseResponse) GetBody added in v0.27.1

func (r GetDatabaseResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetDatabaseResponse) GetJSON200 added in v0.27.1

func (r GetDatabaseResponse) GetJSON200() *Database

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetDatabaseResponse) GetJSONDefault added in v0.27.1

func (r GetDatabaseResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 the response for an HTTP 200 `application/json` response
	JSON200 *InvoiceDetail
	// JSONDefault the response for an HTTP default `application/json` response
	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) ContentType added in v0.27.1

func (r GetInvoiceResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetInvoiceResponse) GetBody added in v0.27.1

func (r GetInvoiceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetInvoiceResponse) GetJSON200 added in v0.27.1

func (r GetInvoiceResponse) GetJSON200() *InvoiceDetail

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetInvoiceResponse) GetJSONDefault added in v0.27.1

func (r GetInvoiceResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 the response for an HTTP 200 `application/json` response
	JSON200 *PaymentMethod
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseGetPaymentMethodResponse

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

ParseGetPaymentMethodResponse parses an HTTP response from a GetPaymentMethodWithResponse call

func (GetPaymentMethodResponse) ContentType added in v0.27.1

func (r GetPaymentMethodResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetPaymentMethodResponse) GetBody added in v0.27.1

func (r GetPaymentMethodResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetPaymentMethodResponse) GetJSON200 added in v0.27.1

func (r GetPaymentMethodResponse) GetJSON200() *PaymentMethod

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetPaymentMethodResponse) GetJSONDefault added in v0.27.1

func (r GetPaymentMethodResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 the response for an HTTP 200 `application/json` response
	JSON200 *Pricing
	// JSONDefault the response for an HTTP default `application/json` response
	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) ContentType added in v0.27.1

func (r GetPricingResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetPricingResponse) GetBody added in v0.27.1

func (r GetPricingResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetPricingResponse) GetJSON200 added in v0.27.1

func (r GetPricingResponse) GetJSON200() *Pricing

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetPricingResponse) GetJSONDefault added in v0.27.1

func (r GetPricingResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 GetSpaceResponse added in v0.23.0

type GetSpaceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *SpaceDetail
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseGetSpaceResponse added in v0.23.0

func ParseGetSpaceResponse(rsp *http.Response) (*GetSpaceResponse, error)

ParseGetSpaceResponse parses an HTTP response from a GetSpaceWithResponse call

func (GetSpaceResponse) ContentType added in v0.27.1

func (r GetSpaceResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetSpaceResponse) GetBody added in v0.27.1

func (r GetSpaceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetSpaceResponse) GetJSON200 added in v0.27.1

func (r GetSpaceResponse) GetJSON200() *SpaceDetail

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetSpaceResponse) GetJSONDefault added in v0.27.1

func (r GetSpaceResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (GetSpaceResponse) Status added in v0.23.0

func (r GetSpaceResponse) Status() string

Status returns HTTPResponse.Status

func (GetSpaceResponse) StatusCode added in v0.23.0

func (r GetSpaceResponse) 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) ContentType added in v0.27.1

func (r HealthResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (HealthResponse) GetBody added in v0.27.1

func (r HealthResponse) GetBody() []byte

GetBody returns the raw response body bytes

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 Invite added in v0.21.0

type Invite struct {
	// CreatedAt When the invite was created.
	CreatedAt time.Time `json:"created_at"`

	// Email Email address the invite was sent to.
	Email string `json:"email"`

	// Role A member's role within a space. The `owner` role belongs to the user
	// who created the space; every space has exactly one owner, so `owner`
	// is never accepted as an input when granting a role. On the `Space`
	// schema, this is the caller's own role in the space, omitted for
	// API-key authentication (API keys are space-scoped and carry no
	// member identity).
	Role MemberRole `json:"role"`

	// Status Status of a sent invite. `pending` means it's still awaiting a
	// response; `declined` means the invitee declined it. A declined invite
	// still occupies the email's slot for the space (one pending-or-declined
	// invite per email), so it must be cancelled before that email can be
	// re-invited.
	Status InviteStatus `json:"status"`
}

Invite An invite sent for a space.

type InviteActionResult added in v0.21.0

type InviteActionResult struct {
	// SpaceID ID of the space the invite was for.
	SpaceID string `json:"space_id"`

	// SpaceName Name of the space the invite was for.
	SpaceName string `json:"space_name"`
}

InviteActionResult Result of accepting or declining a received invite.

type InviteEmail added in v0.21.0

type InviteEmail = string

InviteEmail defines model for InviteEmail.

type InviteStatus added in v0.21.0

type InviteStatus string

InviteStatus Status of a sent invite. `pending` means it's still awaiting a response; `declined` means the invitee declined it. A declined invite still occupies the email's slot for the space (one pending-or-declined invite per email), so it must be cancelled before that email can be re-invited.

const (
	InviteStatusDeclined InviteStatus = "declined"
	InviteStatusPending  InviteStatus = "pending"
)

Defines values for InviteStatus.

func (InviteStatus) Valid added in v0.27.1

func (e InviteStatus) Valid() bool

Valid indicates whether the value is a known member of the InviteStatus enum.

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 InvoiceID added in v0.27.0

type InvoiceID = string

InvoiceID defines model for InvoiceId.

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 A single line item on an invoice.

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.

func (InvoiceStatus) Valid added in v0.27.1

func (e InvoiceStatus) Valid() bool

Valid indicates whether the value is a known member of the InvoiceStatus enum.

type InvoicesResponse added in v0.10.0

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

InvoicesResponse A list of invoices for a space.

type LeaveSpaceResponse added in v0.24.0

type LeaveSpaceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *LeaveSpaceResult
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseLeaveSpaceResponse added in v0.24.0

func ParseLeaveSpaceResponse(rsp *http.Response) (*LeaveSpaceResponse, error)

ParseLeaveSpaceResponse parses an HTTP response from a LeaveSpaceWithResponse call

func (LeaveSpaceResponse) ContentType added in v0.27.1

func (r LeaveSpaceResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (LeaveSpaceResponse) GetBody added in v0.27.1

func (r LeaveSpaceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (LeaveSpaceResponse) GetJSON200 added in v0.27.1

func (r LeaveSpaceResponse) GetJSON200() *LeaveSpaceResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (LeaveSpaceResponse) GetJSONDefault added in v0.27.1

func (r LeaveSpaceResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (LeaveSpaceResponse) Status added in v0.24.0

func (r LeaveSpaceResponse) Status() string

Status returns HTTPResponse.Status

func (LeaveSpaceResponse) StatusCode added in v0.24.0

func (r LeaveSpaceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LeaveSpaceResult added in v0.24.0

type LeaveSpaceResult struct {
	// SpaceID ID of the space the user left.
	SpaceID string `json:"space_id"`

	// SpaceName Name of the space the user left.
	SpaceName string `json:"space_name"`
}

LeaveSpaceResult Result of leaving a space.

type ListAPIKeysResponse added in v0.27.0

type ListAPIKeysResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]APIKey
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseListAPIKeysResponse added in v0.27.0

func ParseListAPIKeysResponse(rsp *http.Response) (*ListAPIKeysResponse, error)

ParseListAPIKeysResponse parses an HTTP response from a ListAPIKeysWithResponse call

func (ListAPIKeysResponse) ContentType added in v0.27.1

func (r ListAPIKeysResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListAPIKeysResponse) GetBody added in v0.27.1

func (r ListAPIKeysResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListAPIKeysResponse) GetJSON200 added in v0.27.1

func (r ListAPIKeysResponse) GetJSON200() *[]APIKey

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListAPIKeysResponse) GetJSONDefault added in v0.27.1

func (r ListAPIKeysResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (ListAPIKeysResponse) Status added in v0.27.0

func (r ListAPIKeysResponse) Status() string

Status returns HTTPResponse.Status

func (ListAPIKeysResponse) StatusCode added in v0.27.0

func (r ListAPIKeysResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListDatabasesResponse

type ListDatabasesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]DatabaseWithUsage
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseListDatabasesResponse

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

ParseListDatabasesResponse parses an HTTP response from a ListDatabasesWithResponse call

func (ListDatabasesResponse) ContentType added in v0.27.1

func (r ListDatabasesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListDatabasesResponse) GetBody added in v0.27.1

func (r ListDatabasesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListDatabasesResponse) GetJSON200 added in v0.27.1

func (r ListDatabasesResponse) GetJSON200() *[]DatabaseWithUsage

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListDatabasesResponse) GetJSONDefault added in v0.27.1

func (r ListDatabasesResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 ListInvitesResponse added in v0.21.0

type ListInvitesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]Invite
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseListInvitesResponse added in v0.21.0

func ParseListInvitesResponse(rsp *http.Response) (*ListInvitesResponse, error)

ParseListInvitesResponse parses an HTTP response from a ListInvitesWithResponse call

func (ListInvitesResponse) ContentType added in v0.27.1

func (r ListInvitesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListInvitesResponse) GetBody added in v0.27.1

func (r ListInvitesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListInvitesResponse) GetJSON200 added in v0.27.1

func (r ListInvitesResponse) GetJSON200() *[]Invite

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListInvitesResponse) GetJSONDefault added in v0.27.1

func (r ListInvitesResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (ListInvitesResponse) Status added in v0.21.0

func (r ListInvitesResponse) Status() string

Status returns HTTPResponse.Status

func (ListInvitesResponse) StatusCode added in v0.21.0

func (r ListInvitesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListInvoicesResponse added in v0.10.0

type ListInvoicesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *InvoicesResponse
	// JSONDefault the response for an HTTP default `application/json` response
	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) ContentType added in v0.27.1

func (r ListInvoicesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListInvoicesResponse) GetBody added in v0.27.1

func (r ListInvoicesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListInvoicesResponse) GetJSON200 added in v0.27.1

func (r ListInvoicesResponse) GetJSON200() *InvoicesResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListInvoicesResponse) GetJSONDefault added in v0.27.1

func (r ListInvoicesResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 ListMembersResponse added in v0.20.0

type ListMembersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]Member
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseListMembersResponse added in v0.20.0

func ParseListMembersResponse(rsp *http.Response) (*ListMembersResponse, error)

ParseListMembersResponse parses an HTTP response from a ListMembersWithResponse call

func (ListMembersResponse) ContentType added in v0.27.1

func (r ListMembersResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListMembersResponse) GetBody added in v0.27.1

func (r ListMembersResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListMembersResponse) GetJSON200 added in v0.27.1

func (r ListMembersResponse) GetJSON200() *[]Member

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListMembersResponse) GetJSONDefault added in v0.27.1

func (r ListMembersResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (ListMembersResponse) Status added in v0.20.0

func (r ListMembersResponse) Status() string

Status returns HTTPResponse.Status

func (ListMembersResponse) StatusCode added in v0.20.0

func (r ListMembersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListPaymentMethodsResponse

type ListPaymentMethodsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *PaymentMethodsResponse
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseListPaymentMethodsResponse

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

ParseListPaymentMethodsResponse parses an HTTP response from a ListPaymentMethodsWithResponse call

func (ListPaymentMethodsResponse) ContentType added in v0.27.1

func (r ListPaymentMethodsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListPaymentMethodsResponse) GetBody added in v0.27.1

func (r ListPaymentMethodsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListPaymentMethodsResponse) GetJSON200 added in v0.27.1

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListPaymentMethodsResponse) GetJSONDefault added in v0.27.1

func (r ListPaymentMethodsResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (ListPaymentMethodsResponse) Status

Status returns HTTPResponse.Status

func (ListPaymentMethodsResponse) StatusCode

func (r ListPaymentMethodsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListReceivedInvitesResponse added in v0.21.0

type ListReceivedInvitesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]ReceivedInvite
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseListReceivedInvitesResponse added in v0.21.0

func ParseListReceivedInvitesResponse(rsp *http.Response) (*ListReceivedInvitesResponse, error)

ParseListReceivedInvitesResponse parses an HTTP response from a ListReceivedInvitesWithResponse call

func (ListReceivedInvitesResponse) ContentType added in v0.27.1

func (r ListReceivedInvitesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListReceivedInvitesResponse) GetBody added in v0.27.1

func (r ListReceivedInvitesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListReceivedInvitesResponse) GetJSON200 added in v0.27.1

func (r ListReceivedInvitesResponse) GetJSON200() *[]ReceivedInvite

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListReceivedInvitesResponse) GetJSONDefault added in v0.27.1

func (r ListReceivedInvitesResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (ListReceivedInvitesResponse) Status added in v0.21.0

Status returns HTTPResponse.Status

func (ListReceivedInvitesResponse) StatusCode added in v0.21.0

func (r ListReceivedInvitesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListSharesResponse added in v0.10.0

type ListSharesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *[]DatabaseShare
	// JSONDefault the response for an HTTP default `application/json` response
	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) ContentType added in v0.27.1

func (r ListSharesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListSharesResponse) GetBody added in v0.27.1

func (r ListSharesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListSharesResponse) GetJSON200 added in v0.27.1

func (r ListSharesResponse) GetJSON200() *[]DatabaseShare

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListSharesResponse) GetJSONDefault added in v0.27.1

func (r ListSharesResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 the response for an HTTP 200 `application/json` response
	JSON200 *[]Space
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseListSpacesResponse

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

ParseListSpacesResponse parses an HTTP response from a ListSpacesWithResponse call

func (ListSpacesResponse) ContentType added in v0.27.1

func (r ListSpacesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListSpacesResponse) GetBody added in v0.27.1

func (r ListSpacesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListSpacesResponse) GetJSON200 added in v0.27.1

func (r ListSpacesResponse) GetJSON200() *[]Space

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListSpacesResponse) GetJSONDefault added in v0.27.1

func (r ListSpacesResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 LogEntry added in v0.18.0

type LogEntry struct {
	// Message Log message text
	Message string `json:"message"`

	// Severity PostgreSQL severity level (e.g. LOG, WARNING, ERROR, FATAL)
	Severity string `json:"severity"`

	// Timestamp Timestamp of the log entry (RFC3339 format, with nanosecond precision)
	Timestamp time.Time `json:"timestamp"`
}

LogEntry A single database log entry.

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 Request to log out by revoking a refresh token.

type LogoutResponse

type LogoutResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseLogoutResponse

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

ParseLogoutResponse parses an HTTP response from a LogoutWithResponse call

func (LogoutResponse) ContentType added in v0.27.1

func (r LogoutResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (LogoutResponse) GetBody added in v0.27.1

func (r LogoutResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (LogoutResponse) GetJSONDefault added in v0.27.1

func (r LogoutResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 {
	// Entries Log entries, most recent first.
	Entries []LogEntry `json:"entries"`

	// LastCursor Opaque cursor for the next page of results. Present when more log
	// entries exist older than the last entry in this response. Pass
	// this value as the `cursor` query parameter to retrieve the next
	// page. Absent when there are no further results.
	LastCursor *string `json:"last_cursor,omitempty"`
}

LogsResponse A page of database log entries.

type Member added in v0.20.0

type Member struct {
	// Email Email address of the member.
	Email string `json:"email"`

	// Name Display name of the member.
	Name string `json:"name"`

	// Role A member's role within a space. The `owner` role belongs to the user
	// who created the space; every space has exactly one owner, so `owner`
	// is never accepted as an input when granting a role. On the `Space`
	// schema, this is the caller's own role in the space, omitted for
	// API-key authentication (API keys are space-scoped and carry no
	// member identity).
	Role MemberRole `json:"role"`

	// UserID User ID of the member.
	UserID int64 `json:"user_id"`
}

Member A member of a Ghost space.

type MemberRole added in v0.20.0

type MemberRole string

MemberRole A member's role within a space. The `owner` role belongs to the user who created the space; every space has exactly one owner, so `owner` is never accepted as an input when granting a role. On the `Space` schema, this is the caller's own role in the space, omitted for API-key authentication (API keys are space-scoped and carry no member identity).

const (
	MemberRoleAdmin     MemberRole = "admin"
	MemberRoleDeveloper MemberRole = "developer"
	MemberRoleOwner     MemberRole = "owner"
	MemberRoleViewer    MemberRole = "viewer"
)

Defines values for MemberRole.

func (MemberRole) Valid added in v0.27.1

func (e MemberRole) Valid() bool

Valid indicates whether the value is a known member of the MemberRole enum.

type MemberUserID added in v0.27.0

type MemberUserID = int64

MemberUserID defines model for MemberUserId.

type PauseDatabaseResponse

type PauseDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON202 the response for an HTTP 202 `application/json` response
	JSON202 *Database
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParsePauseDatabaseResponse

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

ParsePauseDatabaseResponse parses an HTTP response from a PauseDatabaseWithResponse call

func (PauseDatabaseResponse) ContentType added in v0.27.1

func (r PauseDatabaseResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (PauseDatabaseResponse) GetBody added in v0.27.1

func (r PauseDatabaseResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (PauseDatabaseResponse) GetJSON202 added in v0.27.1

func (r PauseDatabaseResponse) GetJSON202() *Database

GetJSON202 returns the response for an HTTP 202 `application/json` response

func (PauseDatabaseResponse) GetJSONDefault added in v0.27.1

func (r PauseDatabaseResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 added in v0.27.0

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 A list of payment methods on file for a space.

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 ReceivedInvite added in v0.21.0

type ReceivedInvite struct {
	// CreatedAt When the invite was created.
	CreatedAt time.Time `json:"created_at"`

	// InviterEmail Email address of the user who sent the invite.
	InviterEmail string `json:"inviter_email"`

	// InviterName Display name of the user who sent the invite.
	InviterName string `json:"inviter_name"`

	// Role A member's role within a space. The `owner` role belongs to the user
	// who created the space; every space has exactly one owner, so `owner`
	// is never accepted as an input when granting a role. On the `Space`
	// schema, this is the caller's own role in the space, omitted for
	// API-key authentication (API keys are space-scoped and carry no
	// member identity).
	Role MemberRole `json:"role"`

	// SpaceID ID of the space the user is invited to.
	SpaceID string `json:"space_id"`

	// SpaceName Name of the space the user is invited to.
	SpaceName string `json:"space_name"`
}

ReceivedInvite A pending invite the authenticated user has received.

type RemoveMemberResponse added in v0.20.0

type RemoveMemberResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Member
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseRemoveMemberResponse added in v0.20.0

func ParseRemoveMemberResponse(rsp *http.Response) (*RemoveMemberResponse, error)

ParseRemoveMemberResponse parses an HTTP response from a RemoveMemberWithResponse call

func (RemoveMemberResponse) ContentType added in v0.27.1

func (r RemoveMemberResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RemoveMemberResponse) GetBody added in v0.27.1

func (r RemoveMemberResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RemoveMemberResponse) GetJSON200 added in v0.27.1

func (r RemoveMemberResponse) GetJSON200() *Member

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (RemoveMemberResponse) GetJSONDefault added in v0.27.1

func (r RemoveMemberResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (RemoveMemberResponse) Status added in v0.20.0

func (r RemoveMemberResponse) Status() string

Status returns HTTPResponse.Status

func (RemoveMemberResponse) StatusCode added in v0.20.0

func (r RemoveMemberResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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 Request to rename a database.

type RenameDatabaseResponse

type RenameDatabaseResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseRenameDatabaseResponse

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

ParseRenameDatabaseResponse parses an HTTP response from a RenameDatabaseWithResponse call

func (RenameDatabaseResponse) ContentType added in v0.27.1

func (r RenameDatabaseResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RenameDatabaseResponse) GetBody added in v0.27.1

func (r RenameDatabaseResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RenameDatabaseResponse) GetJSONDefault added in v0.27.1

func (r RenameDatabaseResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 RenameSpaceJSONRequestBody added in v0.20.0

type RenameSpaceJSONRequestBody = RenameSpaceRequest

RenameSpaceJSONRequestBody defines body for RenameSpace for application/json ContentType.

type RenameSpaceRequest added in v0.20.0

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

RenameSpaceRequest Request to rename a space.

type RenameSpaceResponse added in v0.20.0

type RenameSpaceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *RenameSpaceResult
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseRenameSpaceResponse added in v0.20.0

func ParseRenameSpaceResponse(rsp *http.Response) (*RenameSpaceResponse, error)

ParseRenameSpaceResponse parses an HTTP response from a RenameSpaceWithResponse call

func (RenameSpaceResponse) ContentType added in v0.27.1

func (r RenameSpaceResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RenameSpaceResponse) GetBody added in v0.27.1

func (r RenameSpaceResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RenameSpaceResponse) GetJSON200 added in v0.27.1

func (r RenameSpaceResponse) GetJSON200() *RenameSpaceResult

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (RenameSpaceResponse) GetJSONDefault added in v0.27.1

func (r RenameSpaceResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (RenameSpaceResponse) Status added in v0.20.0

func (r RenameSpaceResponse) Status() string

Status returns HTTPResponse.Status

func (RenameSpaceResponse) StatusCode added in v0.20.0

func (r RenameSpaceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RenameSpaceResult added in v0.20.0

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

	// NewName Space name after the rename.
	NewName string `json:"new_name"`

	// OldName Space name before the rename.
	OldName string `json:"old_name"`
}

RenameSpaceResult Result of renaming a space.

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 the response for an HTTP 202 `application/json` response
	JSON202 *Database
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseResumeDatabaseResponse

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

ParseResumeDatabaseResponse parses an HTTP response from a ResumeDatabaseWithResponse call

func (ResumeDatabaseResponse) ContentType added in v0.27.1

func (r ResumeDatabaseResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ResumeDatabaseResponse) GetBody added in v0.27.1

func (r ResumeDatabaseResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ResumeDatabaseResponse) GetJSON202 added in v0.27.1

func (r ResumeDatabaseResponse) GetJSON202() *Database

GetJSON202 returns the response for an HTTP 202 `application/json` response

func (ResumeDatabaseResponse) GetJSONDefault added in v0.27.1

func (r ResumeDatabaseResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 the response for an HTTP 200 `application/json` response
	JSON200 *DatabaseShare
	// JSONDefault the response for an HTTP default `application/json` response
	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) ContentType added in v0.27.1

func (r RevokeShareResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RevokeShareResponse) GetBody added in v0.27.1

func (r RevokeShareResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (RevokeShareResponse) GetJSON200 added in v0.27.1

func (r RevokeShareResponse) GetJSON200() *DatabaseShare

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (RevokeShareResponse) GetJSONDefault added in v0.27.1

func (r RevokeShareResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseSetPaymentMethodPrimaryResponse

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

ParseSetPaymentMethodPrimaryResponse parses an HTTP response from a SetPaymentMethodPrimaryWithResponse call

func (SetPaymentMethodPrimaryResponse) ContentType added in v0.27.1

func (r SetPaymentMethodPrimaryResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (SetPaymentMethodPrimaryResponse) GetBody added in v0.27.1

func (r SetPaymentMethodPrimaryResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (SetPaymentMethodPrimaryResponse) GetJSONDefault added in v0.27.1

func (r SetPaymentMethodPrimaryResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 the response for an HTTP 201 `application/json` response
	JSON201 *DatabaseShare
	// JSONDefault the response for an HTTP default `application/json` response
	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) ContentType added in v0.27.1

func (r ShareDatabaseResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ShareDatabaseResponse) GetBody added in v0.27.1

func (r ShareDatabaseResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ShareDatabaseResponse) GetJSON201 added in v0.27.1

func (r ShareDatabaseResponse) GetJSON201() *DatabaseShare

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (ShareDatabaseResponse) GetJSONDefault added in v0.27.1

func (r ShareDatabaseResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 ShareToken added in v0.24.0

type ShareToken = string

ShareToken defines model for ShareToken.

type Space

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

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

	// Role A member's role within a space. The `owner` role belongs to the user
	// who created the space; every space has exactly one owner, so `owner`
	// is never accepted as an input when granting a role. On the `Space`
	// schema, this is the caller's own role in the space, omitted for
	// API-key authentication (API keys are space-scoped and carry no
	// member identity).
	Role *MemberRole `json:"role,omitempty"`
}

Space A Ghost space.

type SpaceDetail added in v0.23.0

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

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

	// Owner The space owner. Populated for user authentication; omitted for API key authentication.
	Owner *Member `json:"owner,omitempty"`

	// Role The caller's role in the space. Populated for user authentication; omitted for API key authentication.
	Role *MemberRole `json:"role,omitempty"`
}

SpaceDetail Detailed information about a single Ghost space.

type SpaceID added in v0.27.0

type SpaceID = string

SpaceID defines model for SpaceId.

type SpaceStatusResponse

type SpaceStatusResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *SpaceUsage
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseSpaceStatusResponse

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

ParseSpaceStatusResponse parses an HTTP response from a SpaceStatusWithResponse call

func (SpaceStatusResponse) ContentType added in v0.27.1

func (r SpaceStatusResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (SpaceStatusResponse) GetBody added in v0.27.1

func (r SpaceStatusResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (SpaceStatusResponse) GetJSON200 added in v0.27.1

func (r SpaceStatusResponse) GetJSON200() *SpaceUsage

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (SpaceStatusResponse) GetJSONDefault added in v0.27.1

func (r SpaceStatusResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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,omitempty"`

	// 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 the response for an HTTP 200 `application/json` response
	JSON200 *SpaceUsage
	// JSONDefault the response for an HTTP default `application/json` response
	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) ContentType added in v0.27.1

func (r SpaceUsageResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (SpaceUsageResponse) GetBody added in v0.27.1

func (r SpaceUsageResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (SpaceUsageResponse) GetJSON200 added in v0.27.1

func (r SpaceUsageResponse) GetJSON200() *SpaceUsage

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (SpaceUsageResponse) GetJSONDefault added in v0.27.1

func (r SpaceUsageResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 the response for an HTTP 200 `application/json` response
	JSON200 *StatusResponse
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseSubmitFeedbackResponse

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

ParseSubmitFeedbackResponse parses an HTTP response from a SubmitFeedbackWithResponse call

func (SubmitFeedbackResponse) ContentType added in v0.27.1

func (r SubmitFeedbackResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (SubmitFeedbackResponse) GetBody added in v0.27.1

func (r SubmitFeedbackResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (SubmitFeedbackResponse) GetJSON200 added in v0.27.1

func (r SubmitFeedbackResponse) GetJSON200() *StatusResponse

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (SubmitFeedbackResponse) GetJSONDefault added in v0.27.1

func (r SubmitFeedbackResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 UpdateMemberRoleJSONRequestBody added in v0.20.0

type UpdateMemberRoleJSONRequestBody = UpdateMemberRoleRequest

UpdateMemberRoleJSONRequestBody defines body for UpdateMemberRole for application/json ContentType.

type UpdateMemberRoleRequest added in v0.20.0

type UpdateMemberRoleRequest struct {
	// Role A member's role within a space. The `owner` role belongs to the user
	// who created the space; every space has exactly one owner, so `owner`
	// is never accepted as an input when granting a role. On the `Space`
	// schema, this is the caller's own role in the space, omitted for
	// API-key authentication (API keys are space-scoped and carry no
	// member identity).
	Role MemberRole `json:"role"`
}

UpdateMemberRoleRequest Request to change a member's role within a space.

type UpdateMemberRoleResponse added in v0.20.0

type UpdateMemberRoleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Member
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseUpdateMemberRoleResponse added in v0.20.0

func ParseUpdateMemberRoleResponse(rsp *http.Response) (*UpdateMemberRoleResponse, error)

ParseUpdateMemberRoleResponse parses an HTTP response from a UpdateMemberRoleWithResponse call

func (UpdateMemberRoleResponse) ContentType added in v0.27.1

func (r UpdateMemberRoleResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateMemberRoleResponse) GetBody added in v0.27.1

func (r UpdateMemberRoleResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UpdateMemberRoleResponse) GetJSON200 added in v0.27.1

func (r UpdateMemberRoleResponse) GetJSON200() *Member

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (UpdateMemberRoleResponse) GetJSONDefault added in v0.27.1

func (r UpdateMemberRoleResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

func (UpdateMemberRoleResponse) Status added in v0.20.0

func (r UpdateMemberRoleResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateMemberRoleResponse) StatusCode added in v0.20.0

func (r UpdateMemberRoleResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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,omitempty"`

	// 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 the response for an HTTP default `application/json` 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) ContentType added in v0.27.1

func (r UpdateOveragesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateOveragesResponse) GetBody added in v0.27.1

func (r UpdateOveragesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UpdateOveragesResponse) GetJSONDefault added in v0.27.1

func (r UpdateOveragesResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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 Request to reset the database password.

type UpdatePasswordResponse

type UpdatePasswordResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSONDefault the response for an HTTP default `application/json` response
	JSONDefault *Error
}

func ParseUpdatePasswordResponse

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

ParseUpdatePasswordResponse parses an HTTP response from a UpdatePasswordWithResponse call

func (UpdatePasswordResponse) ContentType added in v0.27.1

func (r UpdatePasswordResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdatePasswordResponse) GetBody added in v0.27.1

func (r UpdatePasswordResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (UpdatePasswordResponse) GetJSONDefault added in v0.27.1

func (r UpdatePasswordResponse) GetJSONDefault() *Error

GetJSONDefault returns the response for an HTTP default `application/json` response

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