util

package
v4.3.12+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VERSION = "4.3.12"

VERSION identifies Khan's current version

Functions

func NowMilli

func NowMilli() int64

NowMilli returns now in milliseconds since epoch

Types

type Level

type Level struct {
	Key   string
	Value int
}

Level maps levels

type LevelsList

type LevelsList []Level

LevelsList allows sorting levels by the int value

func SortLevels

func SortLevels(levels map[string]interface{}) LevelsList

SortLevels sorts levels

func (LevelsList) Len

func (l LevelsList) Len() int

func (LevelsList) Less

func (l LevelsList) Less(i, j int) bool

func (LevelsList) Swap

func (l LevelsList) Swap(i, j int)

type TypeConverter

type TypeConverter struct{}

TypeConverter type

func (TypeConverter) FromDb

func (tc TypeConverter) FromDb(target interface{}) (gorp.CustomScanner, bool)

FromDb converts target from string to json

func (TypeConverter) ToDb

func (tc TypeConverter) ToDb(val interface{}) (interface{}, error)

ToDb converts val from json to string

Jump to

Keyboard shortcuts

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