helper

package
v1.4.12 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 10 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            = &model.Import{Type: model.ImportTypeApp, Value: "{{{ .Package }}}/app"}
	ImpAppController  = AppImport("controller")
	ImpAppDatabase    = AppImport("lib/database")
	ImpAppMenu        = AppImport("lib/menu")
	ImpAppSvc         = AppImport("lib/svc")
	ImpAppUtil        = AppImport("util")
	ImpContext        = model.NewImport(model.ImportTypeInternal, "context")
	ImpComponents     = ViewImport("components")
	ImpComponentsView = ViewImport("components/view")
	ImpComponentsEdit = ViewImport("components/edit")
	ImpCutil          = AppImport("controller/cutil")
	ImpDBDriver       = model.NewImport(model.ImportTypeInternal, "database/sql/driver")
	ImpErrors         = model.NewImport(model.ImportTypeExternal, "github.com/pkg/errors")
	ImpHTTP           = model.NewImport(model.ImportTypeInternal, "net/http")
	ImpFilter         = AppImport("lib/filter")
	ImpFmt            = model.NewImport(model.ImportTypeInternal, "fmt")
	ImpJSON           = model.NewImport(model.ImportTypeInternal, "encoding/json")
	ImpLayout         = ViewImport("layout")
	ImpLo             = model.NewImport(model.ImportTypeExternal, "github.com/samber/lo")
	ImpMSSQL          = model.NewImport(model.ImportTypeExternal, "github.com/denisenkom/go-mssqldb").WithAlias("mssql")
	ImpRouter         = model.NewImport(model.ImportTypeExternal, "github.com/gorilla/mux")
	ImpSearchResult   = AppImport("lib/search/result")
	ImpSlices         = model.NewImport(model.ImportTypeInternal, "slices")
	ImpSlices119      = model.NewImport(model.ImportTypeExternal, "model.org/x/exp/slices")
	ImpSQL            = model.NewImport(model.ImportTypeInternal, "database/sql")
	ImpSQLx           = model.NewImport(model.ImportTypeExternal, "github.com/jmoiron/sqlx")
	ImpStrconv        = model.NewImport(model.ImportTypeInternal, "strconv")
	ImpStrings        = model.NewImport(model.ImportTypeInternal, "strings")
	ImpTime           = model.NewImport(model.ImportTypeInternal, "time")
	ImpURL            = model.NewImport(model.ImportTypeInternal, "net/url")
	ImpUUID           = model.NewImport(model.ImportTypeExternal, "github.com/google/uuid")
	ImpXML            = model.NewImport(model.ImportTypeInternal, "encoding/xml")
)

Functions

func AppImport

func AppImport(path string) *model.Import

func EnumImports added in v1.0.9

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

func ImpSlicesForGo added in v0.11.22

func ImpSlicesForGo(v string) *model.Import

func ImportsForTypes

func ImportsForTypes(ctx string, database string, ts ...types.Type) model.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) (model.Imports, error)

func ViewImport added in v1.0.11

func ViewImport(path string) *model.Import

Types

This section is empty.

Jump to

Keyboard shortcuts

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