Documentation
¶
Index ¶
- Constants
- type Client
- type Instance
- type InstanceState
- type Service
- func (s *Service) Blur()
- func (s *Service) Focus()
- func (s *Service) HelpText() string
- func (s *Service) Init() tea.Cmd
- func (s *Service) InitService(ctx context.Context, projectID string) error
- func (s *Service) IsRootView() bool
- func (s *Service) Name() string
- func (s *Service) Refresh() tea.Cmd
- func (s *Service) Reinit(ctx context.Context, projectID string) error
- func (s *Service) Reset()
- func (s *Service) ShortName() string
- func (s *Service) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (s *Service) View() string
- type ViewState
Constants ¶
View Source
const CacheTTL = 60 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the Cloud SQL Admin API
func (*Client) ListInstances ¶
ListInstances fetches all Cloud SQL instances in the project
func (*Client) StartInstance ¶
StartInstance starts a Cloud SQL instance by setting activation policy to ALWAYS
func (*Client) StopInstance ¶
StopInstance stops a Cloud SQL instance by setting activation policy to NEVER
type Instance ¶
type Instance struct {
Name string
ProjectID string
Region string
DatabaseVersion string
State InstanceState
Tier string
PrimaryIP string
ConnectionName string
// Details
StorageGB int64
AutoBackup bool
Activation string // ALWAYS or NEVER
}
Instance represents a simplified Cloud SQL instance
type InstanceState ¶
type InstanceState string
InstanceState represents the status of a Cloud SQL instance
const ( StateRunnable InstanceState = "RUNNABLE" StateSuspended InstanceState = "SUSPENDED" StatePending InstanceState = "PENDING_CREATE" StateMaintenance InstanceState = "MAINTENANCE" StateFailed InstanceState = "FAILED" StateUnknown InstanceState = "UNKNOWN" )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements the generic Service interface
func NewService ¶
func (*Service) InitService ¶
func (*Service) IsRootView ¶
Click to show internal directories.
Click to hide internal directories.