Documentation
¶
Index ¶
Constants ¶
View Source
const (
// FormatVersion is the current version of the ASB encoding format
FormatVersion = "3.1"
)
misc constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder[T models.TokenConstraint] struct { // contains filtered or unexported fields }
Decoder contains logic for decoding backup data from the .asb format.
func NewDecoder ¶
NewDecoder creates a new Decoder.
type Encoder ¶
type Encoder[T models.TokenConstraint] struct { // contains filtered or unexported fields }
Encoder contains logic for encoding backup data into the .asb format. This is a stateful object that must be created for every backup operation.
func NewEncoder ¶
func NewEncoder[T models.TokenConstraint](namespace string, compact bool) *Encoder[T]
NewEncoder creates a new Encoder.
func (*Encoder[T]) EncodeToken ¶
EncodeToken encodes a token to the ASB format. It returns a byte slice of the encoded token and an error if the encoding fails.
func (*Encoder[T]) GenerateFilename ¶
GenerateFilename generates a file name for the given namespace.
type Validator ¶
type Validator struct { }
Validator represents backup files validator.
func NewValidator ¶
func NewValidator() *Validator
NewValidator returns new validator instance for files validation.
Click to show internal directories.
Click to hide internal directories.