Documentation ¶
Index ¶
- Variables
- func BuildDBM(address string, user string, password string, dbName string) (*gorm.DB, error)
- func ConvertConfigType(Type string) int64
- func GetAttribute(class interface{}, attrName string) (interface{}, error)
- func InitDB() (err error)
- func NewUserEmail(appUUID, instanceUUID string) string
- func NewUserUUID(appUUID, instanceUUID string) string
- func SetAttribute(class interface{}, attrName string, attrValue interface{}) error
- func Transaction(callback func(db *gorm.DB) error) error
- type AppInstanceCount
- type BaseModel
- func (bm *BaseModel) All(out interface{}, arg ModelInter) error
- func (bm *BaseModel) Delete(id int64, arg ModelInter) error
- func (bm *BaseModel) DeleteWithDB(db *gorm.DB, id int64, arg ModelInter) error
- func (bm *BaseModel) Exist(arg ModelInter) (bool, error)
- func (bm *BaseModel) New(out ModelInter) error
- func (bm *BaseModel) NewBatch(data interface{}) error
- func (bm *BaseModel) NewBatchWithDB(db *gorm.DB, data interface{}) error
- func (bm *BaseModel) NewWithDB(db *gorm.DB, out ModelInter) error
- func (bm *BaseModel) One(out ModelInter) error
- func (bm *BaseModel) RealDelete(id int64, arg ModelInter) error
- func (bm *BaseModel) RealDeleteWithDB(db *gorm.DB, id int64, arg ModelInter) error
- func (bm *BaseModel) Save(arg ModelInter) error
- func (bm *BaseModel) String() string
- func (bm *BaseModel) Update(id int64, arg ModelInter) error
- func (bm *BaseModel) UpdateWithDB(db *gorm.DB, id int64, arg ModelInter) error
- type ModelInter
- type PluginConfig
- type PluginEvent
- type PluginInstance
- func (i *PluginInstance) FirstInstance(appId string) (*PluginInstance, error)
- func (i *PluginInstance) GetConfig() *types.PluginConfig
- func (i *PluginInstance) GetExcludeStartInstanceList() ([]*PluginInstance, error)
- func (i *PluginInstance) GetOnePluginInstance(orgUUID, teamUUID, appUUID, instanceUUID string) ([]*PluginInstance, error)
- func (i *PluginInstance) GroupByAppId() ([]*AppInstanceCount, error)
- func (i *PluginInstance) LoadYamlConfig() (*types.PluginConfig, error)
- func (i *PluginInstance) RealDeleteWithDBArg(db *gorm.DB, arg ModelInter) error
- type PluginPermissionInfo
- type PluginUser
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DB *gorm.DB
)
Functions ¶
func ConvertConfigType ¶
func GetAttribute ¶
func NewUserEmail ¶
func NewUserUUID ¶
func SetAttribute ¶
Types ¶
type AppInstanceCount ¶
func (*AppInstanceCount) String ¶
func (b *AppInstanceCount) String() string
type BaseModel ¶
type BaseModel struct { Id int64 `gorm:"id" json:"id"` CreateTime int64 `gorm:"create_time" json:"create_time"` UpdateTime int64 `gorm:"update_time" json:"update_time"` Deleted bool `gorm:"deleted" json:"deleted"` Child ModelInter `gorm:"-" json:"-"` }
func (*BaseModel) All ¶
func (bm *BaseModel) All(out interface{}, arg ModelInter) error
func (*BaseModel) DeleteWithDB ¶
func (*BaseModel) New ¶
func (bm *BaseModel) New(out ModelInter) error
func (*BaseModel) NewBatchWithDB ¶
func (*BaseModel) One ¶
func (bm *BaseModel) One(out ModelInter) error
func (*BaseModel) RealDelete ¶
func (bm *BaseModel) RealDelete(id int64, arg ModelInter) error
func (*BaseModel) RealDeleteWithDB ¶
func (*BaseModel) Save ¶
func (bm *BaseModel) Save(arg ModelInter) error
func (*BaseModel) UpdateWithDB ¶
type ModelInter ¶
type ModelInter interface { New(ModelInter) error NewBatch(interface{}) error One(ModelInter) error All(interface{}, ModelInter) error Update(int64, ModelInter) error Delete(int64, ModelInter) error Save(arg ModelInter) error // contains filtered or unexported methods }
type PluginConfig ¶
type PluginConfig struct { BaseModel AppUUID string `gorm:"app_uuid" json:"app_uuid"` InstanceUUID string `gorm:"instance_uuid" json:"instance_uuid"` Label string `gorm:"label" json:"label"` Key string `gorm:"arg_key" json:"arg_key"` Value string `gorm:"arg_value" json:"arg_value"` Type int64 `gorm:"type" json:"type"` // COMBO: 1,INPUT: 2, TEXT: 3, SELECT: 4,CHECKBOX: 5,BUTTON: 6, Required bool `gorm:"required" json:"required"` }
func ModelPluginConfig ¶
func ModelPluginConfig() *PluginConfig
type PluginEvent ¶
type PluginEvent struct { BaseModel Action string `gorm:"action" json:"action"` Extended string `gorm:"extended" json:"extended"` }
func GetEvents ¶
func GetEvents() ([]*PluginEvent, error)
func ModelPluginEvent ¶
func ModelPluginEvent() *PluginEvent
type PluginInstance ¶
type PluginInstance struct { BaseModel AppUUID string `gorm:"app_uuid" json:"app_uuid"` InstanceUUID string `gorm:"instance_uuid" json:"instance_uuid"` Name string `gorm:"name" json:"name"` Version string `gorm:"version" json:"version"` Description string `gorm:"description" json:"description"` Contact string `gorm:"contact" json:"contact"` Status int `gorm:"status" json:"status"` Apis string `gorm:"apis" json:"apis"` }
func ModelPluginInstance ¶
func ModelPluginInstance() *PluginInstance
func (*PluginInstance) FirstInstance ¶
func (i *PluginInstance) FirstInstance(appId string) (*PluginInstance, error)
func (*PluginInstance) GetConfig ¶
func (i *PluginInstance) GetConfig() *types.PluginConfig
func (*PluginInstance) GetExcludeStartInstanceList ¶
func (i *PluginInstance) GetExcludeStartInstanceList() ([]*PluginInstance, error)
获取除启用状态外的所有插件实例ID
func (*PluginInstance) GetOnePluginInstance ¶
func (i *PluginInstance) GetOnePluginInstance(orgUUID, teamUUID, appUUID, instanceUUID string) ([]*PluginInstance, error)
func (*PluginInstance) GroupByAppId ¶
func (i *PluginInstance) GroupByAppId() ([]*AppInstanceCount, error)
func (*PluginInstance) LoadYamlConfig ¶
func (i *PluginInstance) LoadYamlConfig() (*types.PluginConfig, error)
func (*PluginInstance) RealDeleteWithDBArg ¶
func (i *PluginInstance) RealDeleteWithDBArg(db *gorm.DB, arg ModelInter) error
type PluginPermissionInfo ¶
type PluginPermissionInfo struct { BaseModel InstanceUUID string `gorm:"instance_uuid" json:"instance_uuid"` PermissionName string `gorm:"permission_name" json:"permission_name"` PermissionField string `gorm:"permission_field" json:"permission_field"` PermissionDesc string `gorm:"permission_desc" json:"permission_desc"` PermissionID int `gorm:"permission_id" json:"permission_id"` }
func ModelPluginPermissionInfo ¶
func ModelPluginPermissionInfo() *PluginPermissionInfo
type PluginUser ¶
type PluginUser struct { BaseModel UserUUID string `gorm:"user_uuid" json:"user_uuid"` AppUUID string `gorm:"app_uuid" json:"app_uuid"` InstanceUUID string `gorm:"instance_uuid" json:"instance_uuid"` Name string `gorm:"name" json:"name"` Email string `gorm:"email" json:"email"` }
func ModelPluginUser ¶
func ModelPluginUser() *PluginUser
Click to show internal directories.
Click to hide internal directories.