Documentation ¶
Index ¶
- func AssureBoolValue(mod bool, old bool, value bool) (bool, bool)
- func AssureInt64PtrPtr(mod bool, old *int64, ptr *int64) (*int64, bool)
- func AssureInt64PtrValue(mod bool, old *int64, value int64) (*int64, bool)
- func AssureInt64Value(mod bool, old int64, value int64) (int64, bool)
- func AssureIntPtrValue(mod bool, old *int, value int) (*int, bool)
- func AssureIntValue(mod bool, old int, value int) (int, bool)
- func AssureStringPtrPtr(mod bool, old *string, ptr *string) (*string, bool)
- func AssureStringPtrValue(mod bool, old *string, value string) (*string, bool)
- func AssureStringSet(mod bool, old []string, value StringSet) ([]string, bool)
- func AssureStringValue(mod bool, old string, value string) (string, bool)
- func Error(args ...interface{}) error
- func FillStringValue(msg string, variable *string, value string) error
- func FirstValue(args ...interface{}) interface{}
- func GetValue(f reflect.Value) interface{}
- func GlobMatcher(s, p interface{}) bool
- func Int64Equal(a, b *int64) bool
- func Int64Value(v *int64, def int64) int64
- func IntEqual(a, b *int) bool
- func IsEmptyString(s *string) bool
- func IsNil(o interface{}) bool
- func Match(s, p []interface{}, star interface{}, ...) bool
- func Must(args ...interface{})
- func RuneMatcher(s, p interface{}) bool
- func Runes(s string) (runes []interface{})
- func SetValue(f reflect.Value, v interface{}) error
- func StringArrayAddUnique(array *[]string, values ...string) []string
- func StringEqual(a, b *string) bool
- func StringKeyArray(anystringkeymap interface{}) []string
- func StringValue(s *string) string
- func Strings(s ...string) string
- func TypeKey(v interface{}) (reflect.Type, error)
- type Matcher
- type ModificationState
- func (this *ModificationState) AssureBoolValue(dst *bool, val bool) *ModificationState
- func (this *ModificationState) AssureInt64PtrPtr(dst **int64, ptr *int64) *ModificationState
- func (this *ModificationState) AssureInt64PtrValue(dst **int64, val int64) *ModificationState
- func (this *ModificationState) AssureInt64Value(dst *int64, val int64) *ModificationState
- func (this *ModificationState) AssureIntPtrValue(dst **int, val int) *ModificationState
- func (this *ModificationState) AssureIntValue(dst *int, val int) *ModificationState
- func (this *ModificationState) AssureStringPtrPtr(dst **string, ptr *string) *ModificationState
- func (this *ModificationState) AssureStringPtrValue(dst **string, val string) *ModificationState
- func (this *ModificationState) AssureStringSet(dst *[]string, val StringSet) *ModificationState
- func (this *ModificationState) AssureStringValue(dst *string, val string) *ModificationState
- func (this *ModificationState) IsModified() bool
- func (this *ModificationState) Modify(m bool) *ModificationState
- func (this *ModificationState) OnModified(f func() error) error
- type Properties
- type RateLimiter
- type StringMatcher
- type StringSet
- func (this StringSet) Add(n ...string) StringSet
- func (this StringSet) AddAll(n []string) StringSet
- func (this StringSet) AddAllSplitted(n string) StringSet
- func (this StringSet) AddSet(sets ...StringSet) StringSet
- func (this StringSet) AsArray() []string
- func (this StringSet) Clear()
- func (this StringSet) Contains(n string) bool
- func (this StringSet) Copy() StringSet
- func (this StringSet) DiffFrom(set StringSet) (add, del StringSet)
- func (this StringSet) Equals(set StringSet) bool
- func (this StringSet) Intersect(o StringSet) StringSet
- func (this StringSet) IsEmpty() bool
- func (this StringSet) Remove(n ...string) StringSet
- func (this StringSet) RemoveSet(sets ...StringSet) StringSet
- func (this StringSet) String() string
- type StringStack
- type Versioned
- func (this *Versioned) GetDefault() interface{}
- func (this *Versioned) GetFor(req *semver.Version) interface{}
- func (this *Versioned) GetVersions() map[*semver.Version]interface{}
- func (this *Versioned) MustRegisterVersion(v *semver.Version, obj interface{})
- func (this *Versioned) RegisterVersion(v *semver.Version, obj interface{}) error
- func (this *Versioned) SetDefault(obj interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssureInt64PtrValue ¶
func AssureStringPtrPtr ¶
func AssureStringPtrValue ¶
func AssureStringSet ¶
func FirstValue ¶ added in v0.2.0
func FirstValue(args ...interface{}) interface{}
func GlobMatcher ¶
func GlobMatcher(s, p interface{}) bool
func Int64Equal ¶
func Int64Value ¶
func IsEmptyString ¶
func Must ¶ added in v0.2.0
func Must(args ...interface{})
Must panics on non-nil errors. Useful to handling programmer level errors.
func RuneMatcher ¶
func RuneMatcher(s, p interface{}) bool
func StringArrayAddUnique ¶ added in v0.2.0
func StringEqual ¶
func StringKeyArray ¶ added in v0.2.0
func StringKeyArray(anystringkeymap interface{}) []string
func StringValue ¶
Types ¶
type ModificationState ¶
type ModificationState struct {
Modified bool
}
func (*ModificationState) AssureBoolValue ¶
func (this *ModificationState) AssureBoolValue(dst *bool, val bool) *ModificationState
func (*ModificationState) AssureInt64PtrPtr ¶
func (this *ModificationState) AssureInt64PtrPtr(dst **int64, ptr *int64) *ModificationState
func (*ModificationState) AssureInt64PtrValue ¶
func (this *ModificationState) AssureInt64PtrValue(dst **int64, val int64) *ModificationState
func (*ModificationState) AssureInt64Value ¶
func (this *ModificationState) AssureInt64Value(dst *int64, val int64) *ModificationState
func (*ModificationState) AssureIntPtrValue ¶
func (this *ModificationState) AssureIntPtrValue(dst **int, val int) *ModificationState
func (*ModificationState) AssureIntValue ¶
func (this *ModificationState) AssureIntValue(dst *int, val int) *ModificationState
func (*ModificationState) AssureStringPtrPtr ¶
func (this *ModificationState) AssureStringPtrPtr(dst **string, ptr *string) *ModificationState
func (*ModificationState) AssureStringPtrValue ¶
func (this *ModificationState) AssureStringPtrValue(dst **string, val string) *ModificationState
func (*ModificationState) AssureStringSet ¶
func (this *ModificationState) AssureStringSet(dst *[]string, val StringSet) *ModificationState
func (*ModificationState) AssureStringValue ¶
func (this *ModificationState) AssureStringValue(dst *string, val string) *ModificationState
func (*ModificationState) IsModified ¶
func (this *ModificationState) IsModified() bool
func (*ModificationState) Modify ¶
func (this *ModificationState) Modify(m bool) *ModificationState
func (*ModificationState) OnModified ¶
func (this *ModificationState) OnModified(f func() error) error
type Properties ¶
func (Properties) Copy ¶
func (this Properties) Copy() Properties
func (Properties) Has ¶
func (this Properties) Has(k string) bool
func (Properties) Keys ¶
func (this Properties) Keys() StringSet
type RateLimiter ¶ added in v0.2.0
func NewDefaultRateLimiter ¶ added in v0.2.0
func NewDefaultRateLimiter(min, max time.Duration) RateLimiter
func NewRateLimiter ¶ added in v0.2.0
func NewRateLimiter(min, max, minincr time.Duration, factor float64) RateLimiter
type StringMatcher ¶ added in v0.2.0
type StringMatcher string
func (StringMatcher) Match ¶ added in v0.2.0
func (this StringMatcher) Match(s string) bool
func (StringMatcher) String ¶ added in v0.2.0
func (this StringMatcher) String() string
type StringSet ¶
type StringSet map[string]struct{}
func NewStringSet ¶
func NewStringSetByArray ¶
func NewStringSetBySets ¶
func StringKeySet ¶ added in v0.2.0
func StringKeySet(anystringkeymap interface{}) StringSet
func StringValueSet ¶ added in v0.2.0
func StringValueSet(anystringvaluemap interface{}) StringSet
func (StringSet) AddAllSplitted ¶
type StringStack ¶ added in v0.2.0
type StringStack []string
func (StringStack) Empty ¶ added in v0.2.0
func (this StringStack) Empty() bool
func (StringStack) Peek ¶ added in v0.2.0
func (this StringStack) Peek() string
func (*StringStack) Pop ¶ added in v0.2.0
func (this *StringStack) Pop() string
func (*StringStack) Push ¶ added in v0.2.0
func (this *StringStack) Push(name string)
func (StringStack) Size ¶ added in v0.2.0
func (this StringStack) Size() int
type Versioned ¶
type Versioned struct {
// contains filtered or unexported fields
}
Versioned maintains a set of provided object versions and yields the best such version for given required version.
func NewVersioned ¶
func NewVersioned(proto interface{}) *Versioned
func (*Versioned) GetDefault ¶ added in v0.2.0
func (this *Versioned) GetDefault() interface{}
func (*Versioned) GetVersions ¶ added in v0.2.0
func (*Versioned) MustRegisterVersion ¶
func (*Versioned) RegisterVersion ¶
func (*Versioned) SetDefault ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.