utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendMapIfExists

func AppendMapIfExists(condition bool, des map[string]interface{}, key string, value interface{})

func Contains

func Contains(s []interface{}, e interface{}) bool

func ConvertBool

func ConvertBool(value string) bool

func ConvertInt

func ConvertInt(value string) int

func ConvertInt32

func ConvertInt32(value string) int32

func ConvertUint8

func ConvertUint8(value string) uint8

func Delete

func Delete(slice []string, place int) []string

func ErrorFatal

func ErrorFatal(err error)

func ErrorWrap

func ErrorWrap(err error, wrap string) error

func Find

func Find(slice []string, val string) (int, bool)

func GetInterfaceIP

func GetInterfaceIP() string

func IntNullCheck

func IntNullCheck(value int) bool

func IsLocalIP

func IsLocalIP(ip string) bool

func MapToStruct

func MapToStruct(to interface{}, tag string, from interface{}) error

func StringNullCheck

func StringNullCheck(value string) bool

Types

type Error

type Error struct {
	Code   int
	Reason string
}

Error .

type Future

type Future struct {
	// contains filtered or unexported fields
}

Future .

func NewFuture

func NewFuture() *Future

NewFuture .

func (*Future) Await

func (future *Future) Await() (map[string]interface{}, *Error)

Await .

func (*Future) Reject

func (future *Future) Reject(err *Error)

Reject .

func (*Future) Resolve

func (future *Future) Resolve(result map[string]interface{})

Resolve .

func (*Future) Then

func (future *Future) Then(resolve func(result map[string]interface{}), reject func(err *Error))

Then .

Jump to

Keyboard shortcuts

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