Documentation
¶
Overview ¶
Package keysbuilder holds a datastructure to get and update requested keys.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder builds the keys. It is not save for concourent use. There is one Builder instance per client. It is not allowed to call builder.Update() more then once or at the same time as builder.Keys(). It is ok to call builder.Keys() at the same time more then once.
Has to be created with keysbuilder.FromJSON() or keysbuilder.ManyFromJSON().
func FromBuilders ¶
FromBuilders creates a new keysbuilder from a list of other builders.
func ManyFromJSON ¶
ManyFromJSON creates a list of Keysbuilder objects from a json list.
func (*Builder) Keys ¶
Keys returns the keys.
Make sure to call Update() or Keys() will return an empty list.
type InvalidError ¶
type InvalidError struct {
// contains filtered or unexported fields
}
InvalidError is an error that happens on an invalid request.
func (InvalidError) Error ¶
func (e InvalidError) Error() string
func (InvalidError) Fields ¶
func (e InvalidError) Fields() []string
Fields returns a list of field names from the parent to this error.
type JSONError ¶
type JSONError struct {
// contains filtered or unexported fields
}
JSONError is returned when invalid json is parsed or the json can not be decoded as a keysbuilder.
type Simple ¶
type Simple struct {
K []string
}
Simple implements the autoupdate.Keysbuilder interface. It returns the keys it was initialized with.
type ValueError ¶
type ValueError struct {
// contains filtered or unexported fields
}
ValueError in returned by keysbuilder.Update(), when the value of a key has not the expected format.
func (ValueError) Error ¶
func (e ValueError) Error() string