Documentation ¶
Index ¶
- Variables
- type DataView
- func (v *DataView) ClearActiveView()
- func (v *DataView) GetActiveView() *Definition
- func (v *DataView) GetDefinitions() []Definition
- func (v *DataView) GetView(r *ViewData) ([]string, error)
- func (v *DataView) GetViewByName(pattern string) ([]string, error)
- func (v *DataView) GetViews(pattern string) ([]Definition, error)
- func (v *DataView) LoadDefinitions() error
- type Definition
- type DefinitionCollection
- type ViewData
Constants ¶
This section is empty.
Variables ¶
View Source
var NamespaceSeparator = "::"
Functions ¶
This section is empty.
Types ¶
type DataView ¶
type DataView struct { Paths []string Extension string Pattern string Definitions []Definition Logger *logger.Logger ActiveView *Definition // contains filtered or unexported fields }
DataView data view containing pre-definied views
func NewDataView ¶
func NewDataView(pattern string, extension string, log *logger.Logger, paths ...string) (*DataView, error)
NewDataView creates a new data view which selected a view based in json data
func (*DataView) ClearActiveView ¶
func (v *DataView) ClearActiveView()
ClearActiveView clear the active view
func (*DataView) GetActiveView ¶
func (v *DataView) GetActiveView() *Definition
GetActiveView get the active view
func (*DataView) GetDefinitions ¶
func (v *DataView) GetDefinitions() []Definition
func (*DataView) GetViewByName ¶
GetViewByName get view by name. Accepts wildcard name
func (*DataView) GetViews ¶
func (v *DataView) GetViews(pattern string) ([]Definition, error)
GetViews get a list of view names
func (*DataView) LoadDefinitions ¶
LoadDefinitions load the view definitions
type Definition ¶
type Definition struct { FileName string `json:"-"` Path string `json:"-"` Extension string `json:"-"` Name string `json:"name,omitempty"` Priority int `json:"priority,omitempty"` Fragments []string `json:"fragments,omitempty"` Type string `json:"type,omitempty"` RequestPath string `json:"requestPath,omitempty"` RequestMethod string `json:"requestMethod,omitempty"` ContentType string `json:"contentType,omitempty"` Self string `json:"self,omitempty"` Columns []string `json:"columns,omitempty"` }
Definition contains the view definition of when to use a specific view
func (*Definition) FQDN ¶ added in v2.30.0
func (d *Definition) FQDN() string
type DefinitionCollection ¶
type DefinitionCollection struct {
Definitions []Definition `json:"definitions,omitempty"`
}
DefinitionCollection collection of view definitions
Click to show internal directories.
Click to hide internal directories.