Documentation
¶
Overview ¶
Package template provides utility functions that help with the templating of created files.
Index ¶
- func MainTemplate() []byte
- func MakeChiRoutes() []byte
- func MakeEchoRoutes() []byte
- func MakeFiberMain() []byte
- func MakeFiberRoutes() []byte
- func MakeFiberServer() []byte
- func MakeGinRoutes() []byte
- func MakeGorillaRoutes() []byte
- func MakeHTTPRoutes() []byte
- func MakeHTTPServer() []byte
- func MakeRouterRoutes() []byte
- func MakeTemplate() []byte
- func ReadmeTemplate() []byte
- type ChiTemplates
- type EchoTemplates
- type FiberTemplates
- type GinTemplates
- type GorillaTemplates
- type RouterTemplates
- type StandardLibTemplate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MainTemplate ¶
func MainTemplate() []byte
MakeHTTPRoutes returns a byte slice that represents the default cmd/api/main.go file template.
func MakeChiRoutes ¶
func MakeChiRoutes() []byte
MakeChiRoutes returns a byte slice that represents the internal/server/routes.go file when using Chi.
func MakeEchoRoutes ¶
func MakeEchoRoutes() []byte
MakeEchoRoutes returns a byte slice that represents the internal/server/routes.go file when using Echo.
func MakeFiberMain ¶
func MakeFiberMain() []byte
MakeHTTPRoutes returns a byte slice that represents the cmd/api/main.go file when using Fiber.
func MakeFiberRoutes ¶
func MakeFiberRoutes() []byte
MakeFiberRoutes returns a byte slice that represents the internal/server/routes.go file when using Fiber.
func MakeFiberServer ¶
func MakeFiberServer() []byte
MakeFiberServer returns a byte slice that represents the internal/server/server.go file when using Fiber.
func MakeGinRoutes ¶
func MakeGinRoutes() []byte
MakeGinRoutes returns a byte slice that represents the internal/server/routes.go file when using Gin.
func MakeGorillaRoutes ¶
func MakeGorillaRoutes() []byte
MakeGorillaRoutes returns a byte slice that represents the internal/server/routes.go file when using gorilla/mux.
func MakeHTTPRoutes ¶
func MakeHTTPRoutes() []byte
MakeHTTPRoutes returns a byte slice that represents the internal/server/routes.go file when using net/http
func MakeHTTPServer ¶
func MakeHTTPServer() []byte
MakeHTTPServer returns a byte slice that represents the default internal/server/server.go file.
func MakeRouterRoutes ¶
func MakeRouterRoutes() []byte
MakeRouterRoutes returns a byte slice that represents the internal/server/routes.go file when using HttpRouter
func MakeTemplate ¶
func MakeTemplate() []byte
MakeHTTPRoutes returns a byte slice that represents the default Makefile.
func ReadmeTemplate ¶
func ReadmeTemplate() []byte
ReadmeTemplate returns a byte slice that represents the default README.md file template.
Types ¶
type ChiTemplates ¶
type ChiTemplates struct{}
ChiTemplates contains the methods used for building an app that uses github.com/go-chi/chi
func (ChiTemplates) Main ¶
func (c ChiTemplates) Main() []byte
func (ChiTemplates) Routes ¶
func (c ChiTemplates) Routes() []byte
func (ChiTemplates) Server ¶
func (c ChiTemplates) Server() []byte
type EchoTemplates ¶
type EchoTemplates struct{}
EchoTemplates contains the methods used for building an app that uses github.com/labstack/echo
func (EchoTemplates) Main ¶
func (e EchoTemplates) Main() []byte
func (EchoTemplates) Routes ¶
func (e EchoTemplates) Routes() []byte
func (EchoTemplates) Server ¶
func (e EchoTemplates) Server() []byte
type FiberTemplates ¶
type FiberTemplates struct{}
FiberTemplates contains the methods used for building an app that uses github.com/gofiber/fiber
func (FiberTemplates) Main ¶
func (f FiberTemplates) Main() []byte
func (FiberTemplates) Routes ¶
func (f FiberTemplates) Routes() []byte
func (FiberTemplates) Server ¶
func (f FiberTemplates) Server() []byte
type GinTemplates ¶
type GinTemplates struct{}
GinTemplates contains the methods used for building an app that uses github.com/gin-gonic/gin
func (GinTemplates) Main ¶
func (g GinTemplates) Main() []byte
func (GinTemplates) Routes ¶
func (g GinTemplates) Routes() []byte
func (GinTemplates) Server ¶
func (g GinTemplates) Server() []byte
type GorillaTemplates ¶
type GorillaTemplates struct{}
GorillaTemplates contains the methods used for building an app that uses github.com/gorilla/mux
func (GorillaTemplates) Main ¶
func (g GorillaTemplates) Main() []byte
func (GorillaTemplates) Routes ¶
func (g GorillaTemplates) Routes() []byte
func (GorillaTemplates) Server ¶
func (g GorillaTemplates) Server() []byte
type RouterTemplates ¶
type RouterTemplates struct{}
RouterTemplates contains the methods used for building an app that uses github.com/julienschmidt/httprouter
func (RouterTemplates) Main ¶
func (r RouterTemplates) Main() []byte
func (RouterTemplates) Routes ¶
func (r RouterTemplates) Routes() []byte
func (RouterTemplates) Server ¶
func (r RouterTemplates) Server() []byte
type StandardLibTemplate ¶
type StandardLibTemplate struct{}
StandardLibTemplate contains the methods used for building an app that uses net/http
func (StandardLibTemplate) Main ¶
func (s StandardLibTemplate) Main() []byte
func (StandardLibTemplate) Routes ¶
func (s StandardLibTemplate) Routes() []byte
func (StandardLibTemplate) Server ¶
func (s StandardLibTemplate) Server() []byte