unixid

package module
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InputPK

func InputPK(options ...string) *model.Input

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

func UnixNanoToStringDate added in v0.0.2

func UnixNanoToStringDate(unixNanoStr string) (date, err string)

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

Types

type UnixID

type UnixID struct {
	model.UnixTimeHandler
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(t model.UnixTimeHandler, l lockHandler, u model.UserAuthNumber) (h *UnixID, err string)

unixTimeHandler ej: time.Now() = UnixNano() int64 lockHandler ej: sync.Mutex{} = Lock() Unlock() UserAuthNumber ej: UserAuthNumber() string = 1,4,4000 .... if nil, always return 0.. id ej: 124663.0

func (*UnixID) GetNewID

func (id *UnixID) GetNewID() (new_id, err string)

GetNewID retorna un id único para el ingreso a la base de datos tipo unix time

Jump to

Keyboard shortcuts

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