Documentation ¶
Index ¶
- Variables
- func APIConfigGetName() string
- func APIConfigGetName_test(t *testing.T)
- func CssConfigGetName() string
- func HTMLConfigGetName() string
- func JavaScriptConfigGetName() string
- func LocalJSONConfigGetName() string
- func MenuConfigGetName() string
- func MultipleImagesConfigGetName() string
- func PluginRenderGetName() string
- func SingleImageConfigGetName() string
- func SortHyperMediasBySection(pagesBySection map[string][]composite.HyperMediaConfig, options SortOptions) (map[string][]composite.HyperMediaConfig, error)
- func StyleConfigGetName() string
- func TextConfigGetName() string
- type APIConfig
- type APIRenderer
- type CssConfig
- type CssRenderer
- type HTMLConfig
- type HTMLRenderer
- type HyperMediaConfig
- type ImageProcessor
- type JavaScriptConfig
- type JavaScriptRenderer
- type LocalJSONConfig
- type LocalJSONRenderer
- type MenuConfig
- type MenuRenderer
- type MultipleImagesConfig
- type MultipleImagesRenderer
- type PluginConfig
- type PluginRenderer
- type RenderImageConfig
- type SingleImageConfig
- type SingleImageRenderer
- type SortOptions
- type StyleConfig
- type StyleRenderer
- type TextConfig
- type TextRenderer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func APIConfigGetName ¶
func APIConfigGetName() string
func APIConfigGetName_test ¶
func CssConfigGetName ¶
func CssConfigGetName() string
func HTMLConfigGetName ¶
func HTMLConfigGetName() string
func JavaScriptConfigGetName ¶
func JavaScriptConfigGetName() string
func LocalJSONConfigGetName ¶
func LocalJSONConfigGetName() string
func MenuConfigGetName ¶
func MenuConfigGetName() string
func MultipleImagesConfigGetName ¶
func MultipleImagesConfigGetName() string
func PluginRenderGetName ¶
func PluginRenderGetName() string
func SingleImageConfigGetName ¶
func SingleImageConfigGetName() string
func SortHyperMediasBySection ¶
func SortHyperMediasBySection(pagesBySection map[string][]composite.HyperMediaConfig, options SortOptions) (map[string][]composite.HyperMediaConfig, error)
func StyleConfigGetName ¶
func StyleConfigGetName() string
func TextConfigGetName ¶
func TextConfigGetName() string
Types ¶
type APIConfig ¶
type APIConfig struct { shared.Component `mapstructure:",squash"` Endpoint string `mapstructure:"endpoint" validate:"required" description:"The API endpoint" example:"{!{api-render-endpoint.hyperbricks}}"` Method string `` /* 162-byte string literal not displayed */ Headers map[string]string `mapstructure:"headers" description:"Optional HTTP headers for API requests" example:"{!{api-render-headers.hyperbricks}}"` Body string `` /* 205-byte string literal not displayed */ Template string `` /* 143-byte string literal not displayed */ IsTemplate bool `mapstructure:"istemplate"` User string `mapstructure:"user" description:"User for basic auth" example:"{!{api-render-user.hyperbricks}}"` Pass string `mapstructure:"pass" description:"User for basic auth" example:"{!{api-render-pass.hyperbricks}}"` Debug bool `mapstructure:"debug" description:"Debug the response data" example:"{!{api-render-debug.hyperbricks}}"` }
type APIRenderer ¶
type APIRenderer struct {
renderer.ComponentRenderer
}
func (*APIRenderer) Render ¶
func (ar *APIRenderer) Render(instance interface{}) (string, []error)
func (*APIRenderer) Types ¶
func (r *APIRenderer) Types() []string
type CssConfig ¶
type CssRenderer ¶
type CssRenderer struct{}
func (*CssRenderer) Render ¶
func (sr *CssRenderer) Render(instance interface{}) (string, []error)
func (*CssRenderer) Types ¶
func (r *CssRenderer) Types() []string
type HTMLConfig ¶
type HTMLConfig struct { shared.Component `mapstructure:",squash"` Value string `mapstructure:"value" validate:"required" description:"The raw HTML content" example:"{!{html-value.hyperbricks}}"` TrimSpace bool `` /* 168-byte string literal not displayed */ }
func (*HTMLConfig) Validate ¶
func (hc *HTMLConfig) Validate() []error
type HTMLRenderer ¶
type HTMLRenderer struct{}
func (*HTMLRenderer) Render ¶
func (hr *HTMLRenderer) Render(instance interface{}) (string, []error)
func (*HTMLRenderer) Types ¶
func (r *HTMLRenderer) Types() []string
type HyperMediaConfig ¶
type ImageProcessor ¶
type ImageProcessor struct{}
func (*ImageProcessor) ProcessMultipleImages ¶
func (ir *ImageProcessor) ProcessMultipleImages(config MultipleImagesConfig) (string, error)
func (*ImageProcessor) ProcessSingleImage ¶
func (ir *ImageProcessor) ProcessSingleImage(config SingleImageConfig) (string, error)
func (*ImageProcessor) Render ¶
func (ir *ImageProcessor) Render(instance interface{}) (string, error)
type JavaScriptConfig ¶
type JavaScriptConfig struct { shared.Component `mapstructure:",squash"` Inline string `` /* 168-byte string literal not displayed */ Link string `mapstructure:"link" description:"Use link for a script tag with a src attribute" example:"{!{javascript-link.hyperbricks}}"` File string `` /* 168-byte string literal not displayed */ }
func (*JavaScriptConfig) Validate ¶
func (js *JavaScriptConfig) Validate() []error
type JavaScriptRenderer ¶
type JavaScriptRenderer struct{}
func (*JavaScriptRenderer) Render ¶
func (jsr *JavaScriptRenderer) Render(instance interface{}) (string, []error)
func (*JavaScriptRenderer) Types ¶
func (r *JavaScriptRenderer) Types() []string
type LocalJSONConfig ¶
type LocalJSONConfig struct { shared.Component `mapstructure:",squash"` FilePath string `mapstructure:"file" validate:"required" description:"Path to the local JSON file" example:"{!{json-file.hyperbricks}}"` Template string `` /* 128-byte string literal not displayed */ IsTemplate bool `mapstructure:"istemplate"` Debug bool `mapstructure:"debug" description:"Debug the response data" example:"{!{json-debug.hyperbricks}}"` }
func (*LocalJSONConfig) Validate ¶
func (config *LocalJSONConfig) Validate() []error
type LocalJSONRenderer ¶
func (*LocalJSONRenderer) Render ¶
func (renderer *LocalJSONRenderer) Render(instance interface{}) (string, []error)
func (*LocalJSONRenderer) Types ¶
func (r *LocalJSONRenderer) Types() []string
type MenuConfig ¶
type MenuConfig struct { shared.Component `mapstructure:",squash"` Section string `` /* 132-byte string literal not displayed */ Order string `` /* 148-byte string literal not displayed */ Sort string `` /* 169-byte string literal not displayed */ Active string `` /* 129-byte string literal not displayed */ Item string `mapstructure:"item" validate:"required" description:"Template for regular menu items." example:"{!{menu-item.hyperbricks}}"` Enclose string `mapstructure:"enclose" description:"Template to enclose the menu items." example:"{!{menu-enclose.hyperbricks}}"` HyperMediasBySection map[string][]composite.HyperMediaConfig }
func (*MenuConfig) Validate ¶
func (mc *MenuConfig) Validate() []error
type MenuRenderer ¶
type MenuRenderer struct { TemplateProvider func(templateName string) (string, bool) HyperMediasBySection map[string][]composite.HyperMediaConfig CurrentRoute string }
func (*MenuRenderer) Render ¶
func (mr *MenuRenderer) Render(instance interface{}) (string, []error)
func (*MenuRenderer) Types ¶
func (r *MenuRenderer) Types() []string
type MultipleImagesConfig ¶
type MultipleImagesConfig struct { shared.Component `mapstructure:",squash"` Directory string `` /* 143-byte string literal not displayed */ Width int `` /* 147-byte string literal not displayed */ Height int `` /* 150-byte string literal not displayed */ Id string `mapstructure:"id" description:"Id of images with a index added to it" example:"{!{images-id.hyperbricks}}"` Class string `mapstructure:"class" description:"CSS class for styling the image" example:"{!{images-class.hyperbricks}}"` IsStatic bool `mapstructure:"is_static" description:"Flag indicating if the images are static" example:"{!{images-is_static.hyperbricks}}"` Alt string `mapstructure:"alt" description:"Alternative text for the image" example:"{!{images-alt.hyperbricks}}"` Title string `mapstructure:"title" description:"The title attribute of the image" example:"{!{images-title.hyperbricks}}"` Quality int `mapstructure:"quality" description:"Image quality for optimization" example:"{!{images-quality.hyperbricks}}"` Loading string `mapstructure:"loading" description:"Lazy loading strategy (e.g., 'lazy', 'eager')" example:"{!{images-loading.hyperbricks}}"` }
func (*MultipleImagesConfig) Validate ¶
func (config *MultipleImagesConfig) Validate() []error
type MultipleImagesRenderer ¶
type MultipleImagesRenderer struct {
ImageProcessorInstance *ImageProcessor
}
func (*MultipleImagesRenderer) Render ¶
func (mir *MultipleImagesRenderer) Render(instance interface{}) (string, []error)
func (*MultipleImagesRenderer) Types ¶
func (r *MultipleImagesRenderer) Types() []string
type PluginConfig ¶
type PluginRenderer ¶
type PluginRenderer struct {
renderer.CompositeRenderer
}
func (*PluginRenderer) LoadAndRender ¶
func (r *PluginRenderer) LoadAndRender(instance interface{}) (string, []error)
func (*PluginRenderer) Render ¶
func (r *PluginRenderer) Render(instance interface{}) (string, []error)
func (*PluginRenderer) Types ¶
func (r *PluginRenderer) Types() []string
type RenderImageConfig ¶
type RenderImageConfig struct { Single *SingleImageConfig `mapstructure:"single"` Multiple *MultipleImagesConfig `mapstructure:"multiple"` }
type SingleImageConfig ¶
type SingleImageConfig struct { shared.Component `mapstructure:",squash"` Src string `mapstructure:"src" validate:"required" description:"The source URL of the image" example:"{!{image-src.hyperbricks}}"` Width int `` /* 145-byte string literal not displayed */ Height int `` /* 148-byte string literal not displayed */ Alt string `mapstructure:"alt" description:"Alternative text for the image" example:"{!{image-alt.hyperbricks}}"` Title string `mapstructure:"title" description:"The title attribute of the image" example:"{!{image-title.hyperbricks}}"` Id string `mapstructure:"id" description:"Id of image" example:"{!{image-id.hyperbricks}}"` Class string `mapstructure:"class" description:"CSS class for styling the image" example:"{!{image-class.hyperbricks}}"` Quality int `mapstructure:"quality" description:"Image quality for optimization" example:"{!{image-quality.hyperbricks}}"` Loading string `mapstructure:"loading" description:"Lazy loading strategy (e.g., 'lazy', 'eager')" example:"{!{image-loading.hyperbricks}}"` IsStatic bool `mapstructure:"is_static" description:"Flag indicating if the image is static" example:"{!{image-is_static.hyperbricks}}"` }
func (*SingleImageConfig) Validate ¶
func (config *SingleImageConfig) Validate() []error
type SingleImageRenderer ¶
type SingleImageRenderer struct {
ImageProcessorInstance *ImageProcessor
}
func (*SingleImageRenderer) Render ¶
func (sir *SingleImageRenderer) Render(instance interface{}) (string, []error)
func (*SingleImageRenderer) Types ¶
func (r *SingleImageRenderer) Types() []string
type SortOptions ¶
type StyleConfig ¶
type StyleConfig struct { shared.Component `mapstructure:",squash"` File string `mapstructure:"file" validate:"required" description:"Path to the CSS file" example:"{!{styles-file.hyperbricks}}"` }
func (*StyleConfig) Validate ¶
func (style *StyleConfig) Validate() []error
type StyleRenderer ¶
type StyleRenderer struct{}
func (*StyleRenderer) Render ¶
func (sr *StyleRenderer) Render(instance interface{}) (string, []error)
func (*StyleRenderer) Types ¶
func (r *StyleRenderer) Types() []string
type TextConfig ¶
type TextConfig struct { shared.Component `mapstructure:",squash"` Value string `mapstructure:"value" validate:"required" description:"The paragraph content" example:"{!{text-value.hyperbricks}}"` }
func (*TextConfig) Validate ¶
func (tc *TextConfig) Validate() []error
type TextRenderer ¶
type TextRenderer struct{}
func (*TextRenderer) Render ¶
func (tr *TextRenderer) Render(instance interface{}) (string, []error)
func (*TextRenderer) Types ¶
func (r *TextRenderer) Types() []string
Click to show internal directories.
Click to hide internal directories.