Documentation ¶
Index ¶
- Constants
- func Delete(scope *gorm.Scope)
- func DraftTableName(table string) string
- func GetModeAndNewScope(scope *gorm.Scope) (isProduction bool, clone *gorm.Scope)
- func IncludeValue(value string, values []string) bool
- func IsPublishableModel(model interface{}) (ok bool)
- func OriginalTableName(table string) string
- func SetTableAndPublishStatus(ensureDraftMode bool) func(*gorm.Scope)
- func SyncToProductionAfterCreate(scope *gorm.Scope)
- func SyncToProductionAfterDelete(scope *gorm.Scope)
- func SyncToProductionAfterUpdate(scope *gorm.Scope)
- type Dependency
- type Interface
- type Publish
- func (db *Publish) AutoMigrate(values ...interface{})
- func (db *Publish) Discard(records ...interface{})
- func (db *Publish) DraftDB() *gorm.DB
- func (publish *Publish) InjectQorAdmin(res *admin.Resource)
- func (db *Publish) NewResolver(records ...interface{}) *Resolver
- func (db *Publish) ProductionDB() *gorm.DB
- func (db *Publish) Publish(records ...interface{})
- type PublishController
- type PublishJoinTableHandler
- func (handler PublishJoinTableHandler) Add(h gorm.JoinTableHandlerInterface, db *gorm.DB, source1 interface{}, ...) error
- func (handler PublishJoinTableHandler) Delete(h gorm.JoinTableHandlerInterface, db *gorm.DB, sources ...interface{}) error
- func (handler PublishJoinTableHandler) Table(db *gorm.DB) string
- type Resolver
- type Status
Constants ¶
View Source
const ( PUBLISHED = false DIRTY = true )
Variables ¶
This section is empty.
Functions ¶
func DraftTableName ¶
func GetModeAndNewScope ¶
func IncludeValue ¶
func IsPublishableModel ¶
func IsPublishableModel(model interface{}) (ok bool)
func OriginalTableName ¶
Types ¶
type Dependency ¶
type Publish ¶
func (*Publish) AutoMigrate ¶
func (db *Publish) AutoMigrate(values ...interface{})
func (*Publish) InjectQorAdmin ¶
func (*Publish) NewResolver ¶
func (*Publish) ProductionDB ¶
type PublishController ¶
type PublishController struct {
*Publish
}
func (*PublishController) Diff ¶
func (db *PublishController) Diff(context *admin.Context)
func (*PublishController) Preview ¶
func (db *PublishController) Preview(context *admin.Context)
func (*PublishController) PublishOrDiscard ¶
func (db *PublishController) PublishOrDiscard(context *admin.Context)
type PublishJoinTableHandler ¶
type PublishJoinTableHandler struct {
gorm.JoinTableHandler
}
func (PublishJoinTableHandler) Add ¶
func (handler PublishJoinTableHandler) Add(h gorm.JoinTableHandlerInterface, db *gorm.DB, source1 interface{}, source2 interface{}) error
func (PublishJoinTableHandler) Delete ¶
func (handler PublishJoinTableHandler) Delete(h gorm.JoinTableHandlerInterface, db *gorm.DB, sources ...interface{}) error
type Resolver ¶
type Resolver struct { Records []interface{} Dependencies map[string]*Dependency DB *Publish }
func (*Resolver) AddDependency ¶
func (resolver *Resolver) AddDependency(dependency *Dependency)
func (*Resolver) GenerateDependencies ¶
func (resolver *Resolver) GenerateDependencies()
func (*Resolver) GetDependencies ¶
func (resolver *Resolver) GetDependencies(dependency *Dependency, primaryKeys []string)
Click to show internal directories.
Click to hide internal directories.