pomerium/internal/encoding/econding.go
Caleb Doxsey 1a5b8b606f
core/lint: upgrade golangci-lint, replace interface{} with any (#5099)
* core/lint: upgrade golangci-lint, replace interface{} with any

* regen proto
2024-05-02 14:33:52 -06:00

19 lines
542 B
Go

// Package encoding defines interfaces shared by other packages that
// convert data to and from byte-level and textual representations.
package encoding
// MarshalUnmarshaler can both Marshal and Unmarshal a struct into and from a set of bytes.
type MarshalUnmarshaler interface {
Marshaler
Unmarshaler
}
// Marshaler encodes a struct into a set of bytes.
type Marshaler interface {
Marshal(any) ([]byte, error)
}
// Unmarshaler decodes a set of bytes and returns a struct.
type Unmarshaler interface {
Unmarshal([]byte, any) error
}