kwebsite

package
v0.0.0-...-33f58b1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chapter

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

Chapter of a KWebsite output implements the outputs.Chapter interface

func (Chapter) AddSection

func (o Chapter) AddSection(i int, name string, apiVersion *string) (outputs.Section, error)

AddSection adds a section to the chapter

func (Chapter) SetAPIVersion

func (o Chapter) SetAPIVersion(s string) error

SetAPIVersion writes the APIVersion for a chapter

func (Chapter) SetGoImport

func (o Chapter) SetGoImport(s string) error

SetGoImport writes the Go import for a chapter

func (Chapter) Write

func (o Chapter) Write() error

type ChapterData

type ChapterData struct {
	ApiVersion  string
	Version     string
	Import      string
	Kind        string
	Metadata    ChapterMetadata
	ChapterName string
	Sections    []SectionData
}

type ChapterMetadata

type ChapterMetadata struct {
	Description string
	Title       string
	Weight      int
}

type FieldCategoryData

type FieldCategoryData struct {
	Name   string
	Fields []FieldData
}

type FieldData

type FieldData struct {
	Name           string
	Value          string
	Description    string
	Type           string
	TypeDefinition string
	Indent         int
}

type KWebsite

type KWebsite struct {
	Directory    string
	TemplatesDir string
}

KWebsite output implements the Output interface

func NewKWebsite

func NewKWebsite(dir string, templatesDir string) *KWebsite

NewKWebsite returns a new KWebsite

func (*KWebsite) AddPart

func (o *KWebsite) AddPart(i int, name string) (outputs.Part, error)

AddPart adds a part to the output

func (*KWebsite) LinkEnd

func (o *KWebsite) LinkEnd(s []string, name string) string

LinkEnd returns a link to a section in a part/chapter s is an array containing partname / chaptername

func (*KWebsite) NewPart

func (o *KWebsite) NewPart(i int, name string) (outputs.Part, error)

NewPart creates a new part for the output

func (*KWebsite) Terminate

func (o *KWebsite) Terminate() error

Terminate kwebsite document

type OperationData

type OperationData struct {
	Verb          string
	Title         string
	RequestMethod string
	RequestPath   string
	Parameters    []ParameterData
	Responses     []ResponseData
}

type ParameterData

type ParameterData struct {
	Title       string
	Description string
}

type Part

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

Part of a KWebsite output implements the outputs.Part interface

func (Part) AddChapter

func (o Part) AddChapter(i int, name string, gv string, version *kubernetes.APIVersion, description string, importPrefix string) (outputs.Chapter, error)

AddChapter adds a chapter to the Part

type PartIndex

type PartIndex struct {
	Title  string
	Weight int
}

type ResponseData

type ResponseData struct {
	Code        int
	Type        string
	Description string
}

type Section

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

Section of a Hugo output implements the outputs.Section interface

func (Section) AddContent

func (o Section) AddContent(s string) error

AddContent adds content to a section

func (Section) AddDefinitionIndexEntry

func (o Section) AddDefinitionIndexEntry(d string) error

func (Section) AddFieldCategory

func (o Section) AddFieldCategory(name string) error

func (Section) AddOperation

func (o Section) AddOperation(operation *kubernetes.ActionInfo, linkends kubernetes.LinkEnds) error

AddOperation adds an operation

func (Section) AddProperty

func (o Section) AddProperty(name string, property *kubernetes.Property, linkend []string, indent int, defname string, shortName string) error

AddProperty adds a property to the section

func (Section) AddTypeDefinition

func (o Section) AddTypeDefinition(typ string, description string) error

AddTypeDefinition adds the definition of a type to a section

func (Section) EndProperty

func (o Section) EndProperty() error

EndProperty ends a property

func (Section) EndPropertyList

func (o Section) EndPropertyList() error

EndPropertyList ends the list of properties

func (Section) StartPropertyList

func (o Section) StartPropertyList() error

StartPropertyList starts the list of properties

type SectionData

type SectionData struct {
	Name            string
	Description     string
	Fields          []FieldData
	FieldCategories []FieldCategoryData
	Operations      []OperationData
}

Jump to

Keyboard shortcuts

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