utils

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTimeFormat = "2006-01-02 15:04:05"

Variables

View Source
var (
	DB *sql.DB
)

Functions

func CreateDatabase

func CreateDatabase() error

func GetIPs

func GetIPs() (ips []string)

Get all network card IP

func GetUID

func GetUID(ctx iris.Context) string

func Init

func Init()

func IsDatabaseExist

func IsDatabaseExist() bool

func Pagination

func Pagination(ctx iris.Context) (page, limit, start int)

func Random

func Random(lenght int) string

Types

type Time

type Time time.Time

func (*Time) IsZero

func (t *Time) IsZero() bool

func (*Time) MarshalJSON

func (t *Time) MarshalJSON() ([]byte, error)

func (Time) String

func (t Time) String() string

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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