Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckResult ¶
type DemoService ¶
type DemoStruct ¶
type DemoStruct struct { ID int `gorm:"column:id" json:"id"` Name string `gorm:"column:name" json:"name"` CreatedAt time.Time `gorm:"column:created_at" json:"-"` UpdatedAt time.Time `gorm:"column:updated_at" json:"-"` DeletedAt *time.Time `gorm:"column:deleted_at" json:"-"` }
DemoStruct 结构体定义示例, gorm 会自动设置 CreatedAt/UpdatedAt/DeletedAt
func (DemoStruct) TableName ¶
func (DemoStruct) TableName() string
TableName gorm 规范, 需要添加 TableName 以便gorm获取表名. 规范为 "业务名+s", 连字符模式. 如 user=> users.
type DemoStructDTO ¶
type DemoStructDTO DemoStruct
DemoStructDTO 是 DemoStruct 对外展示的结构体, DemoStruct 即 DemoStructDO, 是数据库存储的结构体. 具体参考 link:/docs/namings[命名规范]
type RuleService ¶
type RuleService interface {
Check(params map[string]interface{}) (*CheckResult, error)
}
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
tests/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
other-projects
|
|
Click to show internal directories.
Click to hide internal directories.