Documentation ¶
Index ¶
- Variables
- func NewComponentParams(name string, params []interface{}) *componentParams
- type App
- type AppConfig
- type Catalog
- func (s *Catalog) HasPK() bool
- func (s *Catalog) PKPointer() interface{}
- func (s *Catalog) PKValue() interface{}
- func (s *Catalog) Pointers() []interface{}
- func (s *Catalog) SetPK(pk interface{})
- func (s Catalog) String() string
- func (s *Catalog) Table() reform.Table
- func (s *Catalog) Values() []interface{}
- func (s *Catalog) View() reform.View
- type CatalogItem
- func (s *CatalogItem) HasPK() bool
- func (s *CatalogItem) PKPointer() interface{}
- func (s *CatalogItem) PKValue() interface{}
- func (s *CatalogItem) Pointers() []interface{}
- func (s *CatalogItem) SetPK(pk interface{})
- func (s CatalogItem) String() string
- func (s *CatalogItem) Table() reform.Table
- func (s *CatalogItem) Values() []interface{}
- func (s *CatalogItem) View() reform.View
- type CatalogItemProperty
- func (s *CatalogItemProperty) HasPK() bool
- func (s *CatalogItemProperty) PKPointer() interface{}
- func (s *CatalogItemProperty) PKValue() interface{}
- func (s *CatalogItemProperty) Pointers() []interface{}
- func (s *CatalogItemProperty) SetPK(pk interface{})
- func (s CatalogItemProperty) String() string
- func (s *CatalogItemProperty) Table() reform.Table
- func (s *CatalogItemProperty) Values() []interface{}
- func (s *CatalogItemProperty) View() reform.View
- type Component
- type ComponentParams
- type ComponentWrapper
- type Context
- type Page
- type PageData
- func (pd *PageData) AddAsyncCSS(css ...string)
- func (pd *PageData) AddAsyncJS(js ...string)
- func (pd *PageData) AddCSS(css ...string)
- func (pd *PageData) AddDeferJS(js ...string)
- func (pd *PageData) AddJS(js ...string)
- func (pd *PageData) AsyncCSS() string
- func (pd *PageData) Body() string
- func (pd *PageData) CSS() string
- func (pd *PageData) Component(name string, params ...interface{}) string
- func (pd *PageData) Data(k string) interface{}
- func (pd *PageData) EndBody() string
- func (pd *PageData) EndHead() string
- func (pd *PageData) Error(format string, args ...interface{}) string
- func (pd *PageData) Extend() Context
- func (pd *PageData) JS() string
- func (pd *PageData) Request() *http.Request
- func (pd *PageData) SetBody(body string)
- func (pd *PageData) SetData(k string, v interface{})
- func (pd *PageData) SetSlug(slug string)
- func (pd *PageData) Slug() string
- func (pd *PageData) Writer() io.Writer
- type PathFlags
Constants ¶
This section is empty.
Variables ¶
var CatalogItemPropertyTable = &catalogItemPropertyTableType{ s: parse.StructInfo{Type: "CatalogItemProperty", SQLSchema: "", SQLName: "catalog_item_properties", Fields: []parse.FieldInfo{{Name: "PropertyID", Type: "string", Column: "property_id"}, {Name: "ItemID", Type: "string", Column: "item_id"}, {Name: "CatalogID", Type: "string", Column: "catalog_id"}, {Name: "PropertyKey", Type: "string", Column: "property_key"}, {Name: "PropertyValue", Type: "string", Column: "property_value"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "time.Time", Column: "updated_at"}}, PKFieldIndex: 0}, z: new(CatalogItemProperty).Values(), }
CatalogItemPropertyTable represents catalog_item_properties view or table in SQL database.
var CatalogItemTable = &catalogItemTableType{ s: parse.StructInfo{Type: "CatalogItem", SQLSchema: "", SQLName: "catalog_items", Fields: []parse.FieldInfo{{Name: "ItemID", Type: "string", Column: "item_id"}, {Name: "CatalogID", Type: "string", Column: "catalog_id"}, {Name: "ItemName", Type: "string", Column: "item_name"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "time.Time", Column: "updated_at"}}, PKFieldIndex: 0}, z: new(CatalogItem).Values(), }
CatalogItemTable represents catalog_items view or table in SQL database.
var CatalogTable = &catalogTableType{ s: parse.StructInfo{Type: "Catalog", SQLSchema: "", SQLName: "catalogs", Fields: []parse.FieldInfo{{Name: "CatalogID", Type: "string", Column: "catalog_id"}, {Name: "CatalogName", Type: "string", Column: "catalog_name"}, {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, {Name: "UpdatedAt", Type: "time.Time", Column: "updated_at"}}, PKFieldIndex: 0}, z: new(Catalog).Values(), }
CatalogTable represents catalogs view or table in SQL database.
Functions ¶
func NewComponentParams ¶
func NewComponentParams(name string, params []interface{}) *componentParams
Types ¶
type App ¶
type App interface { DB() *reform.DB Components() map[string]ComponentWrapper }
App interface.
type AppConfig ¶
type AppConfig struct { Port int ComponentPaths []string TemplatePaths []string StaticPaths []string }
AppConfig struct.
type Catalog ¶
type Catalog struct { CatalogID string `json:"catalog_id" reform:"catalog_id,pk"` CatalogName string `json:"catalog_name" reform:"catalog_name"` CreatedAt time.Time `json:"created_at" reform:"created_at"` UpdatedAt time.Time `json:"updated_at" reform:"updated_at"` }
func (*Catalog) PKPointer ¶
func (s *Catalog) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*Catalog) PKValue ¶
func (s *Catalog) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*Catalog) Pointers ¶
func (s *Catalog) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*Catalog) Table ¶
func (s *Catalog) Table() reform.Table
Table returns Table object for that record.
type CatalogItem ¶
type CatalogItem struct { ItemID string `json:"item_id" reform:"item_id,pk"` CatalogID string `json:"catalog_id" reform:"catalog_id"` ItemName string `json:"item_name" reform:"item_name"` CreatedAt time.Time `json:"created_at" reform:"created_at"` UpdatedAt time.Time `json:"updated_at" reform:"updated_at"` }
func (*CatalogItem) HasPK ¶
func (s *CatalogItem) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*CatalogItem) PKPointer ¶
func (s *CatalogItem) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*CatalogItem) PKValue ¶
func (s *CatalogItem) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*CatalogItem) Pointers ¶
func (s *CatalogItem) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*CatalogItem) SetPK ¶
func (s *CatalogItem) SetPK(pk interface{})
SetPK sets record primary key.
func (CatalogItem) String ¶
func (s CatalogItem) String() string
String returns a string representation of this struct or record.
func (*CatalogItem) Table ¶
func (s *CatalogItem) Table() reform.Table
Table returns Table object for that record.
func (*CatalogItem) Values ¶
func (s *CatalogItem) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*CatalogItem) View ¶
func (s *CatalogItem) View() reform.View
View returns View object for that struct.
type CatalogItemProperty ¶
type CatalogItemProperty struct { PropertyID string `json:"property_id" reform:"property_id,pk"` ItemID string `json:"item_id" reform:"item_id"` CatalogID string `json:"catalog_id" reform:"catalog_id"` PropertyKey string `json:"property_key" reform:"property_key"` PropertyValue string `json:"property_value" reform:"property_value"` CreatedAt time.Time `json:"created_at" reform:"created_at"` UpdatedAt time.Time `json:"updated_at" reform:"updated_at"` }
func (*CatalogItemProperty) HasPK ¶
func (s *CatalogItemProperty) HasPK() bool
HasPK returns true if record has non-zero primary key set, false otherwise.
func (*CatalogItemProperty) PKPointer ¶
func (s *CatalogItemProperty) PKPointer() interface{}
PKPointer returns a pointer to primary key field for that record. Returned interface{} value is never untyped nil.
func (*CatalogItemProperty) PKValue ¶
func (s *CatalogItemProperty) PKValue() interface{}
PKValue returns a value of primary key for that record. Returned interface{} value is never untyped nil.
func (*CatalogItemProperty) Pointers ¶
func (s *CatalogItemProperty) Pointers() []interface{}
Pointers returns a slice of pointers to struct or record fields. Returned interface{} values are never untyped nils.
func (*CatalogItemProperty) SetPK ¶
func (s *CatalogItemProperty) SetPK(pk interface{})
SetPK sets record primary key.
func (CatalogItemProperty) String ¶
func (s CatalogItemProperty) String() string
String returns a string representation of this struct or record.
func (*CatalogItemProperty) Table ¶
func (s *CatalogItemProperty) Table() reform.Table
Table returns Table object for that record.
func (*CatalogItemProperty) Values ¶
func (s *CatalogItemProperty) Values() []interface{}
Values returns a slice of struct or record field values. Returned interface{} values are never untyped nils.
func (*CatalogItemProperty) View ¶
func (s *CatalogItemProperty) View() reform.View
View returns View object for that struct.
type Component ¶
type Component interface {
Component(Context, ComponentParams) (map[string]interface{}, error)
}
Component interface. Must be implemented by all included components.
type ComponentParams ¶
type ComponentParams interface { Name() string Params() []interface{} }
type ComponentWrapper ¶
type ComponentWrapper interface {
Include(Context, ComponentParams) error
}
ComponentWrapper interface.
type Context ¶
type Context interface { Writer() io.Writer Request() *http.Request AddAsyncCSS(...string) AddCSS(...string) AddAsyncJS(...string) AddDeferJS(...string) AddJS(...string) Component(string, ...interface{}) string SetData(string, interface{}) Data(string) interface{} }
Context interface.
type PageData ¶
type PageData struct {
// contains filtered or unexported fields
}