cmd

package
v0.92.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 48 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 MaxDumpFileSizeBytes = 8 << 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 Execute

func Execute()

func GetSelectPlanInfo

func GetSelectPlanInfo(client *turso.Client) (plans []turso.Plan, current turso.Subscription, 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 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