unixid

package module
v0.0.50 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 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 NoSessionNumber added in v0.0.44

type NoSessionNumber struct{}

always return ""

func (NoSessionNumber) UserSessionNumber added in v0.0.44

func (NoSessionNumber) UserSessionNumber() (num, err string)

always return ""

type UnixID

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

func NewHandler

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

unixTimeHandler ej: time.Now() = UnixNano() int64 lockHandler ej: sync.Mutex{} = Lock() Unlock() UserSessionNumber ej: UserSessionNumber() 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