Documentation ¶
Overview ¶
Package data contains OTA service common data object and their methods
Index ¶
- Variables
- func ByteDigest(content []byte) string
- func Digest(content string) string
- func NewMultiTargetUpdateURN(id CorrelationID) string
- func NewNamespaceURN(id CorrelationID) string
- func NewURN(urntype string, id CorrelationID) string
- func ToBase64(val string) ([]byte, error)
- func ValidBase64(val string) bool
- func ValidHex(length int, str string) bool
- type CorrelationID
Constants ¶
This section is empty.
Variables ¶
View Source
var CorrelationIDNil = CorrelationID(uuid.Nil)
CorrelationIDNil is a nil value of CorrelationID
Functions ¶
func ByteDigest ¶ added in v1.0.2
ByteDigest creates sha256 hash of content
func NewMultiTargetUpdateURN ¶
func NewMultiTargetUpdateURN(id CorrelationID) string
NewMultiTargetUpdateURN creates CorrelationID URN
func NewNamespaceURN ¶
func NewNamespaceURN(id CorrelationID) string
NewNamespaceURN creates Namespace URN
func ValidBase64 ¶ added in v1.0.14
ValidBase64 verifies if str is valid base64
Types ¶
type CorrelationID ¶
CorrelationID wrapper on the top of github.com/google/uuid
func CorrelationIDFromString ¶ added in v1.0.10
func CorrelationIDFromString(s string) (CorrelationID, error)
CorrelationIDFromString creates a new CorrelationID from a string
func NewChildCorrelationID ¶ added in v1.0.7
func NewChildCorrelationID(parent CorrelationID, id string) CorrelationID
NewChildCorrelationID create a new CorrelationID within a parent namespace
func NewCorrelationID ¶
func NewCorrelationID() CorrelationID
NewCorrelationID creates a new CorrelationID
func (*CorrelationID) IsNil ¶ added in v1.0.8
func (c *CorrelationID) IsNil() bool
IsNil returns true if the CorrelationID is nil
func (CorrelationID) String ¶
func (c CorrelationID) String() string
Click to show internal directories.
Click to hide internal directories.