db

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TableSystemView       = "sp_dashboard_block_system"
	TableCustomView       = "sp_dashboard_block"
	TableDashboardHistory = "erda_dashboard_history"
)

table names

Functions

This section is empty.

Types

type CustomView

type CustomView struct {
	ID         string    `gorm:"column:id" json:"id"`
	Name       string    `gorm:"column:name" json:"name"`
	Version    string    `gorm:"column:version" json:"version"`
	Desc       string    `gorm:"column:desc" json:"desc"`
	Scope      string    `gorm:"column:scope" json:"scope"`
	ScopeID    string    `gorm:"column:scope_id" json:"scopeId"`
	ViewConfig string    `gorm:"column:view_config" json:"viewConfig"`
	DataConfig string    `gorm:"column:data_config" json:"dataConfig"`
	CreatorID  string    `gorm:"column:creator_id" json:"creator_id"`
	CreatedAt  time.Time `gorm:"column:created_at" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at" json:"updatedAt"`
}

userBlock .

func (CustomView) TableName

func (CustomView) TableName() string

TableName .

type CustomViewDB

type CustomViewDB struct {
	*gorm.DB
}

CustomViewDB .

func (*CustomViewDB) Begin

func (db *CustomViewDB) Begin() *CustomViewDB

func (*CustomViewDB) GetByFields

func (db *CustomViewDB) GetByFields(fields map[string]interface{}) (*CustomView, error)

func (*CustomViewDB) GetCreatorsByFields

func (db *CustomViewDB) GetCreatorsByFields(fields map[string]interface{}) ([]string, error)

func (*CustomViewDB) ListByFields

func (db *CustomViewDB) ListByFields(startTime, endTime int64, creatorId []string, fields map[string]interface{}, likeFields map[string]interface{}) ([]*CustomView, error)

func (*CustomViewDB) ListByFieldsAndPage

func (db *CustomViewDB) ListByFieldsAndPage(pageNo, pageSize int64, startTime, endTime int64, creatorId []string, fields map[string]interface{}, likeFields map[string]interface{}) ([]*CustomView, int64, error)

func (*CustomViewDB) ListByIds

func (db *CustomViewDB) ListByIds(ids []string) ([]*CustomView, error)

func (*CustomViewDB) UpdateView

func (db *CustomViewDB) UpdateView(id string, fields map[string]interface{}) error

type ErdaDashboardHistory

type ErdaDashboardHistory struct {
	ID            string    `gorm:"column:id" json:"id"`
	Type          string    `gorm:"column:type" json:"type"`
	Status        string    `gorm:"column:status" json:"status"`
	Scope         string    `gorm:"column:scope" json:"scope"`
	ScopeId       string    `gorm:"column:scope_id" json:"scope_id"`
	OrgId         string    `gorm:"column:org_id" json:"org_id"`
	OrgName       string    `gorm:"column:org_name" json:"org_name"`
	TargetScope   string    `gorm:"column:target_scope" json:"target_scope"`
	TargetScopeId string    `gorm:"column:target_scope_id" json:"target_scope_id"`
	OperatorId    string    `gorm:"column:operator_id" json:"operator_id"`
	File          string    `gorm:"column:file" json:"file"`
	FileUUID      string    `gorm:"column:file_uuid" json:"file_uuid"`
	ErrorMessage  string    `gorm:"column:error_message" json:"error_message"`
	CreatedAt     time.Time `gorm:"column:created_at" json:"created_at"`
	UpdatedAt     time.Time `gorm:"column:updated_at" json:"updated_at"`
	IsDeleted     bool      `gorm:"column:is_deleted" json:"is_deleted"`
}

ErdaDashboardHistory table

func (ErdaDashboardHistory) TableName

func (ErdaDashboardHistory) TableName() string

TableName .

type ErdaDashboardHistoryDB

type ErdaDashboardHistoryDB struct {
	*gorm.DB
}

ErdaDashboardHistoryDB .

func (*ErdaDashboardHistoryDB) Begin

func (*ErdaDashboardHistoryDB) FindById

func (*ErdaDashboardHistoryDB) ListByPage

func (db *ErdaDashboardHistoryDB) ListByPage(pageNum, pageSize int64, scope, scopeId string) ([]*ErdaDashboardHistory, int64, error)

func (*ErdaDashboardHistoryDB) Save

func (*ErdaDashboardHistoryDB) UpdateStatusAndFileUUID

func (db *ErdaDashboardHistoryDB) UpdateStatusAndFileUUID(id, status, fileUUID, errorMessage string) error

type SystemView

type SystemView struct {
	ID         string    `gorm:"column:id" json:"id"`
	Name       string    `gorm:"column:name" json:"name"`
	Version    string    `gorm:"column:version" json:"version"`
	Desc       string    `gorm:"column:desc" json:"desc"`
	Scope      string    `gorm:"column:scope" json:"scope"`
	ScopeID    string    `gorm:"column:scope_id" json:"scopeId"`
	ViewConfig string    `gorm:"column:view_config" json:"viewConfig"`
	DataConfig string    `gorm:"column:data_config" json:"dataConfig"`
	CreatedAt  time.Time `gorm:"column:created_at" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at" json:"updatedAt"`
}

systemBlock .

func (SystemView) TableName

func (SystemView) TableName() string

TableName .

type SystemViewDB

type SystemViewDB struct {
	*gorm.DB
}

SystemViewDB .

func (*SystemViewDB) Begin

func (db *SystemViewDB) Begin() *SystemViewDB

func (*SystemViewDB) GetByFields

func (db *SystemViewDB) GetByFields(fields map[string]interface{}) (*SystemView, error)

func (*SystemViewDB) ListByFields

func (db *SystemViewDB) ListByFields(fields map[string]interface{}) ([]*SystemView, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL