encoding package
This commit is contained in:
parent
8b8447213f
commit
ef80892aa5
5 changed files with 93 additions and 1 deletions
17
model/encoding.go
Normal file
17
model/encoding.go
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue