forked from TrueCloudLab/frostfs-api-go
initial
This commit is contained in:
commit
1cf33e5ffd
87 changed files with 29835 additions and 0 deletions
7
internal/error.go
Normal file
7
internal/error.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package internal
|
||||
|
||||
// Error is a custom error.
|
||||
type Error string
|
||||
|
||||
// Error is an implementation of error interface.
|
||||
func (e Error) Error() string { return string(e) }
|
16
internal/proto.go
Normal file
16
internal/proto.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package internal
|
||||
|
||||
import "github.com/gogo/protobuf/proto"
|
||||
|
||||
// Custom contains methods to satisfy proto.Message
|
||||
// including custom methods to satisfy protobuf for
|
||||
// non-proto defined types.
|
||||
type Custom interface {
|
||||
Size() int
|
||||
Empty() bool
|
||||
Bytes() []byte
|
||||
Marshal() ([]byte, error)
|
||||
MarshalTo(data []byte) (int, error)
|
||||
Unmarshal(data []byte) error
|
||||
proto.Message
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue