cmd

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 50 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_CACHE_KEY         = "database_names"
	DB_CACHE_TTL_SECONDS = 30 * 60
)
View Source
const (
	REGIONS_CACHE_KEY         = "locations"
	REGIONS_CACHE_TTL_SECONDS = 8 * 60 * 60
)
View Source
const (
	ORG_CACHE_KEY           = "organizations"
	GROUP_CACHE_KEY         = "groups"
	GROUP_CACHE_TTL_SECONDS = 30 * 60
)
View Source
const (
	ORGS_CACHE_KEY         = "organizations"
	ORGS_CACHE_TTL_SECONDS = 30 * 60
)
View Source
const (
	PLANS_CACHE_KEY = "plans"
	PLANS_CACHE_TTL = 60
)
View Source
const CLOSEST_LOCATION_CACHE_KEY = "closestLocation"
View Source
const DATABASE_TOKEN_KEY_PREFIX = "database_token."
View Source
const ENV_ACCESS_TOKEN = "TURSO_API_TOKEN"
View Source
const MaxAWSDBSizeBytes = 1024 * 1024 * 1024 * 20 // 20 GB
View Source
const MaxDumpFileSizeBytes = 8 << 30
View Source
const TOKEN_VALID_CACHE_KEY_PREFIX = "token_valid."

Variables

View Source
var ErrNotLoggedIn = fmt.Errorf("user not logged in, please login with %s", internal.Emph("turso auth login"))
View Source
var LOGIN_HTML string

Functions

func BillingPortal added in v0.97.0

func BillingPortal() error

func BillingPortalForStripeId

func BillingPortalForStripeId(client *turso.Client, stripeCustomerId string) error

func CreateDatabase added in v0.100.0

func CreateDatabase(name string) error

func CreateDatabaseV3BodyFromFlags added in v1.0.21

func CreateDatabaseV3BodyFromFlags(name string, seed *turso.DBSeed) turso.CreateDatabaseV3Body

func Execute

func Execute()

func ExportDatabase added in v1.0.8

func ExportDatabase(dbName, outputFile string, withMetadata bool, overwrite bool) error

func GetSelectPlanInfo

func GetSelectPlanInfo(client *turso.Client) (plans []turso.Plan, current turso.Subscription, hasPaymentMethod bool, err error)

func IsUnderHomebrew

func IsUnderHomebrew() bool

func PaymentMethodHelperWithStripeId

func PaymentMethodHelperWithStripeId(client *turso.Client, stripeId, orgName string) (bool, error)

func Update

func Update() error

func VerifyUserIsLoggedIn added in v0.95.2

func VerifyUserIsLoggedIn()

Types

type DatabaseFetcher added in v1.0.7

type DatabaseFetcher struct {
	SchemaFilter string
	GroupFilter  string
	ParentDbId   string
	LoadFullInfo bool
	// contains filtered or unexported fields
}

func (*DatabaseFetcher) FetchPage added in v1.0.7

func (df *DatabaseFetcher) FetchPage(pageSize int, cursor *string) (turso.ListResponse, error)

type Error

type Error struct {
	Message string `json:"message"`
}

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"error"`
}

type PageFetcher added in v1.0.7

type PageFetcher interface {
	FetchPage(pageSize int, cursor *string) (turso.ListResponse, error)
}

type QueryRequest

type QueryRequest struct {
	Statements []string `json:"statements"`
}

type QueryResult

type QueryResult struct {
	Results *ResultSet `json:"results"`
	Error   *Error     `json:"error"`
}

type ResultSet

type ResultSet struct {
	Columns []string `json:"columns"`
	Rows    []Row    `json:"rows"`
}

type Row

type Row []interface{}

Jump to

Keyboard shortcuts

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