unixid

package module
v0.0.56 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2025 License: MIT Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InputPK

func InputPK(options ...string) *pk

Primary key parámetro opcional: "show": el campo se mostrara el usuario por defecto estará oculto

func LegendID added in v0.0.54

func LegendID(table_legend string) string

Types

type Config added in v0.0.54

type Config struct {
	Session userSessionNumber // ej: userSessionNumber() string = 1,4,4000 .... if nil, always return 0.. id ej: 124663.0
	// contains filtered or unexported fields
}

type UnixID

type UnixID struct {
	*Config
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(none ...any) (*UnixID, error)

config server not required

func (*UnixID) FieldType added in v0.0.55

func (u *UnixID) FieldType(tableName, fieldName string) (ID, PK bool)

func (*UnixID) GetNewID

func (id *UnixID) GetNewID() (string, error)

GetNewID retorna un id único para el ingreso a la base de datos tipo unix time formato 121212.2 (unix time + . + user number) 1 allocs

func (*UnixID) SetValue added in v0.0.55

func (id *UnixID) SetValue(rv *reflect.Value, valueOut *string, sizeOut []byte) error

func (*UnixID) UnixNanoToStringDate added in v0.0.54

func (u *UnixID) UnixNanoToStringDate(unixNanoStr string) (string, error)

ej: 1123466.42 = 2006-01-02 15:04

Jump to

Keyboard shortcuts

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