helper

package
v1.5.26 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 8 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")
	ImpPath           = model.NewImport(model.ImportTypeInternal, "path")
	ImpRouter         = model.NewImport(model.ImportTypeExternal, "github.com/gorilla/mux")
	ImpSearchResult   = AppImport("lib/search/result")
	ImpSlices         = model.NewImport(model.ImportTypeInternal, "slices")
	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, models model.Models, 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 LoadRef added in v1.5.24

func LoadRef(col *model.Column, models model.Models) (*types.Reference, *model.Model, error)

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, models model.Models, 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