cmd

package
v0.87.6 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 46 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 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 MaxDumpFileSizeBytes = 2 << 30
View Source
const TOKEN_VALID_CACHE_KEY_PREFIX = "token_valid."

Variables

View Source
var LOGIN_HTML string

Functions

func BillingPortalForStripeId

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

func ChangePlan

func ChangePlan(client *turso.Client, plans []turso.Plan, current string, hasPaymentMethod bool, selected string) error

func Execute

func Execute()

func GetSelectPlanInfo

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

func IsUnderHomebrew

func IsUnderHomebrew() bool

func PaymentMethodHelper

func PaymentMethodHelper(client *turso.Client, selected string) (bool, error)

func PaymentMethodHelperOverages

func PaymentMethodHelperOverages(client *turso.Client) (bool, error)

func PaymentMethodHelperWithStripeId

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

func Update

func Update() error

Types

type Error

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

type ErrorResponse

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

type InspectInfo

type InspectInfo struct {
	// contains filtered or unexported fields
}

func (*InspectInfo) Accumulate

func (curr *InspectInfo) Accumulate(n *InspectInstanceInfo)

func (*InspectInfo) PrintTotalStorage

func (curr *InspectInfo) PrintTotalStorage() string

func (*InspectInfo) TotalRowsReadCount

func (curr *InspectInfo) TotalRowsReadCount() uint64

type InspectInstanceInfo

type InspectInstanceInfo struct {
	Location      string
	Name          string
	Type          string
	StorageInfos  []StorageInfo
	RowsReadCount uint64
}

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{}

type StorageInfo

type StorageInfo struct {
	Type        string
	Name        string
	SizeTables  uint64
	SizeIndexes uint64
}

Jump to

Keyboard shortcuts

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