template

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MPassword   string = "password"
	MName       string = "name"
	MAddress    string = "addr"
	MEmail      string = "email"
	MMobile     string = "mobile"
	MTelephone  string = "tel"
	MID         string = "id"
	MCreditCard string = "credit_card"
	MURL        string = "url"
	MDefault    string = "default"
)

Variables

This section is empty.

Functions

func FuncMap

func FuncMap() template.FuncMap

Types

type NullType

type NullType string
var NullValue NullType = "\\N"

type RecordContext

type RecordContext struct {
	// contains filtered or unexported fields
}

func NewRecordContext

func NewRecordContext() *RecordContext

func (*RecordContext) Clean

func (rc *RecordContext) Clean()

func (*RecordContext) DecodeValueByColumn

func (rc *RecordContext) DecodeValueByColumn(name string, v any) (any, error)

DecodeValueByColumn - decode value from string or NullValue to the real type using column type

func (*RecordContext) DecodeValueByType

func (rc *RecordContext) DecodeValueByType(name string, v any) (any, error)

DecodeValueByType - decode value from string or NullValue to the real type using type

func (*RecordContext) EncodeValueByColumn

func (rc *RecordContext) EncodeValueByColumn(name string, v any) (any, error)

EncodeValueByColumn - encode value from real type to the string or NullValue using column type

func (*RecordContext) EncodeValueByType

func (rc *RecordContext) EncodeValueByType(name string, v any) (any, error)

EncodeValueByType - encode value from real type to the string or NullValue using type

func (*RecordContext) GetChangedColumns

func (rc *RecordContext) GetChangedColumns() map[string]struct{}

func (*RecordContext) GetColumnType

func (rc *RecordContext) GetColumnType(name string) (string, error)

func (*RecordContext) GetColumnValue

func (rc *RecordContext) GetColumnValue(name string) (any, error)

func (*RecordContext) GetRawColumnValue

func (rc *RecordContext) GetRawColumnValue(name string) (any, error)

func (*RecordContext) SetColumnValue

func (rc *RecordContext) SetColumnValue(name string, v any) (bool, error)

func (*RecordContext) SetRawColumnValue

func (rc *RecordContext) SetRawColumnValue(name string, v any) (bool, error)

func (*RecordContext) SetRecord

func (rc *RecordContext) SetRecord(r *toolkit.Record)

Jump to

Keyboard shortcuts

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