Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct { ID ID Description string Created time.Time Config ValueCollections }
Change is one of the primary objects to be stored A model of the Change object - its is an immutable collection of ChangeValues
func CreateChange ¶
func CreateChange(config ValueCollections, desc string) (*Change, error)
CreateChange creates a Change object from ChangeValues The ID is a has generated from the change values,a nd does not include the description or the time. This way changes that have an identical meaning can be identified
func (Change) GnmiChange ¶
func (c Change) GnmiChange() (*gnmi.SetRequest, error)
GnmiChange converts a Change object to gNMI format
type ConfigValue ¶
ConfigValue is a of a path and a value
func (ConfigValue) IsPathValid ¶
func (c ConfigValue) IsPathValid() error
IsPathValid tests for valid paths. Path is valid if it 1) starts with a slash 2) is followed by at least one of alphanumeric or any of : = - _ [ ] 3) and any further combinations of 1+2 Two contiguous slashes are not allowed Paths not starting with slash are not allowed
type Value ¶
type Value struct { ConfigValue Remove bool }
Value is a model that extends ConfigValue - path and a value and bool
func CreateChangeValue ¶
CreateChangeValue decodes a path and value in to an object
type ValueCollections ¶
type ValueCollections []*Value
ValueCollections is an alias for a slice of ChangeValues