Documentation
¶
Index ¶
- func Build(blueprint Blueprint) (*ember.App, error)
- func Deconflict(name string) string
- func MustBuild(blueprint Blueprint) *ember.App
- type Any
- type Attribute
- type Backend
- type Blueprint
- type Column
- type Condition
- type Control
- type Expression
- type Field
- type Filter
- type Format
- type Kind
- type Menu
- type MenuItem
- type Model
- type Option
- type Order
- type Property
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deconflict ¶
Deconflict will return a model key that is conflict safe. It will use an titelized version of the key for conflicting keys.
Types ¶
type Attribute ¶
type Attribute struct {
Name string `json:"name"`
Kind Kind `json:"kind"`
Type Type `json:"type,omitempty"`
Inverse string `json:"inverse,omitempty"`
Default Any `json:"default,omitempty"`
Init Expression `json:"init,omitempty"`
}
Attribute describes a static model attribute.
type Backend ¶
type Backend struct {
BaseURL string `json:"baseURL"`
AuthPath string `json:"authPath"`
AuthScope string `json:"authScope"`
DataPath string `json:"dataPath"`
WatchPath string `json:"watchPath"`
ClientID string `json:"clientID"`
}
Backend describes the backend service.
type Blueprint ¶
type Blueprint struct {
Title string `json:"title"`
Backend Backend `json:"backend"`
Menu Menu `json:"menu"`
Models []Model `json:"models"`
}
Blueprint configures a thermo application.
type Column ¶
type Column struct {
Title string `json:"title"`
Key string `json:"key"`
Format Format `json:"format,omitempty"`
Label string `json:"label,omitempty"`
}
Column describes a table column.
type Condition ¶
type Condition string
Condition describes a filter condition.
const (
ConditionBoolean Condition = "boolean"
)
The available filter conditions.
type Field ¶
type Field struct {
Label string `json:"label"`
Key string `json:"key"`
Hint string `json:"hint"`
Control Control `json:"control"`
Placeholder string `json:"placeholder,omitempty"`
Redacted bool `json:"redacted,omitempty"`
Min float64 `json:"min,omitempty"`
Max float64 `json:"max,omitempty"`
Step float64 `json:"step,omitempty"`
Options []Option `json:"options,omitempty"`
Source Expression `json:"source,omitempty"`
Multiple bool `json:"multiple,omitempty"`
LabelKey string `json:"labelKey,omitempty"`
EmptyLabel string `json:"emptyLabel,omitempty"`
AllowEmpty bool `json:"allowEmpty,omitempty"`
}
Field describes a form field.
type Filter ¶
type Filter struct {
Title string `json:"title"`
Key string `json:"key"`
Condition Condition `json:"condition"`
}
Filter describes a list filter.
type Format ¶
type Format string
Format describes a column format.
const ( FormatLiteral Format = "literal" FormatBoolean Format = "boolean" FormatAbsoluteDate Format = "absolute-date" FormatRelativeDate Format = "relative-date" FormatProgress Format = "progress" FormatBelongsTo Format = "belongs-to" FormatHasMany Format = "has-many" )
The available column formats.
type Model ¶
type Model struct {
Name string `json:"name"`
Title string `json:"title"`
Watchable bool `json:"watchable"`
Immediate bool `json:"immediate"`
Attributes []Attribute `json:"attributes"`
Properties []Property `json:"properties"`
Orders []Order `json:"orders"`
Filters []Filter `json:"filters"`
Columns []Column `json:"columns"`
Fields []Field `json:"fields"`
}
Model describes a model.
func Applications ¶
func Applications() Model
Applications will return the model for managing flame.Application documents.
func Jobs ¶
Jobs will return the model for managing axe.Model documents. If live is true it requires permission to watch documents.
type Property ¶
type Property struct {
Name string `json:"name"`
Keys []string `json:"keys,omitempty"`
Body Expression `json:"body,omitempty"`
}
Property describes a dynamic model property.