Documentation
¶
Index ¶
Constants ¶
View Source
const ( ActionTypeAPI = "api" ActionTypeMenu = "menu" ActionTypePageAction = "action" )
View Source
const ( ObjectTypeResource = "res" ObjectTypeResourceGroup = "group" ObjectTypeAction = "act" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct {
Code string `gorm:"size:32;primaryKey"`
Type string `gorm:"size:8;not null"`
Name string `gorm:"size:64"`
}
Action represents an operation that can be performed on UI layer or API layer.
func (*Action) ObjectType ¶
type Endpoint ¶
type Endpoint struct {
ID uint
TargetType string `gorm:"size:8"`
Method string `gorm:"size:8"`
Path string `gorm:"size:256"`
ApiCode string `gorm:"size:64;index"`
Action Action `gorm:"foreignkey:ApiCode;references:Code"`
}
Endpoint represents a real API via HTTP, WS or some other protocols. It will be mapped to an API action.
Click to show internal directories.
Click to hide internal directories.