addon

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFile

func AddFile(u *model.Universe, add *file.File) (bool, error)

AddFile adds the specified file to the model. If the file exists the function returns false and does not modify the Universe If the file does not exist, the function returns true and adds the file to the Universe If there is a problem with the file the function returns an error

func DefaultTemplateFunctions

func DefaultTemplateFunctions() template.FuncMap

DefaultTemplateFunctions returns a map of template helpers

func ExampleChannel

func ExampleChannel(u *model.Universe) error

ExampleChannel adds a model file for the channel

func ExampleManifest

func ExampleManifest(u *model.Universe) error

ExampleManifest adds a model file for the manifest placeholder

func JSONTag

func JSONTag(tag string) string

JSONTag is a helper to build the json tag for a struct It works around escaping problems for the json tag syntax

func ReplaceController

func ReplaceController(u *model.Universe) error

ReplaceController replaces the controller with a modified version

func ReplaceFile

func ReplaceFile(u *model.Universe, add *file.File) error

ReplaceFile replaces the specified file in the model by path If the file does not exist, it returns an error

func ReplaceFileIfExists

func ReplaceFileIfExists(u *model.Universe, add *file.File) bool

ReplaceFileIfExists replaces the specified file in the model by path Returns true if the file was replaced.

func ReplaceTypes

func ReplaceTypes(u *model.Universe) error

ReplaceTypes replaces the API types with a modified version

func RunTemplate

func RunTemplate(templateName, templateValue string, data interface{}, funcMap template.FuncMap) (string, error)

RunTemplate parses a template

Types

type Plugin

type Plugin struct {
}

Plugin implements model.Plugin

func (*Plugin) Pipe

func (p *Plugin) Pipe(u *model.Universe) error

Pipe implements model.Plugin

type PluginFunc

type PluginFunc func(u *model.Universe) error

PluginFunc executes a step of Plugin

Jump to

Keyboard shortcuts

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