Documentation
¶
Index ¶
- Variables
- func CheckName(name string) error
- func LocationsTable(columns []interface{}) table.Table
- func ProbeLocation(location string) *time.Duration
- type ApiToken
- type ApiTokensClient
- type BillingClient
- func (c *BillingClient) CreateStripeCustomer(name string) (string, 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)
- 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) Upload(path string, fileData *os.File) (*http.Response, error)
- type ClosestLocationResponse
- type CreateApiToken
- type CreateDatabaseBody
- type CreateDatabaseResponse
- type CreateInstanceLocationError
- type DBSeed
- type Database
- type DatabasesClient
- func (d *DatabasesClient) Create(name, location, image, extensions, group string, seed *DBSeed) (*CreateDatabaseResponse, error)
- func (d *DatabasesClient) Delete(database string) 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) UploadDump(dbFile *os.File) (string, error)
- func (d *DatabasesClient) Usage(database string) (DbUsage, error)
- type DbUsage
- type DbUsageResponse
- type FeedbackClient
- type Group
- 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) (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 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 Plan
- type PlansClient
- type Portal
- type Stats
- type SubscriptionClient
- 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 BillingClient ¶
type BillingClient client
func (*BillingClient) CreateStripeCustomer ¶
func (c *BillingClient) CreateStripeCustomer(name string) (string, 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)
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
// contains filtered or unexported fields
}
Collection of all turso clients
type ClosestLocationResponse ¶
type ClosestLocationResponse struct {
Server string
}
type CreateApiToken ¶
type CreateDatabaseBody ¶
type CreateDatabaseResponse ¶
type CreateInstanceLocationError ¶
type CreateInstanceLocationError struct {
// contains filtered or unexported fields
}
func (*CreateInstanceLocationError) Error ¶
func (e *CreateInstanceLocationError) Error() string
type DatabasesClient ¶
type DatabasesClient client
func (*DatabasesClient) Create ¶
func (d *DatabasesClient) Create(name, location, image, extensions, group string, seed *DBSeed) (*CreateDatabaseResponse, error)
func (*DatabasesClient) Delete ¶
func (d *DatabasesClient) Delete(database string) 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) 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) UploadDump ¶
func (d *DatabasesClient) UploadDump(dbFile *os.File) (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 FeedbackClient ¶
type FeedbackClient client
func (*FeedbackClient) Submit ¶
func (d *FeedbackClient) Submit(summary, feedback string) error
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) 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 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 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 PlansClient ¶
type PlansClient client
func (*PlansClient) List ¶
func (c *PlansClient) List() ([]Plan, error)
type SubscriptionClient ¶
type SubscriptionClient client
func (*SubscriptionClient) Get ¶
func (c *SubscriptionClient) Get() (string, error)
func (*SubscriptionClient) Set ¶
func (c *SubscriptionClient) Set(plan string) error
type TokensClient ¶
type TokensClient client
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.