components

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Charter

type Charter interface {
	Type() string
	GetAssets() opts.Assets
	// FillDefaultValues fill default values and would be overridden if any struct fields has been manually set
	FillDefaultValues()
	// Validate a validator as well as a post processor before render
	Validate()
}

Charter represents a chart value which provides its type, assets and can be validated.

type Layout

type Layout string
const (
	PageNoneLayout   Layout = "none"
	PageCenterLayout Layout = "center"
	PageFlexLayout   Layout = "flex"
	PageFullLayout   Layout = "full"
)

type Page

type Page struct {
	render.Renderer
	opts.PageConfiguration
	opts.Assets

	Charts []Charter
	Layout Layout
}

Page represents a page chart.

func NewPage

func NewPage() *Page

NewPage creates a new page.

func (*Page) AddCharts

func (page *Page) AddCharts(charts ...Charter) *Page

AddCharts adds new charts to the page and merge assets.

func (*Page) SetAssetsHost

func (page *Page) SetAssetsHost(assetsHost string) *Page

func (*Page) SetLayout

func (page *Page) SetLayout(layout Layout) *Page

SetLayout sets the layout of the Page.

func (*Page) SetPageTitle

func (page *Page) SetPageTitle(title string) *Page

func (*Page) Validate

func (page *Page) Validate()

Validate validates the given configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL