apidocs

package
v3.7.0-0.109.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvStyle

func EnvStyle(s string) string

EnvStyle replaces instances of {foo} in a string with $FOO.

func EscapeMediaTypes

func EscapeMediaTypes(mediatypes []string) []string

EscapeMediaTypes ensures that */* renders correctly in asciidoc format. TODO: it'd be better if the template library could escape correctly for asciidoc.

func FriendlyTypeName

func FriendlyTypeName(s *spec.Schema) string

FriendlyTypeName returns a user-friendly type name.

func GroupVersionKinds

func GroupVersionKinds(s spec.Schema) []schema.GroupVersionKind

GroupVersionKinds returns the GroupVersionKinds from the "x-kubernetes-group-version-kind" OpenAPI extension.

func Operations

func Operations(path spec.PathItem) map[string]*spec.Operation

Operations returns the populated operations of a spec.PathItem as a map, for easier iteration

func Pluralise

func Pluralise(s string) string

Pluralise dumbly attempts to pluralise s.

func RefType

func RefType(s *spec.Schema) string

RefType returns the type name of a reference, suitable for looking up in s.Definitions.

func ReverseStringSlice

func ReverseStringSlice(s []string) []string

ReverseStringSlice returns s reversed, not in place.

func SortedKeys

func SortedKeys(m interface{}, t reflect.Type) interface{}

SortedKeys returns a slice containing the sorted keys of map m. Argument t is the type implementing sort.Interface which is used to sort.

func ToUpper

func ToUpper(s string) string

ToUpper returns s with the first letter capitalised.

Types

type Page

type Page struct {
	Operations []operation
	// contains filtered or unexported fields
}

func (Page) Description

func (page Page) Description() (string, error)

func (Page) OutputPath

func (page Page) OutputPath() string

func (Page) ParentTopicName

func (page Page) ParentTopicName() string

func (Page) Schema

func (page Page) Schema() ([]*line, error)

func (Page) Title

func (page Page) Title() string

type Pages

type Pages map[string]Page

func BuildPages

func BuildPages(s *spec.Swagger) (Pages, error)

func (Pages) Write

func (pages Pages) Write(root string) error

type Topic

type Topic struct {
	Name    string  `yaml:"Name"`
	File    string  `yaml:"File,omitempty"`
	Dir     string  `yaml:"Dir,omitempty"`
	Distros string  `yaml:"Distros,omitempty"`
	Topics  []Topic `yaml:"Topics,omitempty"`
}

Topic represents an asciibinder topic

func BuildTopics

func BuildTopics(pages Pages) []Topic

Jump to

Keyboard shortcuts

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