plugin

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create() error

Create creates a new plugin. 1. Render template files 2. Persist all files 3. Print help information

func Validate added in v0.5.0

func Validate() error

func ValidatePlugin added in v0.5.0

func ValidatePlugin(pluginName string) error

ValidatePlugin validate a plugin. 1. Render template files 2. Validate need validate files

func ValidatePlugins added in v0.5.0

func ValidatePlugins() error

ValidatePlugins validate all plugins calling ValidatePlugin() via all plugins name

Types

type Plugin

type Plugin struct {
	Name string
}

func NewPlugin

func NewPlugin(name string) *Plugin

func (*Plugin) PersistFiles

func (p *Plugin) PersistFiles(files []pluginTpl.File) error

PersistFiles gets the []pluginTpl.File, for each File: call the persistFile() method to deal with.

func (*Plugin) PrintHelpInfo

func (p *Plugin) PrintHelpInfo()

func (*Plugin) RenderTplFiles

func (p *Plugin) RenderTplFiles() ([]pluginTpl.File, error)

RenderTplFiles takes specified data that the templates needed, then render TplFiles to "Files" and return it as []File.

func (*Plugin) ValidateFiles added in v0.5.0

func (p *Plugin) ValidateFiles(files []pluginTpl.File) error

ValidateFiles Validates the []pluginTpl.File, for each File if File in needValidateFiles: call the validateFile() method to deal with.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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