utils

package
v0.0.0-...-c528213 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupDownloads

func CleanupDownloads()

func ConcatenateErrors

func ConcatenateErrors(errs *[]error) string

func DownloadFile

func DownloadFile(url string, fileName string, isPrivate bool) (filePath string, size int64, err error)

func EpochDate

func EpochDate(date time.Time) int64

func EpochHours

func EpochHours() int64

func EpochNow

func EpochNow() int64

func GetEnv

func GetEnv(key string, required bool) string

func MakeUrl

func MakeUrl(url string, isPrivate bool, skip_check bool, expiry int64) string

func RemoveDuplicates

func RemoveDuplicates(arr *[]string)

func StringInSlice

func StringInSlice(list []string, a string) bool

func ValidateAndRaiseError

func ValidateAndRaiseError(request *gottp.Request, structure interface{}) bool

Types

type M

type M bson.M

func GetPaginationToQuery

func GetPaginationToQuery(paginator *gottp.Paginator) *M

type MailConn

type MailConn struct {
	HostName   string
	UserName   string
	Password   string
	SenderName string
	Port       string
	Host       string
}

func (*MailConn) MessageBytes

func (conn *MailConn) MessageBytes(message Message) []byte

func (*MailConn) SendEmail

func (conn *MailConn) SendEmail(message Message)

type Message

type Message struct {
	From    string
	To      []string
	Subject string
	Body    string
}

type R

type R struct {
	StatusCode int
	Data       interface{}
	Message    string
}

func (R) SendOverWire

func (self R) SendOverWire() utils.Q

type TimedWaitGroup

type TimedWaitGroup struct {
	sync.WaitGroup
	TimeOut time.Duration
}

func (*TimedWaitGroup) GetCompletionChannel

func (self *TimedWaitGroup) GetCompletionChannel(completionChannel chan<- bool)

func (*TimedWaitGroup) TimedWait

func (self *TimedWaitGroup) TimedWait() bool

Jump to

Keyboard shortcuts

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