template

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 0 Imported by: 1

Documentation

Overview

Package template provides utility functions that help with the templating of created files.

Index

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

Jump to

Keyboard shortcuts

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