components

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderBreadcrumpComponent

func RenderBreadcrumpComponent(w io.Writer, data BreadcrumbData) error

func RenderComponent

func RenderComponent(ctx context.Context, w io.Writer, c Component) error

func RenderDirectoryComponent

func RenderDirectoryComponent(w io.Writer, data DirData) error

func RenderHelpComponent

func RenderHelpComponent(w io.Writer, data HelpData) error

func RenderIndexComponent

func RenderIndexComponent(w io.Writer, data IndexData) error

func RenderRealmComponent

func RenderRealmComponent(w io.Writer, data RealmData) error

func RenderRealmTOCComponent

func RenderRealmTOCComponent(w io.Writer, data *RealmTOCData) error

func RenderRedirectComponent

func RenderRedirectComponent(w io.Writer, data RedirectData) error

func RenderSourceComponent

func RenderSourceComponent(w io.Writer, data SourceData) error

func RenderStatusComponent

func RenderStatusComponent(w io.Writer, message string) error

Types

type BreadcrumbData struct {
	Parts []BreadcrumbPart
}
type BreadcrumbPart struct {
	Name string
	Path string
}

type Component

type Component func(ctx context.Context, tmpl *template.Template, w io.Writer) error

func IndexComponent

func IndexComponent(data IndexData) Component

func RealmTOCComponent

func RealmTOCComponent(data *RealmTOCData) Component

func (Component) Render

func (c Component) Render(ctx context.Context, w io.Writer) error

type DirData

type DirData struct {
	PkgPath     string
	Files       []string
	FileCounter int
}

type FooterData

type FooterData struct {
	Analytics  bool
	AssetsPath string
}

type HeadData

type HeadData struct {
	Title       string
	Description string
	Canonical   string
	Image       string
	URL         string
	ChromaPath  string
	AssetsPath  string
	Analytics   bool
}

type HeaderData

type HeaderData struct {
	RealmPath  string
	Breadcrumb BreadcrumbData
	WebQuery   url.Values
}

type HelpData

type HelpData struct {
	// Selected function
	SelectedFunc string
	SelectedArgs map[string]string

	RealmName string
	Functions []vm.FunctionSignature
	ChainId   string
	Remote    string
	PkgPath   string
}

type IndexData

type IndexData struct {
	HeadData
	HeaderData
	FooterData
	Body template.HTML
}

type RealmData

type RealmData struct {
	Content  template.HTML
	TocItems *RealmTOCData
}

type RealmTOCData

type RealmTOCData struct {
	Items []*markdown.TocItem
}

type RedirectData

type RedirectData struct {
	To            string
	WithAnalytics bool
}

type SourceData

type SourceData struct {
	PkgPath     string
	Files       []string
	FileName    string
	FileSize    string
	FileLines   int
	FileCounter int
	FileSource  template.HTML
}

type StatusData

type StatusData struct {
	Message string
}

Jump to

Keyboard shortcuts

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