templates

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleAuth = `` /* 287-byte string literal not displayed */
View Source
const ModuleCommand = `` /* 630-byte string literal not displayed */
View Source
const ModuleController = `` /* 548-byte string literal not displayed */
View Source
const ModuleDeps = `` /* 182-byte string literal not displayed */
View Source
const ModuleEntity = `` /* 315-byte string literal not displayed */
View Source
const ModuleEntrypointTemplate = `` /* 384-byte string literal not displayed */
View Source
const ModuleEvent = `` /* 430-byte string literal not displayed */
View Source
const ModuleMiddleware = `` /* 376-byte string literal not displayed */
View Source
const ModuleQueryObject = `package queries

type {{.NamePascalCase}} struct {
}

type {{.NamePascalCase}}Query interface {
}
`
View Source
const ModuleRepositoryFile = `package repositories

type {{.NamePascalCase}}Repository interface {
}
`
View Source
const ModuleRoutes = `` /* 527-byte string literal not displayed */
View Source
const ModuleValueObject = `` /* 157-byte string literal not displayed */

Variables

View Source
var ModuleEventFile = fmt.Sprintf(`package events

import (
	"encoding/json"
	"time"
)

type {{.NamePascalCase}} struct {
	Timestamp time.Time %s
}

func New{{.NamePascalCase}}() {{.NamePascalCase}} {
	return {{.NamePascalCase}}{
		Timestamp: time.Now(),
	}
}

func (p {{.NamePascalCase}}) OccuredOn() time.Time {
	return p.Timestamp
}

func (p {{.NamePascalCase}}) JSON() ([]byte, error) {
	return json.Marshal(p)
}
`,
	"`json:\"timestamp\"`",
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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