model

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrModelAlreadyExists error = errors.New("model already exists")
	ErrModelDirNotFound   error = errors.New("models folder do not exists on your buffalo app, please ensure the folder exists in order to proceed")
)
View Source
var (
	//go:embed templates
	Templates embed.FS
)

Functions

This section is empty.

Types

type Fixer

type Fixer struct{}

Fixer

func (Fixer) Fix

func (ef Fixer) Fix(ctx context.Context, root string, args []string) error

func (Fixer) Name

func (ef Fixer) Name() string

type Generator

type Generator struct{}

Generator allows to identify model as a plugin

func (Generator) Generate

func (g Generator) Generate(ctx context.Context, root string, args []string) error

Generate generates an empty name.plush.html file

func (Generator) InvocationName

func (g Generator) InvocationName() string

InvocationName is used to identify the generator when the generate command is called.

func (Generator) Name

func (g Generator) Name() string

Name returns the name of the plugin

type Initializer

type Initializer struct{}

Initializer

func (*Initializer) Initialize

func (i *Initializer) Initialize(ctx context.Context, options new.Options) error

func (Initializer) Name

func (i Initializer) Name() string

type Model

type Model struct {
	Attrs []attr
	// contains filtered or unexported fields
}

func New

func New(dirPath, name string, args []string) Model

func (Model) Create

func (m Model) Create() error

Jump to

Keyboard shortcuts

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