Documentation
¶
Index ¶
- Variables
- func ColToString(c *Column, prefix string) string
- func ColToViewString(c *Column, prefix string) string
- func TypeToString(t *Type, prop string) string
- func TypeToViewString(t *Type, prop string, nullable bool) string
- type Args
- type Column
- func (c *Column) BC() string
- func (c *Column) Camel() string
- func (c *Column) HasTag(t string) bool
- func (c *Column) Help() string
- func (c *Column) NameQuoted() string
- func (c *Column) Plural() string
- func (c *Column) Proper() string
- func (c *Column) ProperPlural() string
- func (c *Column) Title() string
- func (c *Column) TitleLower() string
- func (c *Column) ToGoDTOType() string
- func (c *Column) ToGoEditString(prefix string) string
- func (c *Column) ToGoMapParse() string
- func (c *Column) ToGoString(prefix string) string
- func (c *Column) ToGoType() string
- func (c *Column) ToGoViewString(prefix string) string
- func (c *Column) ToSQLType() string
- func (c *Column) ZeroVal() string
- type Columns
- func (c Columns) Args() string
- func (c Columns) CamelNames() []string
- func (c Columns) Get(name string) *Column
- func (c Columns) GoDTOTypeKeys() []string
- func (c Columns) GoTypeKeys() []string
- func (c Columns) MaxGoDTOKeyLength() int
- func (c Columns) MaxGoKeyLength() int
- func (c Columns) Names() []string
- func (c Columns) NamesQuoted() []string
- func (c Columns) NonPKs() Columns
- func (c Columns) OneWithTag(t string) (*Column, error)
- func (c Columns) PKs() Columns
- func (c Columns) Refs() string
- func (c Columns) Searches() Columns
- func (c Columns) Smushed() string
- func (c Columns) Types() Types
- func (c Columns) WhereClause(offset int) string
- func (c Columns) WithTag(t string) Columns
- func (c Columns) WithoutTag(t string) Columns
- func (c Columns) ZeroVals() []string
- type HistoryMap
- type Model
- func (m *Model) Camel() string
- func (m *Model) ClassRef() string
- func (m *Model) FirstLetter() string
- func (m *Model) GroupedColumns() Columns
- func (m *Model) HasTag(t string) bool
- func (m *Model) Help() string
- func (m *Model) HistoryColumn() *Column
- func (m *Model) HistoryColumns(coreColumns bool) *HistoryMap
- func (m *Model) IconSafe() string
- func (m *Model) IsRevision() bool
- func (m *Model) IsSoftDelete() bool
- func (m *Model) LinkURL(prefix string) string
- func (m *Model) PKs() Columns
- func (m *Model) Plural() string
- func (m *Model) Proper() string
- func (m *Model) ProperPlural() string
- func (m *Model) Title() string
- func (m *Model) TitleLower() string
- func (m *Model) TitlePlural() string
- func (m *Model) TitlePluralLower() string
- func (m *Model) URLPath(prefix string) string
- func (m *Model) Validate() error
- type Models
- type Type
- func (t *Type) Help() string
- func (t *Type) IsScalar() bool
- func (t *Type) MarshalJSON() ([]byte, error)
- func (t *Type) String() string
- func (t *Type) ToGoDTOType(nullable bool) string
- func (t *Type) ToGoString(prop string) string
- func (t *Type) ToGoType(nullable bool) string
- func (t *Type) ToGoViewString(prop string, nullable bool) string
- func (t *Type) ToSQLType() string
- func (t *Type) UnmarshalJSON(data []byte) error
- type Types
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TypeInt = newType("int") TypeMap = newType("map", "json", "jsonb") TypeString = newType("string", "text") TypeTimestamp = newType("timestamp", "datetime") TypeUUID = newType("uuid") AllTypes = []*Type{TypeInt, TypeMap, TypeString, TypeTimestamp, TypeUUID} )
View Source
var RevisionType = "revision"
Functions ¶
func ColToString ¶
func ColToViewString ¶
func TypeToString ¶
Types ¶
type Args ¶
type Column ¶
type Column struct {
Name string `json:"name"`
Type *Type `json:"type"`
PK bool `json:"pk,omitempty"`
Nullable bool `json:"nullable,omitempty"`
Search bool `json:"search,omitempty"`
SQLDefault string `json:"sqlDefault,omitempty"`
Tags []string `json:"tags,omitempty"`
}
func (*Column) NameQuoted ¶ added in v0.1.32
func (*Column) ProperPlural ¶ added in v0.1.29
func (*Column) TitleLower ¶ added in v0.1.32
func (*Column) ToGoDTOType ¶
func (*Column) ToGoEditString ¶
func (*Column) ToGoMapParse ¶
func (*Column) ToGoString ¶
func (*Column) ToGoViewString ¶
type Columns ¶
type Columns []*Column
func (Columns) CamelNames ¶
func (Columns) GoDTOTypeKeys ¶
func (Columns) GoTypeKeys ¶
func (Columns) MaxGoDTOKeyLength ¶
func (Columns) MaxGoKeyLength ¶
func (Columns) NamesQuoted ¶
func (Columns) WhereClause ¶
func (Columns) WithoutTag ¶ added in v0.1.29
type HistoryMap ¶ added in v0.1.29
type Model ¶
type Model struct {
Name string `json:"name"`
Package string `json:"package"`
Description string `json:"description,omitempty"`
Icon string `json:"icon,omitempty"`
Ordering filter.Orderings `json:"ordering,omitempty"`
Search []string `json:"search,omitempty"`
History string `json:"history,omitempty"`
Tags []string `json:"tags,omitempty"`
TitleOverride string `json:"title,omitempty"`
ProperOverride string `json:"proper,omitempty"`
Config util.ValueMap `json:"config,omitempty"`
Columns Columns `json:"columns"`
// contains filtered or unexported fields
}
func (*Model) FirstLetter ¶
func (*Model) GroupedColumns ¶ added in v0.1.29
func (*Model) HistoryColumn ¶ added in v0.1.29
func (*Model) HistoryColumns ¶ added in v0.1.29
func (m *Model) HistoryColumns(coreColumns bool) *HistoryMap
func (*Model) IsRevision ¶ added in v0.1.29
func (*Model) IsSoftDelete ¶ added in v0.1.29
func (*Model) ProperPlural ¶
func (*Model) TitleLower ¶ added in v0.1.32
func (*Model) TitlePlural ¶ added in v0.1.32
func (*Model) TitlePluralLower ¶ added in v0.1.32
type Type ¶
func TypeFromString ¶
func (*Type) MarshalJSON ¶
func (*Type) ToGoDTOType ¶
func (*Type) ToGoString ¶
func (*Type) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.