Documentation ¶
Index ¶
- func GenUUID() string
- func GetErrorFromResponse(r *http.Response) error
- func GetJsonFromRequest(r *http.Request, v interface{}) error
- func GetJsonFromResponse(r *http.Response, v interface{}) error
- func GetStringFromResponse(r *http.Response) (string, error)
- func SortedStringHas(s sort.StringSlice, x string) bool
- func SortedStringsDelete(s sort.StringSlice, x string) sort.StringSlice
- type LogLevel
- type Logger
- func (l *Logger) Critical(format string, v ...interface{})
- func (l *Logger) Debug(format string, v ...interface{})
- func (l *Logger) Err(err error) error
- func (l *Logger) Info(format string, v ...interface{})
- func (l *Logger) Level() LogLevel
- func (l *Logger) LogError(format string, v ...interface{}) error
- func (l *Logger) SetLevel(level LogLevel)
- func (l *Logger) WarnErr(err error) error
- func (l *Logger) Warning(format string, v ...interface{})
- type StatusGroup
- type StringSet
- type StringStack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetErrorFromResponse ¶
Return the body from a response as an error
func GetJsonFromRequest ¶
Unmarshal JSON from request
func GetJsonFromResponse ¶
Unmarshal JSON from response
func GetStringFromResponse ¶
Return the body from a response as a string
func SortedStringHas ¶
func SortedStringHas(s sort.StringSlice, x string) bool
Check if a sorted string list has a string
func SortedStringsDelete ¶
func SortedStringsDelete(s sort.StringSlice, x string) sort.StringSlice
Delete a string from a sorted string list
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
type StatusGroup ¶
type StatusGroup struct {
// contains filtered or unexported fields
}
func NewStatusGroup ¶
func NewStatusGroup() *StatusGroup
Create a new goroutine error status collector
func (*StatusGroup) Add ¶
func (s *StatusGroup) Add(delta int)
Adds to the number of goroutines it should wait
func (*StatusGroup) Done ¶
func (s *StatusGroup) Done()
Removes the number of pending goroutines by one
func (*StatusGroup) Err ¶
func (s *StatusGroup) Err(err error)
Goroutine can return an error back to caller
func (*StatusGroup) Result ¶
func (s *StatusGroup) Result() error
Returns an error if any of the spawned goroutines return an error. Only the last error is saved. This function must be called last after the last s.Register() function
type StringSet ¶
type StringSet struct {
Set sort.StringSlice
}
func NewStringSet ¶
func NewStringSet() *StringSet
Create a string set.
A string set is a list where each element appears only once
type StringStack ¶
type StringStack struct {
// contains filtered or unexported fields
}
func NewStringStack ¶
func NewStringStack() *StringStack
func (*StringStack) IsEmpty ¶
func (a *StringStack) IsEmpty() bool
func (*StringStack) Pop ¶
func (a *StringStack) Pop() (x string)
func (*StringStack) Push ¶
func (a *StringStack) Push(x string)