types

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	// Name is the instance name of the module.
	// This should be used to target a specific instance
	// of the module.
	Name string

	// Path is the full path of the module.
	// This should be used to load assets.
	Path string

	// Log is a logger instance.
	Log Logger
}

Info provides information about the module.

type Logger

type Logger interface {
	Info(msg string, ctx ...interface{})
	Error(msg string, ctx ...interface{})
}

Logger represents a logger.

type UI

type UI interface {
	// LoadCSS adds css for use with the module.
	LoadCSS(css string) error
	// LoadHTML loads html into the element.
	LoadHTML(html string) error
	// Bind bind a function to javascript.
	Bind(name string, fun interface{}) error
	// Eval evaluates a command in the ui.
	Eval(cmd string, ctx ...interface{}) (interface{}, error)
}

UI represents the ui manager.

Jump to

Keyboard shortcuts

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