forked from TrueCloudLab/frostfs-s3-gw
dbe65ae602
Mostly taken from old SDK (abe47687cd11266f946cad57f07572cc10c67226), but error handling adapted to eliminate pkg/errors and internal packages. Signed-off-by: Roman Khimov <roman@nspcc.ru>
25 lines
345 B
Go
25 lines
345 B
Go
package accessbox
|
|
|
|
import "github.com/nspcc-dev/neofs-api-go/pkg/token"
|
|
|
|
type (
|
|
Box interface {
|
|
Marshal() ([]byte, error)
|
|
Unmarshal([]byte) error
|
|
}
|
|
|
|
Encoder interface {
|
|
Encode(Box) error
|
|
}
|
|
|
|
Decoder interface {
|
|
Decode(Box) error
|
|
}
|
|
|
|
BearerTokenBox interface {
|
|
Box
|
|
|
|
Token() *token.BearerToken
|
|
SetToken(*token.BearerToken)
|
|
}
|
|
)
|