orm

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2022 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	KeyInitDB      = ginshared.KeyInitDB
	KeyTablePrefix = "database.tablePrefix"
)
View Source
const (
	HealthURIKey   = "healthz"
	HealthURIValue = "/healthz"
)
View Source
const ViewMysqlTmp = "CREATE OR REPLACE ALGORITHM = UNDEFINED VIEW %s%s AS %s"

Variables

View Source
var DialectorMap = make(map[string]OrmDialector)

Functions

func CreateSchedule added in v0.1.8

func CreateSchedule(jobname, schedule string, cmd func(), logger *zap.Logger) (*cron.Cron, error)

func InitDB

func InitDB(sub string, logger *zap.Logger) *gorm.DB

func InitDefaultDB added in v0.1.3

func InitDefaultDB(logger *zap.Logger) *gorm.DB

func InitMysqlViews added in v0.1.7

func InitMysqlViews(tx *gorm.DB, logger *zap.Logger) error

Types

type CronZaplog added in v0.1.8

type CronZaplog struct {
	// contains filtered or unexported fields
}

func (*CronZaplog) Error added in v0.1.8

func (c *CronZaplog) Error(err error, msg string, keysAndValues ...interface{})

func (*CronZaplog) Info added in v0.1.8

func (c *CronZaplog) Info(msg string, keysAndValues ...interface{})

type DBCronJob added in v0.1.8

type DBCronJob struct {
	Name     string
	Schedule string
	Sql      string
	// contains filtered or unexported fields
}

func (*DBCronJob) FireJob added in v0.1.8

func (job *DBCronJob) FireJob()

type HealthController

type HealthController struct {
	// contains filtered or unexported fields
}

func (*HealthController) Ping

func (h *HealthController) Ping(c *gin.Context)

type OrmDialector added in v0.0.5

type OrmDialector func(dsn string) gorm.Dialector

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL