Documentation ¶
Index ¶
- func GetGV(group kubernetes.APIGroup, version kubernetes.APIVersion) string
- type Categories
- type Category
- type Chapter
- type FieldCategory
- type Part
- type Section
- type TOC
- func (o *TOC) AddOtherResources(spec *kubernetes.Spec)
- func (o *TOC) OutputChapter(i int, chapter *Chapter, outputPart outputs.Part) error
- func (o *TOC) OutputCommonParameters(i int, output outputs.Output) error
- func (o *TOC) OutputDocument(output outputs.Output) error
- func (o *TOC) OutputDocumentedDefinitions()
- func (o *TOC) OutputOperation(i int, outputSection outputs.Section, operation *kubernetes.ActionInfo) error
- func (o *TOC) OutputOperations(i int, outputChapter outputs.Chapter, operations *kubernetes.ActionInfoList) error
- func (o *TOC) OutputPart(i int, part *Part, output outputs.Output) error
- func (o *TOC) OutputProperties(defname string, definition spec.Schema, outputSection outputs.Section, ...) error
- func (o *TOC) OutputSection(i int, section *Section, outputChapter outputs.Chapter) error
- func (o *TOC) PopulateAssociates(thespec *kubernetes.Spec) error
- func (o *TOC) ToKWebsite(outputDir string, templatesDir string) error
- func (o *TOC) ToMarkdown(w io.Writer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGV ¶
func GetGV(group kubernetes.APIGroup, version kubernetes.APIVersion) string
GetGV returns the group/version for a resource and version (used for apiVersion:)
Types ¶
type Categories ¶
type Categories []Category
Categories is the list of fields categories for all definitions
func LoadCategories ¶
func LoadCategories(filenames []string) (Categories, error)
LoadCategories from a configuration file
func (Categories) Find ¶
func (o Categories) Find(key kubernetes.Key) []FieldCategory
type Category ¶
type Category struct { Definition kubernetes.Key `yaml:"definition"` FieldCategories []FieldCategory `yaml:"field_categories"` }
Category is the list of fields categories for a specific definition
type Chapter ¶
type Chapter struct { Name string `yaml:"name"` Group *kubernetes.APIGroup `yaml:"group"` Version *kubernetes.APIVersion `yaml:"version"` Key kubernetes.Key `yaml:"key"` OtherDefinitions []string `yaml:"otherDefinitions"` Sections []*Section }
Chapter contains a definition of a main resource and its associated resources and definitions
type FieldCategory ¶
FieldCategory is a list of fields regrouped in the same category
type Section ¶
type Section struct { Name string Group *kubernetes.APIGroup Version *kubernetes.APIVersion Definition spec.Schema Key *kubernetes.Key }
Section contains a definition of a Kind for a given Group/Version
func NewSection ¶
func NewSection(name string, definition *spec.Schema, group *kubernetes.APIGroup, version *kubernetes.APIVersion) *Section
NewSection returns a Section
func NewSectionForDefinition ¶
NewSectionForDefinition returns a Section for a definition
type TOC ¶
type TOC struct { Parts []*Part `yaml:"parts"` SkippedResources []kubernetes.APIKind `yaml:"skippedResources"` Definitions *spec.Definitions LinkEnds kubernetes.LinkEnds DocumentedDefinitions map[kubernetes.Key][]string Actions kubernetes.Actions Categories Categories }
TOC is the table of contents of the documentation
func (*TOC) AddOtherResources ¶
func (o *TOC) AddOtherResources(spec *kubernetes.Spec)
AddOtherResources adds not documented and not replaced resources to a new Part
func (*TOC) OutputChapter ¶
OutputChapter outputs a chapter of the part
func (*TOC) OutputCommonParameters ¶
OutputCommonParameters outputs the parameters in common
func (*TOC) OutputDocument ¶
OutputDocument outputs contents using output
func (*TOC) OutputDocumentedDefinitions ¶
func (o *TOC) OutputDocumentedDefinitions()
OutputDocumentedDefinitions outputs the list of definitions and on which properties they are defined
func (*TOC) OutputOperation ¶
func (o *TOC) OutputOperation(i int, outputSection outputs.Section, operation *kubernetes.ActionInfo) error
OutputOperation outputs details of an Operation
func (*TOC) OutputOperations ¶
func (o *TOC) OutputOperations(i int, outputChapter outputs.Chapter, operations *kubernetes.ActionInfoList) error
OutputOperations outputs the Operations chapter
func (*TOC) OutputPart ¶
OutputPart outputs a Part
func (*TOC) OutputProperties ¶
func (o *TOC) OutputProperties(defname string, definition spec.Schema, outputSection outputs.Section, prefix []string, group *kubernetes.APIGroup, version *kubernetes.APIVersion, key *kubernetes.Key) error
OutputProperties outputs the properties of a definition
func (*TOC) OutputSection ¶
OutputSection outputs a section of the chapter
func (*TOC) PopulateAssociates ¶
func (o *TOC) PopulateAssociates(thespec *kubernetes.Spec) error
PopulateAssociates adds sections to the chapters found in the spec
func (*TOC) ToKWebsite ¶
ToKWebsite outputs documentation in Markdown format for k/website in dir directory
func (*TOC) ToMarkdown ¶
ToMarkdown writes a Markdown representation of the TOC