generator

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppType

type AppType int64

AppType defines the type of app to generate using this package. There are several types of apps that are defined slightly differently. The ideal state is one type of app no matter where the app exists, but that's not the current reality.

const (
	// Community represents an app that will be published in the community repo.
	Community AppType = iota
	// Local represents an app that is local and not meant to be published.
	Local
	// Internal represents a Tidbyt internal app.
	Internal
)

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator provides a structure for generating apps.

func NewGenerator

func NewGenerator(appType AppType, root string) (*Generator, error)

NewGenerator creates an instantiated generator with the templates parsed.

func (*Generator) GenerateApp

func (g *Generator) GenerateApp(app *manifest.Manifest) (string, error)

GenerateApp creates the base app starlark, go package, and updates the app list.

func (*Generator) RemoveApp

func (g *Generator) RemoveApp(app *manifest.Manifest) error

RemoveApp removes an app from the apps directory.

Jump to

Keyboard shortcuts

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