Documentation ¶
Index ¶
- func AuthUser(u *models.User) (bool, error)
- func DBInit(dialector gorm.Dialector, gconf *gorm.Config)
- func GetBoxPrice() float32
- func GetDB() *gorm.DB
- func GetPublicKey() string
- func GetStickerPrice() float32
- func InsertContact(o *models.TableContact) bool
- func InsertOrder(o *models.TableOrder) bool
- func InsertRawUser(u *models.User) bool
- func InsertUseCase(o *models.TableUseCase) bool
- func InsertUser(o *models.TableUser) bool
- func LoadSettings(profile string)
- func OrderHasValidPrice(o *models.TableOrder) bool
- func SaveSettings() error
- func SetBoxPrice(newPrice float32)
- func SetPublicKey(nv string) error
- func SetStickerPrice(newPrice float32)
- type DBConfig
- type PostgresDBConf
- type SqliteDBConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBoxPrice ¶
func GetBoxPrice() float32
func GetPublicKey ¶
func GetPublicKey() string
func GetStickerPrice ¶
func GetStickerPrice() float32
func InsertContact ¶
func InsertContact(o *models.TableContact) bool
func InsertOrder ¶
func InsertOrder(o *models.TableOrder) bool
func InsertRawUser ¶
func InsertUseCase ¶
func InsertUseCase(o *models.TableUseCase) bool
func InsertUser ¶
func LoadSettings ¶
func LoadSettings(profile string)
func OrderHasValidPrice ¶
func OrderHasValidPrice(o *models.TableOrder) bool
func SaveSettings ¶
func SaveSettings() error
func SetBoxPrice ¶
func SetBoxPrice(newPrice float32)
func SetPublicKey ¶
func SetStickerPrice ¶
func SetStickerPrice(newPrice float32)
Types ¶
type PostgresDBConf ¶
type PostgresDBConf struct { // "host=localhost user=gorm password=gorm dbname=gorm port=9920 sslmode=disable TimeZone=Asia/Shanghai" DatabaseHost string DatabaseUser string DatabasePassword string DatabaseName string DatabasePort uint Others map[string]interface{} }
func (*PostgresDBConf) GetDSN ¶
func (conf *PostgresDBConf) GetDSN() string
type SqliteDBConf ¶
type SqliteDBConf struct {
DatabasePath string
}
func (*SqliteDBConf) GetDSN ¶
func (conf *SqliteDBConf) GetDSN() string
Click to show internal directories.
Click to hide internal directories.