tools

package
v0.0.0-...-a18ff84 Latest Latest
Warning

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

Go to latest
Published: May 11, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Verbose = true

Verbose flag to switch verbose

Functions

func Dumper

func Dumper(infos ...interface{})

Dumper verbose logs

Types

type HTTPCurl

type HTTPCurl struct {
	HTTPClient *http.Client
	Timeout    time.Duration
}

HTTPCurl helpers for http requests

func NewHTTPCurl

func NewHTTPCurl() *HTTPCurl

NewHTTPCurl new http helper object

func (*HTTPCurl) Get

func (g *HTTPCurl) Get(url string) (string, int, error)

Get request via get

func (*HTTPCurl) Init

func (g *HTTPCurl) Init()

Init start prep

type Helper

type Helper struct {
}

Helper utility

func (Helper) FormatSliceToIntMap

func (h Helper) FormatSliceToIntMap(all []int) map[int]int

FormatSliceToIntMap convert slice of int to map

func (Helper) HashMD5

func (h Helper) HashMD5(s string) string

HashMD5 generate md5 string

func (Helper) RemoveIntDuplicates

func (h Helper) RemoveIntDuplicates(elements []int) []int

RemoveIntDuplicates de-duplicate int list

func (Helper) RemoveStrDuplicates

func (h Helper) RemoveStrDuplicates(elements []string) []string

RemoveStrDuplicates de-duplicate string list

func (Helper) UUID

func (h Helper) UUID() string

UUID random uuid

type Seeder

type Seeder struct {
}

Seeder generator of dummy data

func (Seeder) Create

func (s Seeder) Create() string

Create geneate dummy building-data

func (Seeder) CreateFloors

func (s Seeder) CreateFloors() []string

CreateFloors generate random floor list

func (Seeder) CreateMin

func (s Seeder) CreateMin() string

CreateMin geneate dummy building-data and with only name

func (Seeder) CreateWithEmptyName

func (s Seeder) CreateWithEmptyName() string

CreateWithEmptyName geneate dummy building-data with empty name

func (Seeder) CreateWithName

func (s Seeder) CreateWithName(name string) string

CreateWithName geneate dummy building-data and with name

func (Seeder) Update

func (s Seeder) Update(pid, name string) string

Update geneate dummy building-data with an ID from parameter

Jump to

Keyboard shortcuts

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