util

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes2String

func Bytes2String(b []byte) string

func String2Bytes

func String2Bytes(s string) []byte

Types

type DB

type DB struct {
	*gorm.DB
	UserName string
	Password string
	IP       string
	Port     int
	DBName   string
	Charset  string

	Logger *zap.Logger
}

func NewDB

func NewDB(UserName string, Password string, IP string, Port int, DBName string, Charset string) (*DB, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) Open

func (db *DB) Open() error

type Duration

type Duration time.Duration

func (Duration) ToDuration

func (d Duration) ToDuration() time.Duration

func (Duration) UnmarshalYAML

func (d Duration) UnmarshalYAML(unmarshal func(v interface{}) error) error

Jump to

Keyboard shortcuts

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