Documentation ¶
Index ¶
- Constants
- Variables
- func ConfirmDialog(payload UtilDialogPayloadType) h.HTMLComponent
- func CustomDialog(payload UtilDialogPayloadType) h.HTMLComponent
- func DeleteDialog(msg string, okAction string, msgr *Messages) h.HTMLComponent
- func Filter[T any](ss []T, compare func(T) bool) (ret []T)
- func GetObjectName(obj interface{}) string
- func GetPrimaryKeys(obj interface{}, db *gorm.DB) (result []string, err error)
- func GetStruct(t reflect.Type) interface{}
- func GroupBySlice[T comparable, Kt comparable](slices []T, f func(T) Kt) (v [][]T)
- func Install(b *presets.Builder)
- func ParseTagOption(str string) map[string]string
- func PrimarySluggerWhere(db *gorm.DB, obj interface{}, id string, withoutKeys ...string) *gorm.DB
- func SetPrimaryKeys(from, to interface{}, db *gorm.DB, paramId string) (err error)
- func Transact(db *gorm.DB, f func(tx *gorm.DB) error) (err error)
- type Messages
- type UtilDialogPayloadType
Constants ¶
View Source
const I18nUtilsKey i18n.ModuleKey = "I18nUtilsKey"
Variables ¶
View Source
var Messages_en_US = &Messages{
OK: "OK",
Cancel: "Cancel",
ModalTitleConfirm: "Confirm",
}
View Source
var Messages_ja_JP = &Messages{
OK: "OK",
Cancel: "キャンセル",
ModalTitleConfirm: "確認",
}
View Source
var Messages_zh_CN = &Messages{
OK: "确定",
Cancel: "取消",
ModalTitleConfirm: "确认",
}
Functions ¶
func ConfirmDialog ¶
func ConfirmDialog(payload UtilDialogPayloadType) h.HTMLComponent
func CustomDialog ¶ added in v3.0.1
func CustomDialog(payload UtilDialogPayloadType) h.HTMLComponent
func DeleteDialog ¶ added in v3.0.1
func DeleteDialog(msg string, okAction string, msgr *Messages) h.HTMLComponent
func GetObjectName ¶ added in v3.0.2
func GetObjectName(obj interface{}) string
func GetPrimaryKeys ¶
func GroupBySlice ¶ added in v3.0.1
func GroupBySlice[T comparable, Kt comparable](slices []T, f func(T) Kt) (v [][]T)
func ParseTagOption ¶
ParseTagOption parse tag options to hash
func PrimarySluggerWhere ¶
func SetPrimaryKeys ¶
Types ¶
type Messages ¶
func MustGetMessages ¶ added in v3.0.1
type UtilDialogPayloadType ¶ added in v3.0.6
type UtilDialogPayloadType struct { Title string TypeField vx.VXDialogType Size vx.VXDialogSize Text string ContentEl h.HTMLComponent OkAction string CancelAction string Width int HideClose bool Msgr *Messages }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.