stub

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Controller is the path to controller stubs
	Controller = "embed/controller"
	// Middleware is the path to middleware stubs
	Middleware = "embed/middleware"
	// Model is the path to model stubs
	Model = "embed/model"
	// Inject is the path to the inject stubs
	Inject = "embed/inject"
	// InjectOpenAPI is the path to the injected OpenAPI generator stub
	InjectOpenAPI = Inject + "/openapi.go.stub"
	// InjectSeeder is the path to the injected database seed function
	InjectSeeder = Inject + "/seed.go.stub"
	// InjectMigrate is the path to the injected database migration function
	InjectMigrate = Inject + "/migrate.go.stub"
	// InjectDBClear is the path to the injected database clear function
	InjectDBClear = Inject + "/db_clear.go.stub"
)

Variables

This section is empty.

Functions

func GenerateStubVersionPath

func GenerateStubVersionPath(path string, version *semver.Version) (string, error)

GenerateStubVersionPath return the path to a stub according to a version

func Load

func Load(name string, data Data) (*bytes.Buffer, error)

Load load a stub file with injected data

Types

type Data

type Data map[string]interface{}

Data represent the data to inject inside stub files

Jump to

Keyboard shortcuts

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