muxt

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTemplatesVariableName = "templates"
	DefaultRoutesFunctionName    = "TemplateRoutes"
	DefaultOutputFileName        = "template_routes.go"
	DefaultReceiverInterfaceName = "RoutesReceiver"

	InputAttributeNameStructTag     = "name"
	InputAttributeTemplateStructTag = "template"
)
View Source
const (
	TemplateNameScopeIdentifierHTTPRequest  = "request"
	TemplateNameScopeIdentifierHTTPResponse = "response"
	TemplateNameScopeIdentifierContext      = "ctx"
	TemplateNameScopeIdentifierForm         = "form"
)

Variables

This section is empty.

Functions

func CheckTemplates

func CheckTemplates(wd string, log *log.Logger, config RoutesFileConfiguration) error

func Documentation

func Documentation(w io.Writer, wd string, config RoutesFileConfiguration) error

func TemplateRoutesFile

func TemplateRoutesFile(wd string, logger *log.Logger, config RoutesFileConfiguration) (string, error)

Types

type AssertionFailureReporter

type AssertionFailureReporter struct{}

func (AssertionFailureReporter) Errorf

func (AssertionFailureReporter) Errorf(format string, args ...interface{})

type BasicPathSegment added in v0.13.0

type BasicPathSegment string

func (BasicPathSegment) Expr added in v0.13.0

func (segment BasicPathSegment) Expr() ast.Expr

type HostSlashPathSegment added in v0.13.0

type HostSlashPathSegment string

func (HostSlashPathSegment) Expr added in v0.13.0

func (segment HostSlashPathSegment) Expr() ast.Expr

type RoutesFileConfiguration

type RoutesFileConfiguration struct {
	PackageName,
	PackagePath,
	TemplatesVariable,
	RoutesFunction,
	ReceiverType,
	ReceiverPackage,
	ReceiverInterface,
	OutputFileName string
}

type StringPathValuePathSegment added in v0.13.0

type StringPathValuePathSegment string

func (StringPathValuePathSegment) Expr added in v0.13.0

func (segment StringPathValuePathSegment) Expr() ast.Expr

type Template

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

func Templates

func Templates(ts *template.Template) ([]Template, error)

func (Template) Method

func (t Template) Method() string

func (Template) String

func (t Template) String() string

func (Template) Template

func (t Template) Template() *template.Template

Jump to

Keyboard shortcuts

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