Update vendor/

This commit is contained in:
Ettore Di Giacinto
2019-10-29 17:37:49 +01:00
committed by Ettore Di Giacinto
parent 8ca6051a04
commit 9d0dc601b7
374 changed files with 103281 additions and 37 deletions

1
vendor/github.com/asdine/storm/codec/.gitignore generated vendored Normal file
View File

@@ -0,0 +1 @@
*.db

11
vendor/github.com/asdine/storm/codec/codec.go generated vendored Normal file
View File

@@ -0,0 +1,11 @@
// Package codec contains sub-packages with different codecs that can be used
// to encode and decode entities in Storm.
package codec
// MarshalUnmarshaler represents a codec used to marshal and unmarshal entities.
type MarshalUnmarshaler interface {
Marshal(v interface{}) ([]byte, error)
Unmarshal(b []byte, v interface{}) error
// name of this codec
Name() string
}

25
vendor/github.com/asdine/storm/codec/json/json.go generated vendored Normal file
View File

@@ -0,0 +1,25 @@
// Package json contains a codec to encode and decode entities in JSON format
package json
import (
"encoding/json"
)
const name = "json"
// Codec that encodes to and decodes from JSON.
var Codec = new(jsonCodec)
type jsonCodec int
func (j jsonCodec) Marshal(v interface{}) ([]byte, error) {
return json.Marshal(v)
}
func (j jsonCodec) Unmarshal(b []byte, v interface{}) error {
return json.Unmarshal(b, v)
}
func (j jsonCodec) Name() string {
return name
}