docs

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenAPIDocs

func GenAPIDocs(sourcePath, dir string) error

GenAPIDocs reads the trial and experiment source code from source path and outputs Markdown to the output directory

func NewDocsCommand

func NewDocsCommand(ioStreams cmdutil.IOStreams) *cobra.Command

NewDocsCommand returns a new documentation command

Types

type DocsOptions

type DocsOptions struct {
	Directory  string
	DocType    string
	SourcePath string

	cmdutil.IOStreams
	// contains filtered or unexported fields
}

DocsOptions is the configuration for generating documentation

func NewDocsOptions

func NewDocsOptions(ioStreams cmdutil.IOStreams) *DocsOptions

NewDocsOptions returns a new documentation options struct

func (*DocsOptions) Complete

func (o *DocsOptions) Complete(cmd *cobra.Command) error

Complete the documentation options

func (*DocsOptions) Run

func (o *DocsOptions) Run() error

Run the documentation options

type KubeTypes

type KubeTypes []Pair

KubeTypes is an array to represent all available types in a parsed file. [0] is for the type itself

func ParseDocumentationFrom

func ParseDocumentationFrom(src string) []KubeTypes

ParseDocumentationFrom gets all types' documentation and returns them as an array. Each type is again represented as an array (we have to use arrays as we need to be sure for the order of the fields). This function returns fields and struct definitions that have no documentation as {name, ""}.

type Pair

type Pair struct {
	Name, Doc, Type string
	Mandatory       bool
}

Pair of strings. We keed the name of fields and the doc

Jump to

Keyboard shortcuts

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