Documentation ¶
Index ¶
- Constants
- func CmdModels(db string, tables ...ice.Any)
- type Dialector
- type Driver
- func (s Driver) AfterMigrate(m *ice.Message, arg ...string)
- func (s Driver) BeforeMigrate(m *ice.Message, arg ...string)
- func (s Driver) Exit(m *ice.Message, arg ...string)
- func (s Driver) Register(m *ice.Message, cb func(string) Dialector, arg ...string)
- func (s Driver) Select(m *ice.Message, arg ...string)
- func (s Driver) Target(m *ice.Message, d string, domain string) *gorm.DB
- type Model
- type ModelCommand
- type ModelContent
- type ModelPlace
- type ModelStreet
- type ModelUserPlace
- type ModelWithAuth
- type ModelWithUID
- type Models
- func (s Models) AutoCreate(m *ice.Message, arg ...string)
- func (s Models) Exit(m *ice.Message, arg ...string)
- func (s Models) Init(m *ice.Message, arg ...string)
- func (s Models) List(m *ice.Message, arg ...string)
- func (s Models) Register(m *ice.Message, domain string, target ...ice.Any)
- func (s Models) Select(m *ice.Message, arg ...string)
- func (s Models) Target(m *ice.Message, name string) ice.Any
- func (s Models) Xterm(m *ice.Message, arg ...string)
- type Table
- func (s Table) AS(from, to string) string
- func (s Table) AddCount(m *ice.Message, arg ...string)
- func (s Table) AfterMigrate(m *ice.Message, arg ...string)
- func (s Table) BeforeMigrate(m *ice.Message, arg ...string)
- func (s Table) ClearOption(m *ice.Message, arg ...string) *ice.Message
- func (s Table) Create(m *ice.Message, arg ...string)
- func (s Table) Delete(m *ice.Message, arg ...string) *ice.Message
- func (s Table) Desc(k string) string
- func (s Table) Exec(m *ice.Message, arg ...string)
- func (s Table) Fields(m *ice.Message, arg ...ice.Any) Table
- func (s Table) FieldsWithCreatedAT(m *ice.Message, target ice.Any, arg ...ice.Any) Table
- func (s Table) Find(m *ice.Message, arg ...string)
- func (s Table) Inputs(m *ice.Message, arg ...string)
- func (s Table) Key(target ice.Any, k string) string
- func (s Table) Keys(target ice.Any, k string) string
- func (s Table) LeftJoin(target ice.Any) string
- func (s Table) Limit(m *ice.Message, limit int) Table
- func (s Table) List(m *ice.Message, arg ...string) *ice.Message
- func (s Table) Modify(m *ice.Message, arg ...string)
- func (s Table) Open(m *ice.Message) *gorm.DB
- func (s Table) OpenID(m *ice.Message, id string) *gorm.DB
- func (s Table) Orders(m *ice.Message, arg ...ice.Any) Table
- func (s Table) Remove(m *ice.Message, arg ...string)
- func (s Table) Rename(m *ice.Message, arg ...string) *ice.Message
- func (s Table) Select(m *ice.Message, arg ...string) *ice.Message
- func (s Table) SelectDetail(m *ice.Message, arg ...string) *ice.Message
- func (s Table) SelectForUpdate(m *ice.Message, arg ...string) *ice.Message
- func (s Table) SelectJoin(m *ice.Message, target ice.Any, arg ...string) *ice.Message
- func (s Table) SelectList(m *ice.Message, arg ...string)
- func (s Table) Show(m *ice.Message, db *gorm.DB) *ice.Message
- func (s Table) TableName(model string) string
- func (s Table) Tables(m *ice.Message, target ...ice.Any) Table
- func (s Table) ToLower(model string) string
- func (s Table) Transaction(m *ice.Message, cb func())
- func (s Table) Update(m *ice.Message, data ice.Map, arg ...string)
- func (s Table) Where(m *ice.Message, db *gorm.DB, arg ...string) *gorm.DB
- type Time
Constants ¶
View Source
const ( MODELS = "models" DOMAIN = "domain" DRIVER = "driver" DB = "db" )
View Source
const ( MODEL = "model" CREATED_AT = "created_at" UPDATED_AT = "updated_at" DELETED_AT = "deleted_at" OPERATOR = "operator" CREATOR = "creator" UID = "uid" ICON = "icon" NAME = "name" TYPE = "type" ROLE = "role" STATUS = "status" AVATAR = "avatar" ADDRESS = "address" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (Driver) Register ¶
type Model ¶
type ModelCommand ¶ added in v0.6.17
type ModelContent ¶ added in v0.6.17
type ModelContent struct { ModelWithUID UserUID string `gorm:"type:char(32);index"` Title string `gorm:"type:varchar(64)"` Content string }
type ModelPlace ¶ added in v0.6.17
type ModelPlace struct { ModelWithAuth Name string `gorm:"type:varchar(64)"` Type uint8 `gorm:"default:0"` Init uint8 `gorm:"default:0"` }
type ModelStreet ¶ added in v0.6.17
type ModelStreet struct { ModelWithAuth CityUID string `gorm:"type:char(32);index:idx_city"` Name string `gorm:"type:varchar(64);index:idx_city"` Info string }
type ModelUserPlace ¶ added in v0.6.17
type ModelUserPlace struct { ModelWithUID UserUID string `gorm:"type:char(32);index"` Role uint8 `gorm:"default:0"` }
type ModelWithAuth ¶ added in v0.6.17
type ModelWithAuth struct { ModelWithUID AuthUID string `gorm:"type:char(32);index"` }
type ModelWithUID ¶
type Table ¶
func (Table) ClearOption ¶ added in v0.6.15
func (Table) FieldsWithCreatedAT ¶ added in v0.6.15
func (Table) Rename ¶ added in v0.6.15
func (Table) SelectDetail ¶ added in v0.6.15
func (Table) SelectForUpdate ¶ added in v0.6.15
func (Table) SelectJoin ¶ added in v0.6.15
func (Table) Tables ¶ added in v0.6.15
Click to show internal directories.
Click to hide internal directories.