template

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	URL       string                 `json:"url"`
	Query     map[string]interface{} `json:"query"`
	Body      map[string]interface{} `json:"body"`
	Header    map[string]interface{} `json:"header"`
	ExtraData map[string]interface{} `json:"extraData"`
	Method    string                 `json:"method"`
}

API .

type DB

type DB struct {
	*gorm.DB
	// contains filtered or unexported fields
}

func (*DB) Begin

func (db *DB) Begin() *DB

type Template

type Template struct {
	ID          string         `gorm:"not null;unique_index: Name, Scope, ScopeID,ID;type:varchar(64)" json:"id"`
	Name        string         `gorm:"not null;type:varchar(32);unique_index: Name, Scope, ScopeID,ID"  json:"name" binding:"required"`
	Description string         `json:"description"`
	Scope       string         `gorm:"unique_index: Name, Scope, ScopeID,ID" json:"scope"`
	ScopeID     string         `gorm:"unique_index: Name, Scope, ScopeID,ID" json:"scopeId"`
	ViewConfig  *ViewConfigDTO `gorm:"type:text;not null" json:"viewConfig"`
	CreatedAt   time.Time      `json:"createdAt"`
	UpdatedAt   time.Time      `json:"updatedAt"`
	Version     string         `json:"version"`
	Type        int64          `json:"type" default:"1"` //TODO auth
}

func (Template) TableName

func (Template) TableName() string

type View

type View struct {
	Title          string      `json:"title"`
	Description    string      `json:"description"`
	ChartType      string      `json:"chartType"`
	DataSourceType string      `json:"dataSourceType"`
	StaticData     interface{} `json:"staticData"`
	Config         config      `json:"config"`
	API            *API        `json:"api"`
	Controls       interface{} `json:"controls"`
}

ViewResp .

type ViewConfigDTO

type ViewConfigDTO []*ViewConfigItem

ViewConfigDTO .

func (*ViewConfigDTO) Scan

func (vc *ViewConfigDTO) Scan(value interface{}) error

func (*ViewConfigDTO) Value

func (vc *ViewConfigDTO) Value() (driver.Value, error)

Value .

type ViewConfigItem

type ViewConfigItem struct {
	W    int64  `json:"w"`
	H    int64  `json:"h"`
	X    int64  `json:"x"`
	Y    int64  `json:"y"`
	I    string `json:"i"`
	View *View  `json:"view"`
}

ViewConfig .

Jump to

Keyboard shortcuts

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