types

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertAttribute

type AlertAttribute interface {
	SetTheme(value string) AlertAttribute
	SetTitle(value template.HTML) AlertAttribute
	SetContent(value template.HTML) AlertAttribute
	GetContent() template.HTML
}

type AreaChartAttribute

type AreaChartAttribute interface {
	SetTitle(value template.HTML) AreaChartAttribute
	SetID(value string) AreaChartAttribute
	SetData(value string) AreaChartAttribute
	SetHeight(value int) AreaChartAttribute
	GetContent() template.HTML
}

type Attribute

type Attribute struct {
	TemplateList map[string]string
}

Attribute is the component interface of template. Every component of template should implement it.

type BarChartAttribute

type BarChartAttribute interface {
	SetID(value string) BarChartAttribute
	SetTitle(value template.HTML) BarChartAttribute
	SetWidth(value int) BarChartAttribute
	SetData(value string) BarChartAttribute
	GetContent() template.HTML
}

type BoxAttribute

type BoxAttribute interface {
	SetHeader(value template.HTML) BoxAttribute
	SetBody(value template.HTML) BoxAttribute
	SetFooter(value template.HTML) BoxAttribute
	SetTitle(value template.HTML) BoxAttribute
	WithHeadBorder(has bool) BoxAttribute
	SetTheme(value string) BoxAttribute
	GetContent() template.HTML
}

type ChartLegendAttribute

type ChartLegendAttribute interface {
	SetData(value []map[string]string) ChartLegendAttribute
	GetContent() template.HTML
}

type ColAttribute

type ColAttribute interface {
	SetSize(value map[string]string) ColAttribute
	SetContent(value template.HTML) ColAttribute
	GetContent() template.HTML
}

type DataTableAttribute

type DataTableAttribute interface {
	GetDataTableHeader() template.HTML
	SetThead(value []map[string]string) DataTableAttribute
	SetInfoList(value []map[string]template.HTML) DataTableAttribute
	SetEditUrl(value string) DataTableAttribute
	SetDeleteUrl(value string) DataTableAttribute
	SetNewUrl(value string) DataTableAttribute
	SetPrimaryKey(value string) DataTableAttribute
	SetIsTab(value bool) DataTableAttribute
	SetFilterUrl(value string) DataTableAttribute
	SetInfoUrl(value string) DataTableAttribute
	SetExportUrl(value string) DataTableAttribute
	SetFilters(value []map[string]string) DataTableAttribute
	GetContent() template.HTML
}

type DescriptionAttribute

type DescriptionAttribute interface {
	SetNumber(value template.HTML) DescriptionAttribute
	SetTitle(value template.HTML) DescriptionAttribute
	SetArrow(value string) DescriptionAttribute
	SetPercent(value template.HTML) DescriptionAttribute
	SetBorder(value string) DescriptionAttribute
	SetColor(value template.HTML) DescriptionAttribute
	GetContent() template.HTML
}

type Field added in v0.0.4

type Field struct {
	FilterFn   FieldFilterFn
	Field      string
	TypeName   db.DatabaseType
	Head       string
	Width      int
	Join       Join
	Sortable   bool
	Fixed      bool
	Filterable bool
	Hide       bool
}

Field is the table field.

type FieldFilterFn added in v0.0.5

type FieldFilterFn func(value RowModel) interface{}

FieldFilterFn is filter function of data.

type Form added in v0.0.4

type Form struct {
	Field                  string
	TypeName               db.DatabaseType
	Head                   string
	Default                string
	Editable               bool
	FormType               form.Type
	Value                  string
	Options                []map[string]string
	DefaultOptionDelimiter string
	FilterFn               FieldFilterFn
	PostFilterFn           PostFieldFilterFn
	ProcessFn              ProcessFn
}

Form is the form field with different options.

type FormAttribute

type FormAttribute interface {
	SetHeader(value template.HTML) FormAttribute
	SetContent(value []Form) FormAttribute
	SetGroupContent(value [][]Form) FormAttribute
	SetGroupHeaders(value []string) FormAttribute
	SetFooter(value template.HTML) FormAttribute
	SetPrefix(value string) FormAttribute
	SetUrl(value string) FormAttribute
	SetPrimaryKey(value string) FormAttribute
	SetInfoUrl(value string) FormAttribute
	SetMethod(value string) FormAttribute
	SetTitle(value template.HTML) FormAttribute
	SetToken(value string) FormAttribute
	GetContent() template.HTML
}

type FormList added in v0.2.3

type FormList []Form

func (FormList) Copy added in v0.2.6

func (f FormList) Copy() FormList

func (FormList) FindByField added in v0.2.3

func (f FormList) FindByField(field string) Form

type FormPanel

type FormPanel struct {
	FormList     FormList
	Group        [][]string
	GroupHeaders []string
	Table        string
	Title        string
	Description  string
	HeaderHtml   template.HTML
	FooterHtml   template.HTML
}

FormPanel

type GetPanel

type GetPanel func() Panel

type ImgAttribute

type ImgAttribute interface {
	SetWidth(value string) ImgAttribute
	SetHeight(value string) ImgAttribute
	SetSrc(value string) ImgAttribute
	GetContent() template.HTML
}

type InfoBoxAttribute

type InfoBoxAttribute interface {
	SetIcon(value template.HTML) InfoBoxAttribute
	SetText(value template.HTML) InfoBoxAttribute
	SetNumber(value template.HTML) InfoBoxAttribute
	SetContent(value template.HTML) InfoBoxAttribute
	SetColor(value template.HTML) InfoBoxAttribute
	GetContent() template.HTML
}

type InfoPanel

