Files
threshold/internal/bsr/errors.go
T
Timothy Messier fe870fc989 feat(bsr): Add ChunkDecoder
A ChunkDecoder can be used to BSR Chunks. Each call to Decode will read
the next chunk from the decoder's io.Reader. It handles decompressing
any compressed chunk data, and verifying the CRCs of each chunk.
2023-05-31 12:18:20 +00:00

36 lines
1.1 KiB
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package bsr
import (
"errors"
)
var (
// ErrUnknown represents an unknown error
ErrUnknown = errors.New("unknown error")
// ErrInvalidParameter represents an invalid parameter error
ErrInvalidParameter = errors.New("invalid parameter")
// ErrBsrKeyPersistenceFailure indicates a failure in persisting BSR encryption keys
ErrBsrKeyPersistenceFailure = errors.New("could not persist BSR keys")
// ErrSummaryUnavailable indicates a BSR summary is unavailable
ErrSummaryUnavailable = errors.New("summary not available")
// ErrNotSupported represents an operation that is not supported for a
// particular protocol.
ErrNotSupported = errors.New("not supported by protocol")
// ErrAlreadyRegistered is an error with registering chunk decoder functions.
ErrAlreadyRegistered = errors.New("chunk type already registered")
// 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")
)