Documentation ¶
Overview ¶
Package device is a generated GoMock package.
Index ¶
- Constants
- Variables
- func IsPathValid(path string) error
- type Change
- func (*Change) Descriptor() ([]byte, []int)
- func (m *Change) GetDeviceID() github_com_onosproject_onos_api_go_onos_config_device.ID
- func (m *Change) GetDeviceType() github_com_onosproject_onos_api_go_onos_config_device.Type
- func (m *Change) GetDeviceVersion() github_com_onosproject_onos_api_go_onos_config_device.Version
- func (m *Change) GetValues() []*ChangeValue
- func (c *Change) GetVersionedDeviceID() device.VersionedID
- func (m *Change) Marshal() (dAtA []byte, err error)
- func (m *Change) MarshalTo(dAtA []byte) (int, error)
- func (m *Change) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Change) ProtoMessage()
- func (m *Change) Reset()
- func (m *Change) Size() (n int)
- func (m *Change) String() string
- func (m *Change) Unmarshal(dAtA []byte) error
- func (m *Change) XXX_DiscardUnknown()
- func (m *Change) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Change) XXX_Merge(src proto.Message)
- func (m *Change) XXX_Size() int
- func (m *Change) XXX_Unmarshal(b []byte) error
- type ChangeValue
- func (*ChangeValue) Descriptor() ([]byte, []int)
- func (m *ChangeValue) GetPath() string
- func (m *ChangeValue) GetRemoved() bool
- func (m *ChangeValue) GetValue() *TypedValue
- func (m *ChangeValue) Marshal() (dAtA []byte, err error)
- func (m *ChangeValue) MarshalTo(dAtA []byte) (int, error)
- func (m *ChangeValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ChangeValue) ProtoMessage()
- func (m *ChangeValue) Reset()
- func (m *ChangeValue) Size() (n int)
- func (m *ChangeValue) String() string
- func (m *ChangeValue) Unmarshal(dAtA []byte) error
- func (m *ChangeValue) XXX_DiscardUnknown()
- func (m *ChangeValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChangeValue) XXX_Merge(src proto.Message)
- func (m *ChangeValue) XXX_Size() int
- func (m *ChangeValue) XXX_Unmarshal(b []byte) error
- type DeviceChange
- func (*DeviceChange) Descriptor() ([]byte, []int)
- func (m *DeviceChange) GetChange() *Change
- func (m *DeviceChange) GetCreated() time.Time
- func (m *DeviceChange) GetID() ID
- func (m *DeviceChange) GetIndex() Index
- func (m *DeviceChange) GetNetworkChange() NetworkChangeRef
- func (m *DeviceChange) GetRevision() Revision
- func (m *DeviceChange) GetStatus() change.Status
- func (m *DeviceChange) GetUpdated() time.Time
- func (m *DeviceChange) Marshal() (dAtA []byte, err error)
- func (m *DeviceChange) MarshalTo(dAtA []byte) (int, error)
- func (m *DeviceChange) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DeviceChange) ProtoMessage()
- func (m *DeviceChange) Reset()
- func (m *DeviceChange) Size() (n int)
- func (m *DeviceChange) String() string
- func (m *DeviceChange) Unmarshal(dAtA []byte) error
- func (m *DeviceChange) XXX_DiscardUnknown()
- func (m *DeviceChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeviceChange) XXX_Merge(src proto.Message)
- func (m *DeviceChange) XXX_Size() int
- func (m *DeviceChange) XXX_Unmarshal(b []byte) error
- type ID
- type Index
- type NetworkChangeRef
- func (*NetworkChangeRef) Descriptor() ([]byte, []int)
- func (m *NetworkChangeRef) GetID() github_com_onosproject_onos_api_go_onos_config.ID
- func (m *NetworkChangeRef) GetIndex() github_com_onosproject_onos_api_go_onos_config.Index
- func (m *NetworkChangeRef) Marshal() (dAtA []byte, err error)
- func (m *NetworkChangeRef) MarshalTo(dAtA []byte) (int, error)
- func (m *NetworkChangeRef) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*NetworkChangeRef) ProtoMessage()
- func (m *NetworkChangeRef) Reset()
- func (m *NetworkChangeRef) Size() (n int)
- func (m *NetworkChangeRef) String() string
- func (m *NetworkChangeRef) Unmarshal(dAtA []byte) error
- func (m *NetworkChangeRef) XXX_DiscardUnknown()
- func (m *NetworkChangeRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NetworkChangeRef) XXX_Merge(src proto.Message)
- func (m *NetworkChangeRef) XXX_Size() int
- func (m *NetworkChangeRef) XXX_Unmarshal(b []byte) error
- type PathValue
- func (*PathValue) Descriptor() ([]byte, []int)
- func (m *PathValue) GetPath() string
- func (m *PathValue) GetValue() *TypedValue
- func (m *PathValue) Marshal() (dAtA []byte, err error)
- func (m *PathValue) MarshalTo(dAtA []byte) (int, error)
- func (m *PathValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PathValue) ProtoMessage()
- func (m *PathValue) Reset()
- func (m *PathValue) Size() (n int)
- func (m *PathValue) String() string
- func (m *PathValue) Unmarshal(dAtA []byte) error
- func (m *PathValue) XXX_DiscardUnknown()
- func (m *PathValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PathValue) XXX_Merge(src proto.Message)
- func (m *PathValue) XXX_Size() int
- func (m *PathValue) XXX_Unmarshal(b []byte) error
- type Revision
- type TypedBool
- type TypedBytes
- type TypedDecimal
- type TypedEmpty
- type TypedFloat
- type TypedInt
- type TypedLeafListBool
- type TypedLeafListBytes
- type TypedLeafListDecimal
- type TypedLeafListFloat
- type TypedLeafListInt
- type TypedLeafListString
- type TypedLeafListUint
- type TypedString
- type TypedUint
- type TypedValue
- func NewLeafListBoolTv(values []bool) *TypedValue
- func NewLeafListBytesTv(values [][]byte) *TypedValue
- func NewLeafListDecimalTv(digits []int64, precision uint8) *TypedValue
- func NewLeafListFloatTv(values []float32) *TypedValue
- func NewLeafListIntTv(values []int64, width Width) *TypedValue
- func NewLeafListStringTv(values []string) *TypedValue
- func NewLeafListUintTv(values []uint64, width Width) *TypedValue
- func NewTypedValue(bytes []byte, valueType ValueType, typeOpts []uint8) (*TypedValue, error)
- func NewTypedValueBool(value bool) *TypedValue
- func NewTypedValueBytes(value []byte) *TypedValue
- func NewTypedValueDecimal(digits int64, precision uint8) *TypedValue
- func NewTypedValueEmpty() *TypedValue
- func NewTypedValueFloat(value float64) *TypedValue
- func NewTypedValueInt(value int, width Width) *TypedValue
- func NewTypedValueString(value string) *TypedValue
- func NewTypedValueUint(value uint, width Width) *TypedValue
- func (*TypedValue) Descriptor() ([]byte, []int)
- func (m *TypedValue) GetBytes() []byte
- func (m *TypedValue) GetType() ValueType
- func (m *TypedValue) GetTypeOpts() []int32
- func (m *TypedValue) Marshal() (dAtA []byte, err error)
- func (m *TypedValue) MarshalTo(dAtA []byte) (int, error)
- func (m *TypedValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TypedValue) ProtoMessage()
- func (m *TypedValue) Reset()
- func (m *TypedValue) Size() (n int)
- func (m *TypedValue) String() string
- func (m *TypedValue) Unmarshal(dAtA []byte) error
- func (tv *TypedValue) ValueToString() string
- func (m *TypedValue) XXX_DiscardUnknown()
- func (m *TypedValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TypedValue) XXX_Merge(src proto.Message)
- func (m *TypedValue) XXX_Size() int
- func (m *TypedValue) XXX_Unmarshal(b []byte) error
- type TypedValueMap
- type ValueType
- type Width
Constants ¶
const PathRegexp = `(/[a-zA-Z0-9:=\-\._[\]]+)+`
PathRegexp - permissible values in paths
Variables ¶
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )
var ValueType_name = map[int32]string{
0: "EMPTY",
1: "STRING",
2: "INT",
3: "UINT",
4: "BOOL",
5: "DECIMAL",
6: "FLOAT",
7: "BYTES",
8: "LEAFLIST_STRING",
9: "LEAFLIST_INT",
10: "LEAFLIST_UINT",
11: "LEAFLIST_BOOL",
12: "LEAFLIST_DECIMAL",
13: "LEAFLIST_FLOAT",
14: "LEAFLIST_BYTES",
}
var ValueType_value = map[string]int32{
"EMPTY": 0,
"STRING": 1,
"INT": 2,
"UINT": 3,
"BOOL": 4,
"DECIMAL": 5,
"FLOAT": 6,
"BYTES": 7,
"LEAFLIST_STRING": 8,
"LEAFLIST_INT": 9,
"LEAFLIST_UINT": 10,
"LEAFLIST_BOOL": 11,
"LEAFLIST_DECIMAL": 12,
"LEAFLIST_FLOAT": 13,
"LEAFLIST_BYTES": 14,
}
Functions ¶
func IsPathValid ¶
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
Types ¶
type Change ¶
type Change struct { // 'device_id' is the identifier of the device to which this change applies DeviceID github_com_onosproject_onos_api_go_onos_config_device.ID `` /* 151-byte string literal not displayed */ // 'device_version' is an optional device version to which to apply this change DeviceVersion github_com_onosproject_onos_api_go_onos_config_device.Version `` /* 171-byte string literal not displayed */ // 'device_type' is an optional device type to which to apply this change DeviceType github_com_onosproject_onos_api_go_onos_config_device.Type `` /* 159-byte string literal not displayed */ // 'values' is a set of change values to apply Values []*ChangeValue `protobuf:"bytes,4,rep,name=values,proto3" json:"values,omitempty"` }
Change represents a configuration change to a single device
func (*Change) Descriptor ¶
func (*Change) GetDeviceID ¶
func (m *Change) GetDeviceID() github_com_onosproject_onos_api_go_onos_config_device.ID
func (*Change) GetDeviceType ¶
func (m *Change) GetDeviceType() github_com_onosproject_onos_api_go_onos_config_device.Type
func (*Change) GetDeviceVersion ¶
func (m *Change) GetDeviceVersion() github_com_onosproject_onos_api_go_onos_config_device.Version
func (*Change) GetValues ¶
func (m *Change) GetValues() []*ChangeValue
func (*Change) GetVersionedDeviceID ¶
func (c *Change) GetVersionedDeviceID() device.VersionedID
GetVersionedDeviceID returns the device VersionedID for the change
func (*Change) MarshalToSizedBuffer ¶
func (*Change) ProtoMessage ¶
func (*Change) ProtoMessage()
func (*Change) XXX_DiscardUnknown ¶
func (m *Change) XXX_DiscardUnknown()
func (*Change) XXX_Marshal ¶
func (*Change) XXX_Unmarshal ¶
type ChangeValue ¶
type ChangeValue struct { // 'path' is the path to change Path string `protobuf:"bytes,1,opt,name=path,json=Path,proto3" json:"Path,omitempty"` // 'value' is the change value Value *TypedValue `protobuf:"bytes,2,opt,name=value,json=Value,proto3" json:"Value,omitempty"` // 'removed' indicates whether this is a delete Removed bool `protobuf:"varint,3,opt,name=removed,proto3" json:"Remove,omitempty"` }
ChangeValue is an individual Path/Value and removed flag combination in a Change
func NewChangeValue ¶
func NewChangeValue(path string, value *TypedValue, isRemove bool) (*ChangeValue, error)
NewChangeValue decodes a path and value in to an object
func (*ChangeValue) Descriptor ¶
func (*ChangeValue) Descriptor() ([]byte, []int)
func (*ChangeValue) GetPath ¶
func (m *ChangeValue) GetPath() string
func (*ChangeValue) GetRemoved ¶
func (m *ChangeValue) GetRemoved() bool
func (*ChangeValue) GetValue ¶
func (m *ChangeValue) GetValue() *TypedValue
func (*ChangeValue) Marshal ¶
func (m *ChangeValue) Marshal() (dAtA []byte, err error)
func (*ChangeValue) MarshalToSizedBuffer ¶
func (m *ChangeValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ChangeValue) ProtoMessage ¶
func (*ChangeValue) ProtoMessage()
func (*ChangeValue) Reset ¶
func (m *ChangeValue) Reset()
func (*ChangeValue) Size ¶
func (m *ChangeValue) Size() (n int)
func (*ChangeValue) String ¶
func (m *ChangeValue) String() string
func (*ChangeValue) Unmarshal ¶
func (m *ChangeValue) Unmarshal(dAtA []byte) error
func (*ChangeValue) XXX_DiscardUnknown ¶
func (m *ChangeValue) XXX_DiscardUnknown()
func (*ChangeValue) XXX_Marshal ¶
func (m *ChangeValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChangeValue) XXX_Merge ¶
func (m *ChangeValue) XXX_Merge(src proto.Message)
func (*ChangeValue) XXX_Size ¶
func (m *ChangeValue) XXX_Size() int
func (*ChangeValue) XXX_Unmarshal ¶
func (m *ChangeValue) XXX_Unmarshal(b []byte) error
type DeviceChange ¶
type DeviceChange struct { // 'id' is the unique identifier of the change ID ID `protobuf:"bytes,1,opt,name=id,proto3,casttype=ID" json:"id,omitempty"` // 'index' is a monotonically increasing, globally unique index of the change // The index is provided by the store, is static and unique for each unique change identifier, // and should not be modified by client code. Index Index `protobuf:"varint,2,opt,name=index,proto3,casttype=Index" json:"index,omitempty"` // 'revision' is the change revision number // The revision number is provided by the store and should not be modified by client code. // Each unique state of the change will be assigned a unique revision number which can be // used for optimistic concurrency control when updating or deleting the change state. Revision Revision `protobuf:"varint,3,opt,name=revision,proto3,casttype=Revision" json:"revision,omitempty"` // 'network_change' is a reference to the NetworkChange that created this change NetworkChange NetworkChangeRef `protobuf:"bytes,4,opt,name=network_change,json=networkChange,proto3" json:"network_change"` // 'change' is the change object Change *Change `protobuf:"bytes,5,opt,name=change,proto3" json:"change,omitempty"` // 'status' is the lifecycle status of the change Status change.Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status"` // 'created' is the time at which the change was created Created time.Time `protobuf:"bytes,7,opt,name=created,proto3,stdtime" json:"created"` // 'updated' is the time at which the change was last updated Updated time.Time `protobuf:"bytes,8,opt,name=updated,proto3,stdtime" json:"updated"` }
DeviceChange is a stored configuration change for a single device
func (*DeviceChange) Descriptor ¶
func (*DeviceChange) Descriptor() ([]byte, []int)
func (*DeviceChange) GetChange ¶
func (m *DeviceChange) GetChange() *Change
func (*DeviceChange) GetCreated ¶
func (m *DeviceChange) GetCreated() time.Time
func (*DeviceChange) GetID ¶
func (m *DeviceChange) GetID() ID
func (*DeviceChange) GetIndex ¶
func (m *DeviceChange) GetIndex() Index
func (*DeviceChange) GetNetworkChange ¶
func (m *DeviceChange) GetNetworkChange() NetworkChangeRef
func (*DeviceChange) GetRevision ¶
func (m *DeviceChange) GetRevision() Revision
func (*DeviceChange) GetStatus ¶
func (m *DeviceChange) GetStatus() change.Status
func (*DeviceChange) GetUpdated ¶
func (m *DeviceChange) GetUpdated() time.Time
func (*DeviceChange) Marshal ¶
func (m *DeviceChange) Marshal() (dAtA []byte, err error)
func (*DeviceChange) MarshalToSizedBuffer ¶
func (m *DeviceChange) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DeviceChange) ProtoMessage ¶
func (*DeviceChange) ProtoMessage()
func (*DeviceChange) Reset ¶
func (m *DeviceChange) Reset()
func (*DeviceChange) Size ¶
func (m *DeviceChange) Size() (n int)
func (*DeviceChange) String ¶
func (m *DeviceChange) String() string
func (*DeviceChange) Unmarshal ¶
func (m *DeviceChange) Unmarshal(dAtA []byte) error
func (*DeviceChange) XXX_DiscardUnknown ¶
func (m *DeviceChange) XXX_DiscardUnknown()
func (*DeviceChange) XXX_Marshal ¶
func (m *DeviceChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeviceChange) XXX_Merge ¶
func (m *DeviceChange) XXX_Merge(src proto.Message)
func (*DeviceChange) XXX_Size ¶
func (m *DeviceChange) XXX_Size() int
func (*DeviceChange) XXX_Unmarshal ¶
func (m *DeviceChange) XXX_Unmarshal(b []byte) error
type ID ¶
ID is a device change identifier type
func (ID) GetDeviceID ¶
GetDeviceID returns the Device ID to which the change is targeted
func (ID) GetDeviceVersion ¶
GetDeviceVersion returns the device version to which the change is targeted
func (ID) GetDeviceVersionedID ¶
func (i ID) GetDeviceVersionedID() device.VersionedID
GetDeviceVersionedID returns the VersionedID for the device to which the change is targeted
func (ID) GetNetworkChangeID ¶
GetNetworkChangeID returns the NetworkChange ID for the DeviceChange
type NetworkChangeRef ¶
type NetworkChangeRef struct { // 'id' is the identifier of the network change from which this change was created ID github_com_onosproject_onos_api_go_onos_config.ID `protobuf:"bytes,1,opt,name=id,proto3,casttype=github.com/onosproject/onos-api/go/onos/config.ID" json:"id,omitempty"` // 'index' is the index of the network change from which this change was created Index github_com_onosproject_onos_api_go_onos_config.Index `` /* 126-byte string literal not displayed */ }
NetworkChangeRef is a back reference to the NetworkChange that created a DeviceChange
func (*NetworkChangeRef) Descriptor ¶
func (*NetworkChangeRef) Descriptor() ([]byte, []int)
func (*NetworkChangeRef) GetID ¶
func (m *NetworkChangeRef) GetID() github_com_onosproject_onos_api_go_onos_config.ID
func (*NetworkChangeRef) GetIndex ¶
func (m *NetworkChangeRef) GetIndex() github_com_onosproject_onos_api_go_onos_config.Index
func (*NetworkChangeRef) Marshal ¶
func (m *NetworkChangeRef) Marshal() (dAtA []byte, err error)
func (*NetworkChangeRef) MarshalToSizedBuffer ¶
func (m *NetworkChangeRef) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*NetworkChangeRef) ProtoMessage ¶
func (*NetworkChangeRef) ProtoMessage()
func (*NetworkChangeRef) Reset ¶
func (m *NetworkChangeRef) Reset()
func (*NetworkChangeRef) Size ¶
func (m *NetworkChangeRef) Size() (n int)
func (*NetworkChangeRef) String ¶
func (m *NetworkChangeRef) String() string
func (*NetworkChangeRef) Unmarshal ¶
func (m *NetworkChangeRef) Unmarshal(dAtA []byte) error
func (*NetworkChangeRef) XXX_DiscardUnknown ¶
func (m *NetworkChangeRef) XXX_DiscardUnknown()
func (*NetworkChangeRef) XXX_Marshal ¶
func (m *NetworkChangeRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NetworkChangeRef) XXX_Merge ¶
func (m *NetworkChangeRef) XXX_Merge(src proto.Message)
func (*NetworkChangeRef) XXX_Size ¶
func (m *NetworkChangeRef) XXX_Size() int
func (*NetworkChangeRef) XXX_Unmarshal ¶
func (m *NetworkChangeRef) XXX_Unmarshal(b []byte) error
type PathValue ¶
type PathValue struct { // 'path' is the path to change Path string `protobuf:"bytes,1,opt,name=path,json=Path,proto3" json:"Path,omitempty"` // 'value' is the change value Value *TypedValue `protobuf:"bytes,2,opt,name=value,json=Value,proto3" json:"Value,omitempty"` }
PathValue is an individual Path/Value combination - it is like ChangeValue above without the removed flag - it is not used in the DeviceChange store Instead it is useful for handling OpState and Snapshots where `removed` is not relevant
func (*PathValue) Descriptor ¶
func (*PathValue) GetValue ¶
func (m *PathValue) GetValue() *TypedValue
func (*PathValue) MarshalToSizedBuffer ¶
func (*PathValue) ProtoMessage ¶
func (*PathValue) ProtoMessage()
func (*PathValue) XXX_DiscardUnknown ¶
func (m *PathValue) XXX_DiscardUnknown()
func (*PathValue) XXX_Marshal ¶
func (*PathValue) XXX_Unmarshal ¶
type TypedBytes ¶
type TypedBytes TypedValue
TypedBytes for a float value
func (*TypedBytes) ByteArray ¶
func (tv *TypedBytes) ByteArray() []byte
ByteArray extracts the bytes value
func (*TypedBytes) String ¶
func (tv *TypedBytes) String() string
func (*TypedBytes) ValueType ¶
func (tv *TypedBytes) ValueType() ValueType
ValueType gives the value type
type TypedDecimal ¶ added in v0.7.2
type TypedDecimal TypedValue
TypedDecimal for a decimal64 value
func (*TypedDecimal) Decimal64 ¶ added in v0.7.2
func (tv *TypedDecimal) Decimal64() (int64, uint8)
Decimal64 extracts the unsigned decimal value
func (*TypedDecimal) Float ¶ added in v0.7.2
func (tv *TypedDecimal) Float() float64
Float extracts the unsigned decimal value as a float
func (*TypedDecimal) String ¶ added in v0.7.2
func (tv *TypedDecimal) String() string
func (*TypedDecimal) ValueType ¶ added in v0.7.2
func (tv *TypedDecimal) ValueType() ValueType
ValueType gives the value type
type TypedEmpty ¶
type TypedEmpty TypedValue
TypedEmpty for an empty value
func (*TypedEmpty) String ¶
func (tv *TypedEmpty) String() string
func (*TypedEmpty) ValueType ¶
func (tv *TypedEmpty) ValueType() ValueType
ValueType gives the value type
type TypedFloat ¶
type TypedFloat TypedValue
TypedFloat for a float value
func (*TypedFloat) Float32 ¶
func (tv *TypedFloat) Float32() float32
Float32 extracts the float value
func (*TypedFloat) String ¶
func (tv *TypedFloat) String() string
func (*TypedFloat) ValueType ¶
func (tv *TypedFloat) ValueType() ValueType
ValueType gives the value type
type TypedLeafListBool ¶
type TypedLeafListBool TypedValue
TypedLeafListBool for an bool leaf list
func (*TypedLeafListBool) List ¶
func (tv *TypedLeafListBool) List() []bool
List extracts the leaf list values
func (*TypedLeafListBool) String ¶
func (tv *TypedLeafListBool) String() string
func (*TypedLeafListBool) ValueType ¶
func (tv *TypedLeafListBool) ValueType() ValueType
ValueType gives the value type
type TypedLeafListBytes ¶
type TypedLeafListBytes TypedValue
TypedLeafListBytes for an bool leaf list
func (*TypedLeafListBytes) List ¶
func (tv *TypedLeafListBytes) List() [][]byte
List extracts the leaf list values
func (*TypedLeafListBytes) String ¶
func (tv *TypedLeafListBytes) String() string
func (*TypedLeafListBytes) ValueType ¶
func (tv *TypedLeafListBytes) ValueType() ValueType
ValueType gives the value type
type TypedLeafListDecimal ¶
type TypedLeafListDecimal TypedValue
TypedLeafListDecimal for a decimal leaf list
func (*TypedLeafListDecimal) List ¶
func (tv *TypedLeafListDecimal) List() ([]int64, uint8)
List extracts the leaf list values
func (*TypedLeafListDecimal) ListFloat ¶
func (tv *TypedLeafListDecimal) ListFloat() []float64
ListFloat extracts the leaf list values as floats
func (*TypedLeafListDecimal) String ¶
func (tv *TypedLeafListDecimal) String() string
func (*TypedLeafListDecimal) ValueType ¶
func (tv *TypedLeafListDecimal) ValueType() ValueType
ValueType gives the value type
type TypedLeafListFloat ¶
type TypedLeafListFloat TypedValue
TypedLeafListFloat for a decimal leaf list
func (*TypedLeafListFloat) List ¶
func (tv *TypedLeafListFloat) List() []float32
List extracts the leaf list values
func (*TypedLeafListFloat) String ¶
func (tv *TypedLeafListFloat) String() string
func (*TypedLeafListFloat) ValueType ¶
func (tv *TypedLeafListFloat) ValueType() ValueType
ValueType gives the value type
type TypedLeafListInt ¶ added in v0.7.2
type TypedLeafListInt TypedValue
TypedLeafListInt for an int leaf list
func (*TypedLeafListInt) List ¶ added in v0.7.2
func (tv *TypedLeafListInt) List() ([]int64, Width)
List extracts the leaf list values
func (*TypedLeafListInt) String ¶ added in v0.7.2
func (tv *TypedLeafListInt) String() string
func (*TypedLeafListInt) ValueType ¶ added in v0.7.2
func (tv *TypedLeafListInt) ValueType() ValueType
ValueType gives the value type
type TypedLeafListString ¶
type TypedLeafListString TypedValue
TypedLeafListString for a string leaf list
func (*TypedLeafListString) List ¶
func (tv *TypedLeafListString) List() []string
List extracts the leaf list values
func (*TypedLeafListString) String ¶
func (tv *TypedLeafListString) String() string
func (*TypedLeafListString) ValueType ¶
func (tv *TypedLeafListString) ValueType() ValueType
ValueType gives the value type
type TypedLeafListUint ¶
type TypedLeafListUint TypedValue
TypedLeafListUint for an uint leaf list
func (*TypedLeafListUint) List ¶
func (tv *TypedLeafListUint) List() ([]uint64, Width)
List extracts the leaf list values
func (*TypedLeafListUint) String ¶
func (tv *TypedLeafListUint) String() string
func (*TypedLeafListUint) ValueType ¶
func (tv *TypedLeafListUint) ValueType() ValueType
ValueType gives the value type
type TypedString ¶
type TypedString TypedValue
TypedString for a string value
func (*TypedString) String ¶
func (tv *TypedString) String() string
func (*TypedString) ValueType ¶
func (tv *TypedString) ValueType() ValueType
ValueType gives the value type
type TypedUint ¶ added in v0.7.2
type TypedUint TypedValue
TypedUint for a uint value
type TypedValue ¶
type TypedValue struct { // 'bytes' is the bytes array Bytes []byte `protobuf:"bytes,1,opt,name=bytes,json=Bytes,proto3" json:"Bytes,omitempty"` // 'type' is the value type Type ValueType `protobuf:"varint,2,opt,name=type,json=Type,proto3,enum=onos.config.change.device.ValueType" json:"Type,omitempty"` // 'type_opts' is a set of type options TypeOpts []int32 `protobuf:"varint,3,rep,packed,name=type_opts,json=TypeOpts,proto3" json:"TypeOpts,omitempty"` }
TypedValue is a value represented as a byte array
func NewLeafListBoolTv ¶
func NewLeafListBoolTv(values []bool) *TypedValue
NewLeafListBoolTv decodes bool values in to an object
func NewLeafListBytesTv ¶
func NewLeafListBytesTv(values [][]byte) *TypedValue
NewLeafListBytesTv decodes byte values in to a Leaf list
func NewLeafListDecimalTv ¶ added in v0.7.2
func NewLeafListDecimalTv(digits []int64, precision uint8) *TypedValue
NewLeafListDecimalTv decodes decimal values in to a Leaf list
func NewLeafListFloatTv ¶ added in v0.7.2
func NewLeafListFloatTv(values []float32) *TypedValue
NewLeafListFloatTv decodes float values in to a Leaf list
func NewLeafListIntTv ¶ added in v0.7.2
func NewLeafListIntTv(values []int64, width Width) *TypedValue
NewLeafListIntTv decodes int values in to an object
func NewLeafListStringTv ¶
func NewLeafListStringTv(values []string) *TypedValue
NewLeafListStringTv decodes string values in to an object
func NewLeafListUintTv ¶ added in v0.7.2
func NewLeafListUintTv(values []uint64, width Width) *TypedValue
NewLeafListUintTv decodes uint values in to a Leaf list
func NewTypedValue ¶
func NewTypedValue(bytes []byte, valueType ValueType, typeOpts []uint8) (*TypedValue, error)
NewTypedValue creates a TypeValue from a byte[] and type - used in changes.go For Int and Uint both the width and sign must be given in type opts e.g. [32, 1]
func NewTypedValueBool ¶
func NewTypedValueBool(value bool) *TypedValue
NewTypedValueBool decodes a bool value in to an object
func NewTypedValueBytes ¶
func NewTypedValueBytes(value []byte) *TypedValue
NewTypedValueBytes decodes an array of bytes in to an object
func NewTypedValueDecimal ¶ added in v0.7.2
func NewTypedValueDecimal(digits int64, precision uint8) *TypedValue
NewTypedValueDecimal decodes a decimal value in to an object
func NewTypedValueEmpty ¶
func NewTypedValueEmpty() *TypedValue
NewTypedValueEmpty decodes an empty object
func NewTypedValueFloat ¶
func NewTypedValueFloat(value float64) *TypedValue
NewTypedValueFloat decodes a decimal value in to an object
func NewTypedValueInt ¶ added in v0.7.2
func NewTypedValueInt(value int, width Width) *TypedValue
NewTypedValueInt decodes an int value in to an object
func NewTypedValueString ¶
func NewTypedValueString(value string) *TypedValue
NewTypedValueString decodes string value in to an object
func NewTypedValueUint ¶ added in v0.7.2
func NewTypedValueUint(value uint, width Width) *TypedValue
NewTypedValueUint decodes a uint value in to an object
func (*TypedValue) Descriptor ¶
func (*TypedValue) Descriptor() ([]byte, []int)
func (*TypedValue) GetBytes ¶
func (m *TypedValue) GetBytes() []byte
func (*TypedValue) GetType ¶
func (m *TypedValue) GetType() ValueType
func (*TypedValue) GetTypeOpts ¶
func (m *TypedValue) GetTypeOpts() []int32
func (*TypedValue) Marshal ¶
func (m *TypedValue) Marshal() (dAtA []byte, err error)
func (*TypedValue) MarshalToSizedBuffer ¶
func (m *TypedValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TypedValue) ProtoMessage ¶
func (*TypedValue) ProtoMessage()
func (*TypedValue) Reset ¶
func (m *TypedValue) Reset()
func (*TypedValue) Size ¶
func (m *TypedValue) Size() (n int)
func (*TypedValue) String ¶
func (m *TypedValue) String() string
func (*TypedValue) Unmarshal ¶
func (m *TypedValue) Unmarshal(dAtA []byte) error
func (*TypedValue) ValueToString ¶
func (tv *TypedValue) ValueToString() string
ValueToString is the String calculated as a Native type There is already a String() in the protobuf generated code that can't be overridden
func (*TypedValue) XXX_DiscardUnknown ¶
func (m *TypedValue) XXX_DiscardUnknown()
func (*TypedValue) XXX_Marshal ¶
func (m *TypedValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TypedValue) XXX_Merge ¶
func (m *TypedValue) XXX_Merge(src proto.Message)
func (*TypedValue) XXX_Size ¶
func (m *TypedValue) XXX_Size() int
func (*TypedValue) XXX_Unmarshal ¶
func (m *TypedValue) XXX_Unmarshal(b []byte) error
type TypedValueMap ¶
type TypedValueMap map[string]*TypedValue
TypedValueMap is an alias for a map of paths and values
type ValueType ¶
type ValueType int32
ValueType is the type for a value
const ( ValueType_EMPTY ValueType = 0 ValueType_STRING ValueType = 1 ValueType_INT ValueType = 2 ValueType_UINT ValueType = 3 ValueType_BOOL ValueType = 4 ValueType_DECIMAL ValueType = 5 ValueType_FLOAT ValueType = 6 ValueType_BYTES ValueType = 7 ValueType_LEAFLIST_STRING ValueType = 8 ValueType_LEAFLIST_INT ValueType = 9 ValueType_LEAFLIST_UINT ValueType = 10 ValueType_LEAFLIST_BOOL ValueType = 11 ValueType_LEAFLIST_DECIMAL ValueType = 12 ValueType_LEAFLIST_FLOAT ValueType = 13 ValueType_LEAFLIST_BYTES ValueType = 14 )