pagedash

package
v0.0.0-...-8c2001a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBuilder

func NewBuilder(app any) (etypes.ExecutorBuilder, error)

func RegisterHookFunc

func RegisterHookFunc(name string, hfunc HookFunc)

Types

type BuildRequest

type BuildRequest struct {
	Options any `json:"options,omitempty"`
}

type BuildRespone

type BuildRespone struct {
	Id string `json:"options,omitempty"`
}

type DashModel

type DashModel struct {
	Name       string            `json:"name,omitempty" yaml:"name,omitempty"`
	Sections   []Section         `json:"sections,omitempty" yaml:"sections,omitempty"`
	OnLoad     []Hook            `json:"on_load,omitempty" yaml:"on_load,omitempty"`
	OnBuild    []Hook            `json:"on_build,omitempty" yaml:"on_build,omitempty"`
	StaticData map[string]any    `json:"static_data,omitempty" yaml:"static_data,omitempty"`
	Sources    map[string]Source `json:"sources,omitempty" yaml:"sources,omitempty"`
}

type Hook

type Hook struct {
	Name    string         `json:"name,omitempty" yaml:"name,omitempty"`
	Target  string         `json:"target,omitempty" yaml:"target,omitempty"`
	Type    string         `json:"type,omitempty" yaml:"type,omitempty"`
	Options map[string]any `json:"options,omitempty" yaml:"options,omitempty"`
}

type HookFunc

type HookFunc func(ctx *PdCtx) error

type Index

type Index struct {
	ActiveKey    string            `json:"active_key,omitempty"`
	BuildDate    string            `json:"build_date,omitempty"`
	PreviousKeys map[string]string `json:"previous_keys,omitempty"`
	Version      int64             `json:"-"`
}

type LoadRequest

type LoadRequest struct {
	ExecData any    `json:"exec_data,omitempty"`
	Id       string `json:"version,omitempty"`
}

type LoadResponse

type LoadResponse struct {
	Name         string            `json:"name,omitempty"`
	Data         map[string]any    `json:"data,omitempty"`
	Sources      map[string]Source `json:"sources,omitempty"`
	Sections     []Section         `json:"sections,omitempty"`
	ActiveKey    string            `json:"active_key,omitempty"`
	BuildDate    string            `json:"build_date,omitempty"`
	PreviousKeys map[string]string `json:"previous_keys,omitempty"`
}

type PageDash

type PageDash struct {
	// contains filtered or unexported fields
}

func (*PageDash) Process

func (pd *PageDash) Process(ev *event.Request) (*event.Response, error)

type Panel

type Panel struct {
	Name     string         `json:"name,omitempty" yaml:"name,omitempty"`
	Type     string         `json:"type,omitempty" yaml:"type,omitempty"`
	Info     string         `json:"info,omitempty" yaml:"info,omitempty"`
	ViewOpts map[string]any `json:"view_opts,omitempty" yaml:"view_opts,omitempty"`
	DataOpts map[string]any `json:"data_opts,omitempty" yaml:"data_opts,omitempty"`
	Source   string         `json:"source,omitempty" yaml:"source,omitempty"`
}

type PdBuilder

type PdBuilder struct {
	// contains filtered or unexported fields
}

func (*PdBuilder) ExecFile

func (pd *PdBuilder) ExecFile(file string) ([]byte, error)

func (*PdBuilder) IfaceFile

func (pd *PdBuilder) IfaceFile() (*etypes.ExecutorIface, error)

func (*PdBuilder) Instance

func (pd *PdBuilder) Instance(opts etypes.ExecutorOption) (etypes.Executor, error)

type PdCtx

type PdCtx struct {
	Binder  bindx.Bindings
	Data    map[string]any
	Model   *DashModel
	Message string
	Rt      *goja.Runtime
}

type Section

type Section struct {
	Name    string         `json:"name,omitempty" yaml:"name,omitempty"`
	Layout  string         `json:"layout,omitempty" yaml:"layout,omitempty"`
	Panels  []Panel        `json:"panels,omitempty" yaml:"panels,omitempty"`
	Options map[string]any `json:"options,omitempty" yaml:"options,omitempty"`
}

type Source

type Source struct {
	Name    string         `json:"name,omitempty" yaml:"name,omitempty"`
	Type    string         `json:"type,omitempty" yaml:"type,omitempty"`
	Options map[string]any `json:"options,omitempty" yaml:"options,omitempty"`
}

Jump to

Keyboard shortcuts

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