Documentation ¶
Index ¶
- Constants
- func OpenSQLDB(config SQLConfig) (db *sql.DB, err error)
- func RunMigration(args MigrationArgs) (err error)
- type CQLConfig
- type Config
- type Interface
- type ListResults
- type MigrationArgs
- type Migrator
- type PebbleConfig
- type SQLConfig
- type Schema
- type ShortData
- type ShortStore
- type UserData
- type UserStore
Constants ¶
View Source
const ( InMemory = iota Pebble CQL SQL )
Variables ¶
This section is empty.
Functions ¶
func RunMigration ¶
func RunMigration(args MigrationArgs) (err error)
Types ¶
type Interface ¶
type Interface interface { Shorts() ShortStore Users() UserStore }
func NewInMemory ¶
func NewInMemory() Interface
func NewPebble ¶
func NewPebble(config PebbleConfig) Interface
type ListResults ¶
type ListResults struct {
Matching []ShortData
}
type MigrationArgs ¶
type PebbleConfig ¶
type PebbleConfig struct {
Path string
}
type ShortData ¶
type ShortData struct { Short string `json:"Short"` Long string `json:"Long"` Owner uint64 `json:"Owner"` }
func ToShortData ¶
func ToShortData(s schema.ShortStruct) ShortData
func (ShortData) ToShortStruct ¶
func (s ShortData) ToShortStruct() schema.ShortStruct
type ShortStore ¶
type UserData ¶
type UserData struct { Email string `json:"Email"` Name string `json:"Name"` Id uint64 `json:"Id"` }
func ToUserData ¶
func ToUserData(u schema.UsersStruct) UserData
func (UserData) ToUsersStruct ¶
func (u UserData) ToUsersStruct() schema.UsersStruct
Click to show internal directories.
Click to hide internal directories.