2026-04-06 15:48:37 +05:30
|
|
|
// Copyright IBM Corp. 2020, 2026
|
2023-03-15 14:35:09 +00:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
|
|
|
|
|
|
package bsr
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"errors"
|
|
|
|
|
)
|
|
|
|
|
|
2023-04-24 21:23:50 +00:00
|
|
|
var (
|
|
|
|
|
// ErrUnknown represents an unknown error
|
|
|
|
|
ErrUnknown = errors.New("unknown error")
|
2023-03-15 14:35:09 +00:00
|
|
|
|
2023-04-24 21:23:50 +00:00
|
|
|
// ErrInvalidParameter represents an invalid parameter error
|
|
|
|
|
ErrInvalidParameter = errors.New("invalid parameter")
|
2023-03-15 14:35:09 +00:00
|
|
|
|
2023-04-24 21:23:50 +00:00
|
|
|
// ErrBsrKeyPersistenceFailure indicates a failure in persisting BSR encryption keys
|
|
|
|
|
ErrBsrKeyPersistenceFailure = errors.New("could not persist BSR keys")
|
2023-04-17 10:37:17 -04:00
|
|
|
|
2023-04-24 21:23:50 +00:00
|
|
|
// ErrSummaryUnavailable indicates a BSR summary is unavailable
|
|
|
|
|
ErrSummaryUnavailable = errors.New("summary not available")
|
2023-05-11 15:40:46 -04:00
|
|
|
|
2023-05-08 15:49:21 -04:00
|
|
|
// ErrSignatureVerification indicates a failure in verifying a signature
|
|
|
|
|
ErrSignatureVerification = errors.New("could not verify signature")
|
|
|
|
|
|
2023-04-24 21:23:50 +00:00
|
|
|
// ErrNotSupported represents an operation that is not supported for a
|
|
|
|
|
// particular protocol.
|
|
|
|
|
ErrNotSupported = errors.New("not supported by protocol")
|
|
|
|
|
|
2023-07-13 10:25:01 -04:00
|
|
|
// ErrAlreadyRegistered is an error with registering functions.
|
|
|
|
|
ErrAlreadyRegistered = errors.New("type already registered")
|
2023-04-24 21:23:50 +00:00
|
|
|
|
|
|
|
|
// ErrEndChunkNotEmpty indicates a malformed END chunk.
|
|
|
|
|
ErrEndChunkNotEmpty = errors.New("end chunk not empty")
|
|
|
|
|
|
|
|
|
|
// ErrChunkDecode indicates an error when decoding a chunk.
|
|
|
|
|
ErrChunkDecode = errors.New("error decoding chunk")
|
2023-05-01 12:56:15 +00:00
|
|
|
|
|
|
|
|
// ErrInvalidMagic is used when a binary bsr file is missing the magic string.
|
|
|
|
|
ErrInvalidMagic = errors.New("invalid magic string")
|
|
|
|
|
|
|
|
|
|
// ErrChecksum indicates that a checksum did not match.
|
|
|
|
|
ErrChecksum = errors.New("computed checksum did NOT match")
|
2023-07-25 11:58:15 -04:00
|
|
|
|
|
|
|
|
// ErrTimestampDecode indicates an error decoding a timestamp
|
|
|
|
|
ErrTimestampDecode = errors.New("error decoding timestamp")
|
2023-04-24 21:23:50 +00:00
|
|
|
)
|