plugins

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CLIContextKey = ContextKey("CLI")

Functions

func PrepareContext

func PrepareContext(ctx context.Context, cliCtx *Context) context.Context

Types

type Context

type Context struct {
	ParentPackageName   string
	GeneratedFilePrefix string
	Projects            map[string]projects.Project
	OutputDir           string
}

Context is a context for CLI

func GetContext

func GetContext(ctx context.Context) (*Context, error)

GetContext gets generator context from context

type ContextKey

type ContextKey string

ContextKey is a key for context

type Plugin

type Plugin interface {
	Generate(ctx context.Context) error
	Name() string
}

Directories

Path Synopsis
cli
Package cli contains the cli plugin that generates application entrypoint and cli commands for the projects: e.g.
Package cli contains the cli plugin that generates application entrypoint and cli commands for the projects: e.g.
app

Jump to

Keyboard shortcuts

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