Documentation
¶
Index ¶
- Constants
- func CheckTemplates(wd string, log *log.Logger, config RoutesFileConfiguration) error
- func Documentation(w io.Writer, wd string, config RoutesFileConfiguration) error
- func TemplateRoutesFile(wd string, logger *log.Logger, config RoutesFileConfiguration) (string, error)
- type AssertionFailureReporter
- type BasicPathSegment
- type HostSlashPathSegment
- type RoutesFileConfiguration
- type StringPathValuePathSegment
- type Template
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 ¶
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
Click to show internal directories.
Click to hide internal directories.