templ

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Content embed.FS

Functions

func AngularFilename added in v0.0.9

func AngularFilename(value string) string

func AngularRestName added in v0.0.9

func AngularRestName(tmp string) string

func BackendFsPath added in v0.0.22

func BackendFsPath(value string) string

func ConfigParamName

func ConfigParamName(field *structs.ParamConfig) string

Вернуть название параметра

func ConfigParamTag

func ConfigParamTag(field *structs.ParamConfig) string

Вернуть строку для тэгирования параметров

func ConfigParamType

func ConfigParamType(field *structs.ParamConfig) string

Вернуть тип параметра

func DisplayMethodNameGet

func DisplayMethodNameGet(value string) string

func DisplayMethodNamePost

func DisplayMethodNamePost(value string) string

func EscapeChars added in v0.1.1

func EscapeChars(value string) string

func ExecuteTmplFile added in v0.1.0

func ExecuteTmplFile(tmpl *template.Template, data interface{}) (out []byte, err error)

Выполнить шаблон

func FieldChildName added in v0.0.12

func FieldChildName(field *structs.Field) string

func FieldDBName

func FieldDBName(field *structs.Field) (res string)

Возвращает имя в БД

func FieldDbTableType added in v0.0.12

func FieldDbTableType(field *structs.Field) string

func FieldDescript

func FieldDescript(field *structs.Field, fieldId bool) (str string)

Генерирование описания таблиц в БД

func FieldInTableByName added in v0.0.26

func FieldInTableByName(name string, table *structs.Table) *structs.Field

func FieldJsonDescriptionStrClear added in v0.0.21

func FieldJsonDescriptionStrClear(value string) string

func FieldJsonName

func FieldJsonName(field *structs.Field) string

func FieldJsonNameStr added in v0.0.20

func FieldJsonNameStr(field string) string

func FieldName

func FieldName(field *structs.Field) string

func FieldNameLowerPrepare

func FieldNameLowerPrepare(value string) string

func FieldNamePrepare

func FieldNamePrepare(value string) string

func FieldStringToType added in v0.0.26

func FieldStringToType(value interface{}, field *structs.Field) string

func FieldToVisField added in v0.0.21

func FieldToVisField(field structs.Field) (res structs.VisField)

func FieldToVisField2 added in v0.0.21

func FieldToVisField2(field structs.FK) (res structs.VisField)

func FieldType

func FieldType(field *structs.Field) string

func FieldTypeDB

func FieldTypeDB(field *structs.Field) string

func FieldTypeDBStr added in v0.1.0

func FieldTypeDBStr(value string, length *int) string

func FieldTypeParentTable added in v0.0.12

func FieldTypeParentTable(field *structs.Field) string

func FieldTypeStr added in v0.1.0

func FieldTypeStr(value string) string

func FindFieldIdInDBByName added in v0.0.20

func FindFieldIdInDBByName(project *structs.Project, tblID uuid.UUID, fldName string) uuid.UUID

Найти ID поля по имени

func FindFieldIdInInterfaceByName added in v0.0.20

func FindFieldIdInInterfaceByName(project *structs.Project, interfaceID uuid.UUID, fldName string) uuid.UUID

Найти ID поля по имени

func FindFieldNameInDBById added in v0.0.20

func FindFieldNameInDBById(project *structs.Project, tblID uuid.UUID, fldId uuid.UUID) string

Найти имя поля в таблице по ID

func FindFieldNameInInterfaceById added in v0.0.20

func FindFieldNameInInterfaceById(project *structs.Project, interfaceID uuid.UUID, fldId uuid.UUID) string

Найти имя поля в интерфейсе по ID

func FindFieldNameInTableById added in v0.0.22

func FindFieldNameInTableById(project *structs.Project, tblID uuid.UUID, fldId uuid.UUID) string

Найти имя поля в интерфейсе по ID

func FindSourceDataInDBByID added in v0.0.20

func FindSourceDataInDBByID(project *structs.Project, id uuid.UUID) *structs.Table

Найти таблицу по ID

func FindSourceDataInDBByName added in v0.0.20

func FindSourceDataInDBByName(project *structs.Project, name string) *structs.Table

Найти таблицу по имени

func FindSourceDataInInterfaceByID added in v0.0.20

func FindSourceDataInInterfaceByID(project *structs.Project, id uuid.UUID) *structs.Interface

func FindSourceDataInInterfaceByName added in v0.0.20

func FindSourceDataInInterfaceByName(project *structs.Project, name string) *structs.Interface

func GetFieldsByModelID added in v0.0.20

func GetFieldsByModelID(project *structs.Project, id uuid.UUID) []structs.Field

func GetFieldsByModelName added in v0.0.20

func GetFieldsByModelName(project *structs.Project, name string) []structs.Field

func GetFksByModelID added in v0.0.20

func GetFksByModelID(project *structs.Project, id uuid.UUID) []structs.Field

func GetFksByModelID2 added in v0.0.21

func GetFksByModelID2(project *structs.Project, id uuid.UUID) []structs.FK

func GetModelName

func GetModelName(project *structs.Project, value structs.VisField) string

func GetModelNameAngular added in v0.0.20

func GetModelNameAngular(project *structs.Project, value structs.VisField) string

func HasFieldType

func HasFieldType(fields []structs.Field, typeName string) (has bool)

func IncludeTemplPart added in v0.1.0

func IncludeTemplPart(templName string, data interface{}) string

func IsMethod

func IsMethod(arr map[string][]string, method string) bool

func MethodComment

func MethodComment(value string) string

func MethodNameGet

func MethodNameGet(value string) string

func MethodNameGetId

func MethodNameGetId(value string) string

func MethodNamePost

func MethodNamePost(value string) string

func MethodSummary

func MethodSummary(value string) string

func MkdirIsNotExists

func MkdirIsNotExists(pathdir string) (err error)

func PackageName

func PackageName(name string) string

func ParseRestPath added in v0.0.22

func ParseRestPath(value string) string

func ParseRestPathForName added in v0.0.22

func ParseRestPathForName(value string) string

func ParseRestPathParams added in v0.0.22

func ParseRestPathParams(value string) (res []structs.Field)

func PrepareTmplFile

func PrepareTmplFile(filename string, data interface{}, outname string) (err error)

Использование шаблона

func PrepareTmplIsNotExists

func PrepareTmplIsNotExists(filename string, data interface{}, outname string) (err error)

Подготовка файла, если его нет на диске

func RandomHex

func RandomHex(n int) (string, error)

func ReadTmplFile added in v0.1.0

func ReadTmplFile(filename string) (tmpl *template.Template, err error)

Чтение шаблона и его подготовка

func RemoveFirstChar added in v0.0.9

func RemoveFirstChar(value string) string

func Roles

func Roles(arr map[string][]string, method string) []string

func WriteFile added in v0.1.0

func WriteFile(outname string, data []byte) (err error)

Запись файла на диск

func WriteTmplFile

func WriteTmplFile(filename string, outname string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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