Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintOutput ¶
PrintOutput prints the output as JSON or in a table format.
Types ¶
type Database ¶
type Database struct {
	Name      string `header:"name" json:"name"`
	CreatedAt int64  `header:"created_at,timestamp(ms|utc|human)" json:"created_at"`
	UpdatedAt int64  `header:"updated_at,timestamp(ms|utc|human)" json:"updated_at"`
	Notes     string `header:"notes" json:"notes"`
}
    Database returns a table-serializable database model.
func NewDatabasePrinter ¶
NewDatabasePrinter returns a struct that prints out the various fields of a database model.
func NewDatabaseSlicePrinter ¶
NewDatabaseSlicePrinter returns a slice of printable databases.
type DatabaseBranch ¶
type DatabaseBranch struct {
	Name         string `header:"name" json:"name"`
	Status       string `header:"status" json:"status"`
	ParentBranch string `header:"parent branch,n/a" json:"parent_branch"`
	CreatedAt    int64  `header:"created_at,timestamp(ms|utc|human)" json:"created_at"`
	UpdatedAt    int64  `header:"updated_at,timestamp(ms|utc|human)" json:"updated_at"`
	Notes        string `header:"notes" json:"notes"`
}
    func NewDatabaseBranchPrinter ¶
func NewDatabaseBranchPrinter(db *ps.DatabaseBranch) *DatabaseBranch
NewDatabaseBranchPrinter returns a struct that prints out the various fields of a database model.
func NewDatabaseBranchSlicePrinter ¶
func NewDatabaseBranchSlicePrinter(branches []*ps.DatabaseBranch) []*DatabaseBranch
type DatabaseBranchStatus ¶
type DatabaseBranchStatus struct {
	Status      string `header:"status" json:"status"`
	GatewayHost string `header:"gateway_host" json:"gateway_host"`
	GatewayPort int    `header:"gateway_port,text" json:"gateway_port"`
	User        string `header:"username" json:"user"`
	Password    string `header:"password" json:"password"`
}
    func NewDatabaseBranchStatusPrinter ¶
func NewDatabaseBranchStatusPrinter(status *ps.DatabaseBranchStatus) *DatabaseBranchStatus
type DeployRequest ¶
type DeployRequest struct {
	ID string `header:"id" json:"id"`
	Branch     string `header:"branch,timestamp(ms|utc|human)" json:"branch"`
	IntoBranch string `header:"into_branch,timestamp(ms|utc|human)" json:"into_branch"`
	Notes string `header:"notes" json:"notes"`
	CreatedAt int64  `header:"created_at,timestamp(ms|utc|human)" json:"created_at"`
	UpdatedAt int64  `header:"updated_at,timestamp(ms|utc|human)" json:"updated_at"`
	ClosedAt  *int64 `header:"closed_at,timestamp(ms|utc|human),-" json:"closed_at"`
}
    DeployRequest returns a table-serializable deplo request model.
func NewDeployRequestPrinter ¶
func NewDeployRequestPrinter(dr *planetscale.DeployRequest) *DeployRequest
func NewDeployRequestSlicePrinter ¶
func NewDeployRequestSlicePrinter(deployRequests []*planetscale.DeployRequest) []*DeployRequest
type SchemaSnapshot ¶
type SchemaSnapshot struct {
	ID        string `header:"id" json:"id"`
	Name      string `header:"name" json:"name"`
	CreatedAt int64  `header:"created_at,timestamp(ms|utc|human)" json:"created_at"`
	UpdatedAt int64  `header:"updated_at,timestamp(ms|utc|human)" json:"updated_at"`
}
    SchemaSnapshot returns a table and json serializable schema snapshot.
func NewSchemaSnapshotPrinter ¶
func NewSchemaSnapshotPrinter(ss *planetscale.SchemaSnapshot) *SchemaSnapshot
NewSchemaSnapshotPrinter returns a struct that prints out the various fields of a schema snapshot model.
func NewSchemaSnapshotSlicePrinter ¶
func NewSchemaSnapshotSlicePrinter(schemaSnapshots []*ps.SchemaSnapshot) []*SchemaSnapshot
 Click to show internal directories. 
   Click to hide internal directories.