encoding package

This commit is contained in:
Felipe M 2024-11-23 19:41:21 +01:00
parent 8b8447213f
commit ef80892aa5
Signed by: fmartingr
GPG key ID: CCFBC5637D4000A8
5 changed files with 93 additions and 1 deletions

17
model/encoding.go Normal file
View file

@ -0,0 +1,17 @@
package model
import "io"
type Decoder interface {
Decode([]byte, any) error
DecodeReader(io.Reader, any) error
}
type Encoder interface {
Encode(any) ([]byte, error)
}
type EncoderDecoder interface {
Encoder
Decoder
}