58 lines
3.0 KiB
Go
58 lines
3.0 KiB
Go
// Package constants define constant variable
|
|
package constants
|
|
|
|
import "errors"
|
|
|
|
var (
|
|
// ErrUUIDFromCheckT1 define error of check uuid from value failed in uuid from change type
|
|
ErrUUIDFromCheckT1 = errors.New("in uuid from change type, value of new uuid_from is equal value of old uuid_from")
|
|
// ErrUUIDToCheckT1 define error of check uuid to value failed in uuid from change type
|
|
ErrUUIDToCheckT1 = errors.New("in uuid from change type, value of new uuid_to is not equal value of old uuid_to")
|
|
|
|
// ErrUUIDFromCheckT2 define error of check uuid from value failed in uuid to change type
|
|
ErrUUIDFromCheckT2 = errors.New("in uuid to change type, value of new uuid_from is not equal value of old uuid_from")
|
|
// ErrUUIDToCheckT2 define error of check uuid to value failed in uuid to change type
|
|
ErrUUIDToCheckT2 = errors.New("in uuid to change type, value of new uuid_to is equal value of old uuid_to")
|
|
|
|
// ErrUUIDFromCheckT3 define error of check uuid from value failed in uuid add change type
|
|
ErrUUIDFromCheckT3 = errors.New("in uuid add change type, value of old uuid_from is not empty")
|
|
// ErrUUIDToCheckT3 define error of check uuid to value failed in uuid add change type
|
|
ErrUUIDToCheckT3 = errors.New("in uuid add change type, value of old uuid_to is not empty")
|
|
)
|
|
|
|
var (
|
|
// ErrInvalidAddressType define error of invalid io address type
|
|
ErrInvalidAddressType = errors.New("invalid address type")
|
|
// ErrUnknownDataType define error of unknown measurement data source type
|
|
ErrUnknownDataType = errors.New("unknown data type")
|
|
// ErrExceedsLimitType define error of channel number exceeds limit for telemetry
|
|
ErrExceedsLimitType = errors.New("channel number exceeds limit for Telemetry")
|
|
// ErrUnsupportedChannelPrefixType define error of unsupported channel prefix
|
|
ErrUnsupportedChannelPrefixType = errors.New("unsupported channel prefix")
|
|
)
|
|
|
|
var (
|
|
// ErrFormatUUID define error of format uuid string to uuid.UUID type failed
|
|
ErrFormatUUID = errors.New("format string type to uuid.UUID type failed")
|
|
// ErrFormatCache define error of format cache with any type to cacheItem type failed
|
|
ErrFormatCache = errors.New("format any teype to cache item type failed")
|
|
)
|
|
|
|
// ErrGetClientToken define error of can not get client_token from context
|
|
var ErrGetClientToken = errors.New("can not get client_token from context")
|
|
|
|
// ErrQueryComponentByUUID define error of query component from db by uuid failed
|
|
var ErrQueryComponentByUUID = errors.New("query component from db failed by uuid")
|
|
|
|
// ErrChanIsNil define error of channel is nil
|
|
var ErrChanIsNil = errors.New("this channel is nil")
|
|
|
|
// ErrConcurrentModify define error of concurrent modification detected
|
|
var ErrConcurrentModify = errors.New("existed concurrent modification risk")
|
|
|
|
// ErrUnsupportedSubAction define error of unsupported real time data subscription action
|
|
var ErrUnsupportedSubAction = errors.New("unsupported real time data subscription action")
|
|
|
|
// ErrUnsupportedLinkAction define error of unsupported measurement link process action
|
|
var ErrUnsupportedLinkAction = errors.New("unsupported rmeasurement link process action")
|