helper

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TextArg         = "Arg"
	TextCommaSpace  = ", "
	TextDrop        = "Drop"
	TextEndAnchor   = "</a>"
	TextEndFunc     = "{%% endfunc %%}"
	TextEndIf       = "{%% endif %%}"
	TextEndIfExtra  = "{%%%% endif %%%%}"
	TextEndIfDash   = "{%%- endif -%%}"
	TextGetBy       = "GetBy"
	TextH3Start     = "<h3>"
	TextH3End       = "</h3>"
	TextIsNull      = " is null"
	TextMenuItem    = "menuItem"
	TextModelPrefix = "model."
	TextNil         = "<nil>"
	TextNull        = "null"
	TextSQLComment  = "-- "
	TextTDEnd       = "</td>"
	TextTDStart     = `<td class="nowrap">`
	TextTmplEnd     = " %%}"
)

Variables

View Source
var (
	ImpAudit          = AppImport("lib/audit")
	ImpApp            = &golang.Import{Type: golang.ImportTypeApp, Value: "{{{ .Package }}}/app"}
	ImpAppController  = AppImport("controller")
	ImpAppDatabase    = AppImport("lib/database")
	ImpAppMenu        = AppImport("lib/menu")
	ImpAppSvc         = AppImport("lib/svc")
	ImpAppUtil        = AppImport("util")
	ImpContext        = golang.NewImport(golang.ImportTypeInternal, "context")
	ImpComponents     = ViewImport("components")
	ImpComponentsView = ViewImport("components/view")
	ImpComponentsEdit = ViewImport("components/edit")
	ImpCutil          = AppImport("controller/cutil")
	ImpDBDriver       = golang.NewImport(golang.ImportTypeInternal, "database/sql/driver")
	ImpErrors         = golang.NewImport(golang.ImportTypeExternal, "github.com/pkg/errors")
	ImpHTTP           = golang.NewImport(golang.ImportTypeInternal, "net/http")
	ImpFilter         = AppImport("lib/filter")
	ImpFmt            = golang.NewImport(golang.ImportTypeInternal, "fmt")
	ImpJSON           = golang.NewImport(golang.ImportTypeInternal, "encoding/json")
	ImpLayout         = ViewImport("layout")
	ImpLo             = golang.NewImport(golang.ImportTypeExternal, "github.com/samber/lo")
	ImpMSSQL          = golang.NewImport(golang.ImportTypeExternal, "github.com/denisenkom/go-mssqldb").WithAlias("mssql")
	ImpRouter         = golang.NewImport(golang.ImportTypeExternal, "github.com/gorilla/mux")
	ImpSearchResult   = AppImport("lib/search/result")
	ImpSlices         = golang.NewImport(golang.ImportTypeInternal, "slices")
	ImpSlices119      = golang.NewImport(golang.ImportTypeExternal, "golang.org/x/exp/slices")
	ImpSQL            = golang.NewImport(golang.ImportTypeInternal, "database/sql")
	ImpSQLx           = golang.NewImport(golang.ImportTypeExternal, "github.com/jmoiron/sqlx")
	ImpStrconv        = golang.NewImport(golang.ImportTypeInternal, "strconv")
	ImpStrings        = golang.NewImport(golang.ImportTypeInternal, "strings")
	ImpTime           = golang.NewImport(golang.ImportTypeInternal, "time")
	ImpURL            = golang.NewImport(golang.ImportTypeInternal, "net/url")
	ImpUUID           = golang.NewImport(golang.ImportTypeExternal, "github.com/google/uuid")
	ImpXML            = golang.NewImport(golang.ImportTypeInternal, "encoding/xml")
)

Functions

func AppImport

func AppImport(path string) *golang.Import

func EnumImports added in v1.0.9

func EnumImports(ts types.Types, pkg string, enums enum.Enums) (golang.Imports, error)

func ImpSlicesForGo added in v0.11.22

func ImpSlicesForGo(v string) *golang.Import

func ImportsForTypes

func ImportsForTypes(ctx string, database string, ts ...types.Type) golang.Imports

func SimpleJSON added in v1.0.23

func SimpleJSON(database string) bool

func SpecialImports added in v0.6.20

func SpecialImports(cols model.Columns, pkg string, enums enum.Enums) (golang.Imports, error)

func ViewImport added in v1.0.11

func ViewImport(path string) *golang.Import

Types

This section is empty.

Jump to

Keyboard shortcuts

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