Documentation
¶
Index ¶
- Variables
- func LocationsTable(columns []interface{}) table.Table
- func ProbeLocation(location string) *time.Duration
- type ApiToken
- type ApiTokensClient
- type BillingAddress
- type BillingClient
- func (c *BillingClient) CreateStripeCustomer(name string) (string, error)
- func (c *BillingClient) GetBillingCustomer() (BillingCustomer, error)
- func (c *BillingClient) HasPaymentMethod() (bool, error)
- func (c *BillingClient) HasPaymentMethodWithStripeId(stripeId string) (bool, error)
- func (c *BillingClient) Portal() (Portal, error)
- func (c *BillingClient) PortalForStripeId(stripeId string) (Portal, error)
- func (c *BillingClient) UpdateBillingCustomer(customer BillingCustomer) error
- type BillingCustomer
- type Body
- type Client
- func (t *Client) Delete(path string, body io.Reader) (*http.Response, error)
- func (t *Client) Get(path string, body io.Reader) (*http.Response, error)
- func (t *Client) Patch(path string, body io.Reader) (*http.Response, error)
- func (t *Client) Post(path string, body io.Reader) (*http.Response, error)
- func (t *Client) Put(path string, body io.Reader) (*http.Response, error)
- func (t *Client) Upload(path string, fileData *os.File) (*http.Response, error)
- type ClosestLocationResponse
- type CreateApiToken
- type CreateDatabaseBody
- type CreateDatabaseResponse
- type CreateInstanceLocationError
- type DBSeed
- type Database
- type DatabaseConfig
- type DatabaseTokenRequest
- type DatabasesClient
- func (d *DatabasesClient) Create(name, location, image, extensions, group string, schema string, isSchema bool, ...) (*CreateDatabaseResponse, error)
- func (d *DatabasesClient) Delete(database string) error
- func (d *DatabasesClient) GetConfig(database string) (DatabaseConfig, error)
- func (d *DatabasesClient) List() ([]Database, error)
- func (d *DatabasesClient) Rotate(database string) error
- func (d *DatabasesClient) Seed(name string, dbFile *os.File) error
- func (d *DatabasesClient) Stats(database string) (Stats, error)
- func (d *DatabasesClient) Token(database string, expiration string, readOnly bool, ...) (string, error)
- func (d *DatabasesClient) Transfer(database, org string) error
- func (d *DatabasesClient) URL(suffix string) string
- func (d *DatabasesClient) Update(database string, group bool) error
- func (d *DatabasesClient) UpdateConfig(database string, config DatabaseConfig) error
- func (d *DatabasesClient) UploadDump(dbFile *os.File) (string, error)
- func (d *DatabasesClient) Usage(database string) (DbUsage, error)
- func (d *DatabasesClient) Wakeup(database string) error
- type DbUsage
- type DbUsageResponse
- type Entities
- type FeedbackClient
- type Group
- type GroupTokenRequest
- type GroupsClient
- func (d *GroupsClient) AddLocation(name, location string) error
- func (d *GroupsClient) Create(name, location, version string) error
- func (d *GroupsClient) Delete(group string) error
- func (d *GroupsClient) Get(name string) (Group, error)
- func (d *GroupsClient) List() ([]Group, error)
- func (d *GroupsClient) RemoveLocation(name, location string) error
- func (d *GroupsClient) Rotate(group string) error
- func (d *GroupsClient) Token(group string, expiration string, readOnly bool, permissions *PermissionsClaim) (string, error)
- func (d *GroupsClient) Transfer(group string, to string) error
- func (d *GroupsClient) URL(suffix string) string
- func (d *GroupsClient) Unarchive(name string) error
- func (d *GroupsClient) Update(group string, version, extensions string) error
- func (d *GroupsClient) WaitLocation(name, location string) error
- type Instance
- type InstanceUsage
- type InstancesClient
- func (d *InstancesClient) Create(dbName, location string) (*Instance, error)
- func (i *InstancesClient) Delete(db, instance string) error
- func (i *InstancesClient) List(db string) ([]Instance, error)
- func (d *InstancesClient) URL(database, suffix string) string
- func (i *InstancesClient) Wait(db, instance string) error
- type Invite
- type Invoice
- type InvoicesClient
- type Location
- type LocationResponse
- type LocationsClient
- type LocationsResponse
- type Member
- type OrgTotal
- type OrgUsage
- type OrgUsageResponse
- type Organization
- type OrganizationsClient
- func (c *OrganizationsClient) AddMember(username, role string) error
- func (c *OrganizationsClient) Create(name string, stripeId string, dryRun bool) (Organization, error)
- func (c *OrganizationsClient) Delete(slug string) error
- func (c *OrganizationsClient) InviteMember(email, role string) error
- func (c *OrganizationsClient) List() ([]Organization, error)
- func (c *OrganizationsClient) ListMembers() ([]Member, error)
- func (c *OrganizationsClient) MembersURL(suffix string) (string, error)
- func (c *OrganizationsClient) RemoveMember(username string) error
- func (c *OrganizationsClient) SetOverages(slug string, toggle bool) error
- func (c *OrganizationsClient) Usage() (OrgUsage, error)
- type PermissionsClaim
- type Plan
- type PlansClient
- type Portal
- type Stats
- type Subscription
- type SubscriptionClient
- type TaxID
- type TokensClient
- type Usage
- type UserInfo
- type UserInfoResponse
- type UsersClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPaymentRequired = errors.New("payment required")
Functions ¶
func LocationsTable ¶
func ProbeLocation ¶
Types ¶
type ApiTokensClient ¶
type ApiTokensClient client
func (*ApiTokensClient) Create ¶
func (a *ApiTokensClient) Create(name string) (CreateApiToken, error)
func (*ApiTokensClient) List ¶
func (a *ApiTokensClient) List() ([]ApiToken, error)
func (*ApiTokensClient) Revoke ¶
func (a *ApiTokensClient) Revoke(name string) error
type BillingAddress ¶ added in v0.92.0
type BillingClient ¶
type BillingClient client
func (*BillingClient) CreateStripeCustomer ¶
func (c *BillingClient) CreateStripeCustomer(name string) (string, error)
func (*BillingClient) GetBillingCustomer ¶ added in v0.92.0
func (c *BillingClient) GetBillingCustomer() (BillingCustomer, error)
func (*BillingClient) HasPaymentMethod ¶
func (c *BillingClient) HasPaymentMethod() (bool, error)
func (*BillingClient) HasPaymentMethodWithStripeId ¶
func (c *BillingClient) HasPaymentMethodWithStripeId(stripeId string) (bool, error)
func (*BillingClient) Portal ¶
func (c *BillingClient) Portal() (Portal, error)
func (*BillingClient) PortalForStripeId ¶
func (c *BillingClient) PortalForStripeId(stripeId string) (Portal, error)
func (*BillingClient) UpdateBillingCustomer ¶ added in v0.92.0
func (c *BillingClient) UpdateBillingCustomer(customer BillingCustomer) error
type BillingCustomer ¶ added in v0.92.0
type BillingCustomer struct {
Name string `json:"name"`
Email string `json:"email"`
TaxID TaxID `json:"tax_id"`
BillingAddress BillingAddress `json:"billing_address"`
}
type Client ¶
type Client struct {
Org string
Instances *InstancesClient
Databases *DatabasesClient
Feedback *FeedbackClient
Organizations *OrganizationsClient
ApiTokens *ApiTokensClient
Locations *LocationsClient
Tokens *TokensClient
Users *UsersClient
Plans *PlansClient
Subscriptions *SubscriptionClient
Billing *BillingClient
Groups *GroupsClient
Invoices *InvoicesClient
// contains filtered or unexported fields
}
Collection of all turso clients
type ClosestLocationResponse ¶
type ClosestLocationResponse struct {
Server string
}
type CreateApiToken ¶
type CreateDatabaseBody ¶
type CreateDatabaseBody struct {
Name string `json:"name"`
Location string `json:"location"`
Image string `json:"image,omitempty"`
Extensions string `json:"extensions,omitempty"`
Group string `json:"group,omitempty"`
Seed *DBSeed `json:"seed,omitempty"`
Schema string `json:"schema,omitempty"`
IsSchema bool `json:"is_schema,omitempty"`
}
type CreateDatabaseResponse ¶
type CreateInstanceLocationError ¶
type CreateInstanceLocationError struct {
// contains filtered or unexported fields
}
func (*CreateInstanceLocationError) Error ¶
func (e *CreateInstanceLocationError) Error() string
type DatabaseConfig ¶ added in v0.88.9
type DatabaseConfig struct {
AllowAttach bool `json:"allow_attach"`
}
type DatabaseTokenRequest ¶ added in v0.88.7
type DatabaseTokenRequest struct {
Permissions *PermissionsClaim `json:"permissions,omitempty"`
}
type DatabasesClient ¶
type DatabasesClient client
func (*DatabasesClient) Create ¶
func (d *DatabasesClient) Create(name, location, image, extensions, group string, schema string, isSchema bool, seed *DBSeed) (*CreateDatabaseResponse, error)
func (*DatabasesClient) Delete ¶
func (d *DatabasesClient) Delete(database string) error
func (*DatabasesClient) GetConfig ¶ added in v0.88.9
func (d *DatabasesClient) GetConfig(database string) (DatabaseConfig, error)
func (*DatabasesClient) List ¶
func (d *DatabasesClient) List() ([]Database, error)
func (*DatabasesClient) Rotate ¶
func (d *DatabasesClient) Rotate(database string) error
func (*DatabasesClient) Stats ¶ added in v0.88.3
func (d *DatabasesClient) Stats(database string) (Stats, error)
func (*DatabasesClient) Token ¶
func (d *DatabasesClient) Token(database string, expiration string, readOnly bool, permissions *PermissionsClaim) (string, error)
func (*DatabasesClient) Transfer ¶
func (d *DatabasesClient) Transfer(database, org string) error
func (*DatabasesClient) URL ¶
func (d *DatabasesClient) URL(suffix string) string
func (*DatabasesClient) Update ¶
func (d *DatabasesClient) Update(database string, group bool) error
func (*DatabasesClient) UpdateConfig ¶ added in v0.88.9
func (d *DatabasesClient) UpdateConfig(database string, config DatabaseConfig) error
func (*DatabasesClient) UploadDump ¶
func (d *DatabasesClient) UploadDump(dbFile *os.File) (string, error)
func (*DatabasesClient) Wakeup ¶ added in v0.88.4
func (d *DatabasesClient) Wakeup(database string) error
type DbUsage ¶
type DbUsage struct {
UUID string `json:"uuid,omitempty"`
Instances []InstanceUsage `json:"instances"`
Usage Usage `json:"usage"`
}
type DbUsageResponse ¶
type DbUsageResponse struct {
DbUsage DbUsage `json:"database"`
}
type Entities ¶ added in v0.88.7
type Entities struct {
DBNames []string `json:"databases,omitempty"`
}
type FeedbackClient ¶
type FeedbackClient client
func (*FeedbackClient) Submit ¶
func (d *FeedbackClient) Submit(summary, feedback string) error
type GroupTokenRequest ¶ added in v0.88.7
type GroupTokenRequest struct {
Permissions *PermissionsClaim `json:"permissions,omitempty"`
}
type GroupsClient ¶
type GroupsClient client
func (*GroupsClient) AddLocation ¶
func (d *GroupsClient) AddLocation(name, location string) error
func (*GroupsClient) Create ¶
func (d *GroupsClient) Create(name, location, version string) error
func (*GroupsClient) Delete ¶
func (d *GroupsClient) Delete(group string) error
func (*GroupsClient) List ¶
func (d *GroupsClient) List() ([]Group, error)
func (*GroupsClient) RemoveLocation ¶
func (d *GroupsClient) RemoveLocation(name, location string) error
func (*GroupsClient) Rotate ¶
func (d *GroupsClient) Rotate(group string) error
func (*GroupsClient) Token ¶
func (d *GroupsClient) Token(group string, expiration string, readOnly bool, permissions *PermissionsClaim) (string, error)
func (*GroupsClient) Transfer ¶ added in v0.88.0
func (d *GroupsClient) Transfer(group string, to string) error
func (*GroupsClient) URL ¶
func (d *GroupsClient) URL(suffix string) string
func (*GroupsClient) Unarchive ¶ added in v0.87.5
func (d *GroupsClient) Unarchive(name string) error
func (*GroupsClient) Update ¶ added in v0.87.8
func (d *GroupsClient) Update(group string, version, extensions string) error
func (*GroupsClient) WaitLocation ¶ added in v0.86.2
func (d *GroupsClient) WaitLocation(name, location string) error
type InstanceUsage ¶
type InstancesClient ¶
type InstancesClient client
func (*InstancesClient) Create ¶
func (d *InstancesClient) Create(dbName, location string) (*Instance, error)
func (*InstancesClient) Delete ¶
func (i *InstancesClient) Delete(db, instance string) error
func (*InstancesClient) URL ¶
func (d *InstancesClient) URL(database, suffix string) string
func (*InstancesClient) Wait ¶
func (i *InstancesClient) Wait(db, instance string) error
type InvoicesClient ¶ added in v0.91.0
type InvoicesClient client
func (*InvoicesClient) List ¶ added in v0.91.0
func (i *InvoicesClient) List() ([]Invoice, error)
func (*InvoicesClient) URL ¶ added in v0.91.0
func (i *InvoicesClient) URL(suffix string) string
type LocationResponse ¶
type LocationsClient ¶
type LocationsClient client
func (*LocationsClient) Closest ¶
func (c *LocationsClient) Closest() (string, error)
func (*LocationsClient) Get ¶
func (c *LocationsClient) Get(location string) (LocationResponse, error)
type LocationsResponse ¶
type OrgTotal ¶
type OrgTotal struct {
RowsRead uint64 `json:"rows_read,omitempty"`
RowsWritten uint64 `json:"rows_written,omitempty"`
StorageBytesUsed uint64 `json:"storage_bytes,omitempty"`
BytesSynced uint64 `json:"bytes_synced,omitempty"`
Databases uint64 `json:"databases,omitempty"`
Locations uint64 `json:"locations,omitempty"`
Groups uint64 `json:"groups,omitempty"`
}
type OrgUsageResponse ¶
type OrgUsageResponse struct {
OrgUsage OrgUsage `json:"organization"`
}
type Organization ¶
type OrganizationsClient ¶
type OrganizationsClient client
func (*OrganizationsClient) AddMember ¶
func (c *OrganizationsClient) AddMember(username, role string) error
func (*OrganizationsClient) Create ¶
func (c *OrganizationsClient) Create(name string, stripeId string, dryRun bool) (Organization, error)
func (*OrganizationsClient) Delete ¶
func (c *OrganizationsClient) Delete(slug string) error
func (*OrganizationsClient) InviteMember ¶
func (c *OrganizationsClient) InviteMember(email, role string) error
func (*OrganizationsClient) List ¶
func (c *OrganizationsClient) List() ([]Organization, error)
func (*OrganizationsClient) ListMembers ¶
func (c *OrganizationsClient) ListMembers() ([]Member, error)
func (*OrganizationsClient) MembersURL ¶
func (c *OrganizationsClient) MembersURL(suffix string) (string, error)
func (*OrganizationsClient) RemoveMember ¶
func (c *OrganizationsClient) RemoveMember(username string) error
func (*OrganizationsClient) SetOverages ¶
func (c *OrganizationsClient) SetOverages(slug string, toggle bool) error
func (*OrganizationsClient) Usage ¶
func (c *OrganizationsClient) Usage() (OrgUsage, error)
type PermissionsClaim ¶ added in v0.88.7
type PermissionsClaim struct {
ReadAttach Entities `json:"read_attach,omitempty"`
}
type Plan ¶
type Plan struct {
Name string `json:"name"`
Price string `json:"price"`
Quotas struct {
RowsRead uint64 `json:"rowsRead"`
RowsWritten uint64 `json:"rowsWritten"`
Databases uint64 `json:"databases"`
BytesSynced uint64 `json:"bytesSynced"`
Locations uint64 `json:"locations"`
Storage uint64 `json:"storage"`
Groups uint64 `json:"groups"`
}
}
type PlansClient ¶
type PlansClient client
func (*PlansClient) List ¶
func (c *PlansClient) List() ([]Plan, error)
type Subscription ¶ added in v0.90.4
type SubscriptionClient ¶
type SubscriptionClient client
func (*SubscriptionClient) Get ¶
func (c *SubscriptionClient) Get() (Subscription, error)
type TokensClient ¶
type TokensClient client
func (*TokensClient) Invalidate ¶ added in v0.88.4
func (c *TokensClient) Invalidate() (int64, error)
type UserInfoResponse ¶
type UserInfoResponse struct {
User UserInfo `json:"user"`
}
type UsersClient ¶
type UsersClient client
func (*UsersClient) GetUser ¶
func (u *UsersClient) GetUser() (UserInfo, error)
Click to show internal directories.
Click to hide internal directories.