wizard

package
v0.0.0-...-f2350e3 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeFile = "file"
	TypeDir  = "dir"
	//NamePlaceholder is a string the builder will look for and replace with name of full-name of the project
	NamePlaceholder = "{app_name}"
)

Variables

This section is empty.

Functions

func DefaultHTTPFramework

func DefaultHTTPFramework() string

DefaultHTTPFramework list of available framework templates

func Execute

func Execute(opts *Options)

func HTTPFrameworks

func HTTPFrameworks() []string

HTTPFrameworks list of available framework templates

Types

type Builder

type Builder interface {
	Build() error
}

type Config

type Config struct {
	Name         string      `json:"name"`
	FullName     string      `json:"full_name"`
	Maintainer   string      `json:"maintainer"`
	TemplateData interface{} `json:"template_data"`
}

Config config struct for generators

func NewConfig

func NewConfig(name, fullName, maintainer string, templateData interface{}) *Config

NewConfig config constructor

type Object

type Object struct {
	Name       string
	Type       string
	SubObjects []*Object
	Template   func() []byte
}

func (*Object) Build

func (o *Object) Build(config *Config) error

Build start building

type Options

type Options struct {
	ProjectName string `json:"project_name"`
	Maintainer  string `json:"maintainer"`
	Framework   string `json:"framework"`
	FullName    string `json:"full_name"`
}

func NewOptions

func NewOptions(projectName, Maintainer, framework, fullName string) *Options

Jump to

Keyboard shortcuts

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