Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Migrate = &cobra.Command{ RunE: func(cmd *cobra.Command, args []string) error { conn, err := gorm.Open(postgres.Open(cfg.DSN()), &gorm.Config{ NamingStrategy: schema.NamingStrategy{ TablePrefix: cfg.Prefix(), }, }) if err != nil { return err } db := db.NewDB(conn) err = db.RunMigrations() if err != nil { return err } return nil }, }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Flags *Flags
}
Config ...
type DB ¶
type DB struct { Addr string Database string Password string Port int Username string Prefix string }
DB ...
Click to show internal directories.
Click to hide internal directories.