Documentation ¶
Overview ¶
Package device is a generated GoMock package.
Index ¶
- 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 TypedDecimal64
- type TypedEmpty
- type TypedFloat
- type TypedInt64
- type TypedLeafListBool
- type TypedLeafListBytes
- type TypedLeafListDecimal
- type TypedLeafListFloat
- type TypedLeafListInt64
- type TypedLeafListString
- type TypedLeafListUint
- type TypedString
- type TypedUint64
- type TypedValue
- func NewLeafListBoolTv(values []bool) *TypedValue
- func NewLeafListBytesTv(values [][]byte) *TypedValue
- func NewLeafListDecimal64Tv(digits []int64, precision uint32) *TypedValue
- func NewLeafListFloat32Tv(values []float32) *TypedValue
- func NewLeafListInt64Tv(values []int) *TypedValue
- func NewLeafListStringTv(values []string) *TypedValue
- func NewLeafListUint64Tv(values []uint) *TypedValue
- func NewTypedValue(bytes []byte, valueType ValueType, typeOpts []int32) (*TypedValue, error)
- func NewTypedValueBool(value bool) *TypedValue
- func NewTypedValueBytes(value []byte) *TypedValue
- func NewTypedValueDecimal64(digits int64, precision uint32) *TypedValue
- func NewTypedValueEmpty() *TypedValue
- func NewTypedValueFloat(value float32) *TypedValue
- func NewTypedValueInt64(value int) *TypedValue
- func NewTypedValueString(value string) *TypedValue
- func NewTypedValueUint64(value uint) *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
Constants ¶
This section is empty.
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 NewBytes ¶
func NewBytes(value []byte) *TypedBytes
NewBytes decodes an array of bytes in to a Bytes type
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 TypedDecimal64 ¶
type TypedDecimal64 TypedValue
TypedDecimal64 for a decimal64 value
func NewDecimal64 ¶
func NewDecimal64(digits int64, precision uint32) *TypedDecimal64
NewDecimal64 decodes a decimal value in to a Decimal type
func (*TypedDecimal64) Decimal64 ¶
func (tv *TypedDecimal64) Decimal64() (int64, uint32)
Decimal64 extracts the unsigned decimal value
func (*TypedDecimal64) Float ¶
func (tv *TypedDecimal64) Float() float64
Float extracts the unsigned decimal value as a float
func (*TypedDecimal64) String ¶
func (tv *TypedDecimal64) String() string
func (*TypedDecimal64) ValueType ¶
func (tv *TypedDecimal64) 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 NewFloat ¶
func NewFloat(value float32) *TypedFloat
NewFloat decodes a decimal value in to a Bool type
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 TypedInt64 ¶
type TypedInt64 TypedValue
TypedInt64 for an int value
func NewInt64 ¶
func NewInt64(value int) *TypedInt64
NewInt64 decodes an int value in to an Int type
func (*TypedInt64) String ¶
func (tv *TypedInt64) String() string
func (*TypedInt64) ValueType ¶
func (tv *TypedInt64) ValueType() ValueType
ValueType gives the value type
type TypedLeafListBool ¶
type TypedLeafListBool TypedValue
TypedLeafListBool for an bool leaf list
func NewLeafListBool ¶
func NewLeafListBool(values []bool) *TypedLeafListBool
NewLeafListBool decodes bool values in to a Leaf list type
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 NewLeafListBytes ¶
func NewLeafListBytes(values [][]byte) *TypedLeafListBytes
NewLeafListBytes decodes byte values in to a Leaf list type
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 NewLeafListDecimal64 ¶
func NewLeafListDecimal64(digits []int64, precision uint32) *TypedLeafListDecimal
NewLeafListDecimal64 decodes decimal values in to a Leaf list type
func (*TypedLeafListDecimal) List ¶
func (tv *TypedLeafListDecimal) List() ([]int64, uint32)
List extracts the leaf list values
func (*TypedLeafListDecimal) ListFloat ¶
func (tv *TypedLeafListDecimal) ListFloat() []float32
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 NewLeafListFloat32 ¶
func NewLeafListFloat32(values []float32) *TypedLeafListFloat
NewLeafListFloat32 decodes float values in to a Leaf list type
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 TypedLeafListInt64 ¶
type TypedLeafListInt64 TypedValue
TypedLeafListInt64 for an int leaf list
func NewLeafListInt64 ¶
func NewLeafListInt64(values []int) *TypedLeafListInt64
NewLeafListInt64 decodes int values in to a Leaf list type
func (*TypedLeafListInt64) List ¶
func (tv *TypedLeafListInt64) List() []int
List extracts the leaf list values
func (*TypedLeafListInt64) String ¶
func (tv *TypedLeafListInt64) String() string
func (*TypedLeafListInt64) ValueType ¶
func (tv *TypedLeafListInt64) ValueType() ValueType
ValueType gives the value type
type TypedLeafListString ¶
type TypedLeafListString TypedValue
TypedLeafListString for a string leaf list
func NewLeafListString ¶
func NewLeafListString(values []string) *TypedLeafListString
NewLeafListString decodes string values in to an Leaf list type
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 NewLeafListUint64 ¶
func NewLeafListUint64(values []uint) *TypedLeafListUint
NewLeafListUint64 decodes uint values in to a Leaf list type
func (*TypedLeafListUint) List ¶
func (tv *TypedLeafListUint) List() []uint
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 NewString ¶
func NewString(value string) *TypedString
NewString decodes string value in to a String type
func (*TypedString) String ¶
func (tv *TypedString) String() string
func (*TypedString) ValueType ¶
func (tv *TypedString) ValueType() ValueType
ValueType gives the value type
type TypedUint64 ¶
type TypedUint64 TypedValue
TypedUint64 for a uint value
func NewUint64 ¶
func NewUint64(value uint) *TypedUint64
NewUint64 decodes a uint value in to a Uint type
func (*TypedUint64) String ¶
func (tv *TypedUint64) String() string
func (*TypedUint64) Uint ¶
func (tv *TypedUint64) Uint() uint
Uint extracts the unsigned integer value
func (*TypedUint64) ValueType ¶
func (tv *TypedUint64) ValueType() ValueType
ValueType gives the value type
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 NewLeafListDecimal64Tv ¶
func NewLeafListDecimal64Tv(digits []int64, precision uint32) *TypedValue
NewLeafListDecimal64Tv decodes decimal values in to a Leaf list
func NewLeafListFloat32Tv ¶
func NewLeafListFloat32Tv(values []float32) *TypedValue
NewLeafListFloat32Tv decodes float values in to a Leaf list
func NewLeafListInt64Tv ¶
func NewLeafListInt64Tv(values []int) *TypedValue
NewLeafListInt64Tv decodes int values in to an object
func NewLeafListStringTv ¶
func NewLeafListStringTv(values []string) *TypedValue
NewLeafListStringTv decodes string values in to an object
func NewLeafListUint64Tv ¶
func NewLeafListUint64Tv(values []uint) *TypedValue
NewLeafListUint64Tv decodes uint values in to a Leaf list
func NewTypedValue ¶
func NewTypedValue(bytes []byte, valueType ValueType, typeOpts []int32) (*TypedValue, error)
NewTypedValue creates a TypeValue from a byte[] and type - used in changes.go
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 NewTypedValueDecimal64 ¶
func NewTypedValueDecimal64(digits int64, precision uint32) *TypedValue
NewTypedValueDecimal64 decodes a decimal value in to an object
func NewTypedValueEmpty ¶
func NewTypedValueEmpty() *TypedValue
NewTypedValueEmpty decodes an empty object
func NewTypedValueFloat ¶
func NewTypedValueFloat(value float32) *TypedValue
NewTypedValueFloat decodes a decimal value in to an object
func NewTypedValueInt64 ¶
func NewTypedValueInt64(value int) *TypedValue
NewTypedValueInt64 decodes an int value in to an object
func NewTypedValueString ¶
func NewTypedValueString(value string) *TypedValue
NewTypedValueString decodes string value in to an object
func NewTypedValueUint64 ¶
func NewTypedValueUint64(value uint) *TypedValue
NewTypedValueUint64 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 )