Documentation ¶
Index ¶
- func MapFromOneTaggedField(tag string, model interface{}) *orderedmap.OrderedMap
- func MapFromTaggedFields(tag string, model interface{}) *orderedmap.OrderedMap
- func ProcessPanic(err interface{}, logger log.Logger, logFilePath string) int
- func ReplacePlaceholders(path string, placeholders map[string]interface{}) string
- func SetField(field *StructField, value, target interface{})
- func SetFields(fields []*StructField, data *orderedmap.OrderedMap, target interface{})
- func SortByName(slice interface{}) interface{}
- func StringFromOneTaggedField(tag string, model interface{}) (str string, found bool)
- type MultiError
- type NestedError
- type PathTemplate
- type SafeCounter
- type StructField
- type UserError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapFromOneTaggedField ¶
func MapFromOneTaggedField(tag string, model interface{}) *orderedmap.OrderedMap
func MapFromTaggedFields ¶
func MapFromTaggedFields(tag string, model interface{}) *orderedmap.OrderedMap
func ReplacePlaceholders ¶
func SetField ¶
func SetField(field *StructField, value, target interface{})
func SetFields ¶
func SetFields(fields []*StructField, data *orderedmap.OrderedMap, target interface{})
func SortByName ¶
func SortByName(slice interface{}) interface{}
SortByName - in tests are IDs and sort random -> so we must sort by name.
Types ¶
type MultiError ¶
type MultiError struct {
// contains filtered or unexported fields
}
func NewMultiError ¶
func NewMultiError() *MultiError
func (*MultiError) AppendWithPrefix ¶
func (e *MultiError) AppendWithPrefix(prefix string, err error)
AppendWithPrefix - add an error with custom prefix.
type NestedError ¶
type NestedError struct { *MultiError // contains filtered or unexported fields }
func PrefixError ¶
func PrefixError(msg string, err error) *NestedError
func (*NestedError) Error ¶
func (e *NestedError) Error() (out string)
type PathTemplate ¶
type PathTemplate string
type SafeCounter ¶
type SafeCounter struct {
// contains filtered or unexported fields
}
func NewSafeCounter ¶
func NewSafeCounter(value int) *SafeCounter
func (*SafeCounter) Get ¶
func (c *SafeCounter) Get() int
func (*SafeCounter) GetAndInc ¶
func (c *SafeCounter) GetAndInc() int
func (*SafeCounter) Inc ¶
func (c *SafeCounter) Inc()
func (*SafeCounter) IncAndGet ¶
func (c *SafeCounter) IncAndGet() int
type StructField ¶
type StructField struct { reflect.StructField // contains filtered or unexported fields }
func GetFieldsWithTag ¶
func GetFieldsWithTag(tag string, model interface{}) []*StructField
func GetOneFieldWithTag ¶
func GetOneFieldWithTag(tag string, model interface{}) *StructField
func (*StructField) JsonName ¶
func (f *StructField) JsonName() string
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package orderedmap is modified version of: https://github.com/iancoleman/orderedmap
|
Package orderedmap is modified version of: https://github.com/iancoleman/orderedmap |
nolint forbidigo
|
nolint forbidigo |
nolint forbidigo
|
nolint forbidigo |
Click to show internal directories.
Click to hide internal directories.