generator

package
v5.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatalogDocumentation

func CatalogDocumentation(registry broker.BrokerRegistry) string

CatalogDocumentation generates markdown documentation for the service catalog of the given registry. Returns all content in one string.

func CatalogDocumentationToDir

func CatalogDocumentationToDir(registry broker.BrokerRegistry, dstDir string)

CatalogDocumentationToDir generates markdown documentation for the service catalog of the given registry. Generated documentation is saved under given `dstDir` with such layout:

./{dstDir} ├── classes │   ├── {class_name}.md # contains all information about given service class │   └── ... └── use.md # contains table of contents (ToC) about all generated service class documentation

func GenerateCustomizationMd

func GenerateCustomizationMd() string

func GenerateFormsString

func GenerateFormsString() string

GenerateFormsString creates all the forms for the user to fill out in the PCF tile and returns it as a string.

func GenerateManifest

func GenerateManifest() string

GenerateManifest creates a manifest.yml from a template.

func GenerateTile

func GenerateTile() string

GenerateTile creates a tile.yml from a template.

Types

type Form

type Form struct {
	Name        string         `yaml:"name"`
	Label       string         `yaml:"label"`
	Description string         `yaml:"description"`
	Optional    bool           `yaml:"optional,omitempty"` // optional, default false
	Properties  []FormProperty `yaml:"properties"`
}

Form is an Ops Manager compatible form definition used to generate forms. See https://docs.pivotal.io/tiledev/2-2/product-template-reference.html#form-properties for details about the fields.

type FormOption

type FormOption struct {
	Name  string `yaml:"name"`
	Label string `yaml:"label"`
}

FormOption is an enumerated element for FormProperties that can be selected from. Name is the value and label is the human-readable display name.

type FormProperty

type FormProperty struct {
	Name         string       `yaml:"name"`
	Type         string       `yaml:"type"`
	Default      interface{}  `yaml:"default,omitempty"`
	Label        string       `yaml:"label,omitempty"`
	Description  string       `yaml:"description,omitempty"`
	Configurable bool         `yaml:"configurable,omitempty"` // optional, default false
	Options      []FormOption `yaml:"options,omitempty"`
	Optional     bool         `yaml:"optional,omitempty"` // optional, default false
}

FormProperty holds a single form element in a Ops Manager form.

type TileFormsSections

type TileFormsSections struct {
	Forms            []Form `yaml:"forms"`
	ServicePlanForms []Form `yaml:"service_plan_forms,omitempty"`
}

TileFormsSections holds the top level fields in tile.yml responsible for the forms. https://docs.pivotal.io/tiledev/2-2/tile-structure.html

func GenerateForms

func GenerateForms() TileFormsSections

GenerateForms creates all the forms for the user to fill out in the PCF tile.

type ToCServiceClass

type ToCServiceClass struct {
	DisplayName string
	FilePath    string
}

Jump to

Keyboard shortcuts

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