type InfoPanel struct {
	FieldList    []Field
	Table        string
	Title        string
	Sort         Sort
	Group        [][]string
	GroupHeaders []string
	Description  string
	HeaderHtml   template.HTML
	FooterHtml   template.HTML
}

InfoPanel

type Join added in v0.0.4

type Join struct {
	Table     string
	Field     string
	JoinField string
	HasChild  bool
	JoinTable *Join
}

func (Join) Valid added in v0.2.6

func (j Join) Valid() bool

type LabelAttribute

type LabelAttribute interface {
	SetContent(value template.HTML) LabelAttribute
	GetContent() template.HTML
}

type LineChartAttribute

type LineChartAttribute interface {
	SetID(value string) LineChartAttribute
	SetTitle(value template.HTML) LineChartAttribute
	SetHeight(value int) LineChartAttribute
	SetData(value string) LineChartAttribute
	GetContent() template.HTML
}

type Page

type Page struct {
	// User is the login user.
	User models.UserModel

	// Menu is the left side menu of the template.
	Menu menu.Menu

	// Panel is the main content of template.
	Panel Panel

	// System contains some system info.
	System SystemInfo

	// UrlPrefix is the prefix of url.
	UrlPrefix string

	// Title is the title of the web page.
	Title string

	Logo template.HTML

	MiniLogo template.HTML

	// ColorScheme is the color scheme of the template.
	ColorScheme string

	// IndexUrl is the home page url of the site.
	IndexUrl string
}

Page used in the template as a top variable.

type PaginatorAttribute

type PaginatorAttribute interface {
	SetCurPageStartIndex(value string) PaginatorAttribute
	SetCurPageEndIndex(value string) PaginatorAttribute
	SetTotal(value string) PaginatorAttribute
	SetPreviousClass(value string) PaginatorAttribute
	SetPreviousUrl(value string) PaginatorAttribute
	SetPages(value []map[string]string) PaginatorAttribute
	SetNextClass(value string) PaginatorAttribute
	SetNextUrl(value string) PaginatorAttribute
	SetOption(value map[string]template.HTML) PaginatorAttribute
	SetUrl(value string) PaginatorAttribute
	GetContent() template.HTML
}

type Panel

type Panel struct {
	Content     template.HTML
	Title       string
	Description string
	Url         string
}

Panel contains the main content of the template which used as pjax.

type PieChartAttribute

type PieChartAttribute interface {
	SetID(value string) PieChartAttribute
	SetData(value string) PieChartAttribute
	SetTitle(value template.HTML) PieChartAttribute
	SetHeight(value int) PieChartAttribute
	GetContent() template.HTML
}

type PopupAttribute added in v0.0.4

type PopupAttribute interface {
	SetID(value string) PopupAttribute
	SetTitle(value template.HTML) PopupAttribute
	SetFooter(value template.HTML) PopupAttribute
	SetBody(value template.HTML) PopupAttribute
	SetSize(value string) PopupAttribute
	GetContent() template.HTML
}

type PostFieldFilterFn added in v0.0.14

type PostFieldFilterFn func(value PostRowModel) string

PostFieldFilterFn is filter function of data.

type PostRowModel added in v0.0.14

type PostRowModel struct {
	ID    string
	Value RowModelValue
	Row   map[string]interface{}
}

PostRowModel contains ID and value of the single query result.

type ProcessFn added in v0.2.3

type ProcessFn func(value PostRowModel)

ProcessFn process the data and store into the database.

type ProductListAttribute

type ProductListAttribute interface {
	SetData(value []map[string]string) ProductListAttribute
	GetContent() template.HTML
}

type ProgressAttribute

type ProgressAttribute interface{}

type ProgressGroupAttribute

type ProgressGroupAttribute interface {
	SetTitle(value template.HTML) ProgressGroupAttribute
	SetColor(value template.HTML) ProgressGroupAttribute
	SetPercent(value int) ProgressGroupAttribute
	SetDenominator(value int) ProgressGroupAttribute
	SetMolecular(value int) ProgressGroupAttribute
	GetContent() template.HTML
}

type RowAttribute

type RowAttribute interface {
	SetContent(value template.HTML) RowAttribute
	GetContent() template.HTML
}

type RowModel

type RowModel struct {
	ID    string
	Value string
	Row   map[string]interface{}
}

RowModel contains ID and value of the single query result.

type RowModelValue added in v0.0.14

type RowModelValue []string

func (RowModelValue) First added in v0.0.14

func (r RowModelValue) First() string

func (RowModelValue) Value added in v0.0.14

func (r RowModelValue) Value() string

type SmallBoxAttribute

type SmallBoxAttribute interface {
	SetTitle(value template.HTML) SmallBoxAttribute
	SetValue(value template.HTML) SmallBoxAttribute
	SetUrl(value string) SmallBoxAttribute
	GetContent() template.HTML
}

type Sort added in v0.3.0

type Sort uint8
const (
	SortDesc Sort = iota
	SortAsc
)

type SystemInfo

type SystemInfo struct {
	Version string
}

SystemInfo contains basic info of system.

type TableAttribute

type TableAttribute interface {
	SetThead(value []map[string]string) TableAttribute
	SetInfoList(value []map[string]template.HTML) TableAttribute
	SetType(value string) TableAttribute
	GetContent() template.HTML
}

type TabsAttribute

type TabsAttribute interface {
	SetData(value []map[string]template.HTML) TabsAttribute
	GetContent() template.HTML
}

type TreeAttribute

type TreeAttribute interface {
	SetTree(value []menu.Item) TreeAttribute
	SetEditUrl(value string) TreeAttribute
	SetOrderUrl(value string) TreeAttribute
	SetDeleteUrl(value string) TreeAttribute
	GetContent() template.HTML
	GetTreeHeader() template.HTML
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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