Documentation
¶
Index ¶
- Constants
- Variables
- type Database
- type Details
- type Record
- type Store
- func (s *Store) Close() error
- func (s *Store) Create(label string) (*Database, error)
- func (s *Store) Get(name string) (*Database, error)
- func (s *Store) GetByUsername(username string) (*Database, error)
- func (s *Store) List() ([]Summary, error)
- func (s *Store) Root() string
- func (s *Store) Stats() map[string]sql.DBStats
- type StoreConfig
- type Summary
Constants ¶
View Source
const ( StatusCreating = "creating" StatusReady = "ready" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Database ¶
Database is a ready runtime entry with an open pool.
type Details ¶
type Details struct {
Name string `json:"name"`
Label string `json:"label,omitempty"`
Username string `json:"username"`
Password string `json:"password,omitempty"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
}
Details is an inspect/create response that may include credentials.
type Record ¶
type Record struct {
Name string `json:"name"`
Label string `json:"label,omitempty"`
Username string `json:"username"`
Password string `json:"password,omitempty"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
}
Record is the durable metadata for a managed database.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store owns management.db and ready tenant database pools.
func Open ¶
func Open(config StoreConfig) (*Store, error)
Open creates or opens the storage root and loads ready databases.
func (*Store) GetByUsername ¶
GetByUsername returns a ready database by MySQL username.
type StoreConfig ¶
StoreConfig configures the storage root and per-database pools.
Click to show internal directories.
Click to hide internal directories.