Documentation
¶
Index ¶
- Variables
- func FromCtx(ctx context.Context) *gorm.DB
- func Init(c *Config)
- func InjectCtx(ctx context.Context, db *gorm.DB) context.Context
- func Migrate(ctx context.Context, tenants ...string)
- func RegisterModel(m interface{})
- func SessionCtx(ctx context.Context) context.Context
- func SessionHandler(next http.Handler) http.Handler
- func WithTenant(tenant string, m interface{}) func(db *gorm.DB) *gorm.DB
- type Config
- type ContextKey
- type Model
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DBXContext ContextKey = "dbx-context" SQLLiteType = "sqllite" MysqlType = "mysql" PostgresType = "postgres" DB *gorm.DB )
Functions ¶
func RegisterModel ¶
func RegisterModel(m interface{})
Types ¶
type ContextKey ¶
type ContextKey string
Click to show internal directories.
Click to hide internal directories.