generators

package
v0.0.0-...-c4965f0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFiles

func GenerateFiles() error

func PrintInfo

func PrintInfo(config *api.Config)

Types

type Doc

type Doc struct {
	Filename string `json:"filename,omitempty"`
}

type DocWriter

type DocWriter interface {
	Extension() string
	DefaultStaticContent(title string) string
	WriteOverview() error
	WriteAPIGroupVersions(gvs api.GroupVersions) error
	WriteResourceCategory(name, file string) error
	WriteResource(r *api.Resource) error
	WriteDefinitionsOverview() error
	WriteDefinition(d *api.Definition) error
	WriteOldVersionsOverview() error
	Finalize() error
}

func NewHTMLWriter

func NewHTMLWriter(config *api.Config, copyright, title string) DocWriter

type HTMLWriter

type HTMLWriter struct {
	Config *api.Config
	TOC    TOC
	// contains filtered or unexported fields
}

func (*HTMLWriter) DefaultStaticContent

func (h *HTMLWriter) DefaultStaticContent(title string) string

func (*HTMLWriter) Extension

func (h *HTMLWriter) Extension() string

func (*HTMLWriter) Finalize

func (h *HTMLWriter) Finalize() error

func (*HTMLWriter) ResourceCategoryHeading

func (h *HTMLWriter) ResourceCategoryHeading(title string) string

func (*HTMLWriter) SectionHeading

func (h *HTMLWriter) SectionHeading(title string) string

func (*HTMLWriter) WriteAPIGroupVersions

func (h *HTMLWriter) WriteAPIGroupVersions(gvs api.GroupVersions) error

func (*HTMLWriter) WriteDefinition

func (h *HTMLWriter) WriteDefinition(d *api.Definition) error

func (*HTMLWriter) WriteDefinitionsOverview

func (h *HTMLWriter) WriteDefinitionsOverview() error

func (*HTMLWriter) WriteOldVersionsOverview

func (h *HTMLWriter) WriteOldVersionsOverview() error

func (*HTMLWriter) WriteOverview

func (h *HTMLWriter) WriteOverview() error

func (*HTMLWriter) WriteResource

func (h *HTMLWriter) WriteResource(r *api.Resource) error

func (*HTMLWriter) WriteResourceCategory

func (h *HTMLWriter) WriteResourceCategory(name, file string) error

type TOC

type TOC struct {
	Title     string
	Copyright string
	Sections  []*TOCItem
}

type TOCItem

type TOCItem struct {
	Level       int
	Title       string
	Link        string
	File        string
	SubSections []*TOCItem
}

func (*TOCItem) ToHTML

func (ti *TOCItem) ToHTML() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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