web

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(state *State) ([]byte, error)

Generate the web server from state

Types

type Action

type Action struct {
	Method   string
	Route    string
	CallName string
}

type Def

type Def struct {
	Type string
	Name string
}

type Generator

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

func New

func New(module *gomod.Module, parser *parser.Parser) *Generator

func (*Generator) GenerateFile

func (g *Generator) GenerateFile(fsys budfs.FS, file *budfs.File) error

type State

type State struct {
	Imports []*imports.Import

	Actions   []*Action
	HasPublic bool
	HasView   bool

	// Show the welcome page
	ShowWelcome bool
}

func Load

func Load(fsys fs.FS, module *gomod.Module, parser *parser.Parser) (*State, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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