Documentation ¶
Index ¶
- Variables
- type DataLake
- func (dl *DataLake) IsResourceStored(name string) (bool, error)
- func (dl *DataLake) IsResourceStoredAtHeight(name string, height int64) (bool, error)
- func (dl *DataLake) RetrieveResource(name string) (*Resource, error)
- func (dl *DataLake) RetrieveResourceAtHeight(name string, height int64) (*Resource, error)
- func (dl *DataLake) StoreResource(res *Resource, name string) error
- func (dl *DataLake) StoreResourceAtHeight(res *Resource, name string, height int64) error
- type Resource
- type Storage
Constants ¶
This section is empty.
Variables ¶
var ErrResourceNameRequired = errors.New("resource name is required")
ErrResourceNameRequired is returned when the resource name is an empty string
Functions ¶
This section is empty.
Types ¶
type DataLake ¶
type DataLake struct {
// contains filtered or unexported fields
}
DataLake represents raw data storage
func NewDataLake ¶
NewDataLake creates a data lake with the given storage provider
func (*DataLake) IsResourceStored ¶
IsResourceStored checks if the resource is stored
func (*DataLake) IsResourceStoredAtHeight ¶
IsResourceStoredAtHeight checks if the resource is stored at the given height
func (*DataLake) RetrieveResource ¶
RetrieveResource retrieves the resource data
func (*DataLake) RetrieveResourceAtHeight ¶
RetrieveResourceAtHeight retrieves the resource data at the given height
func (*DataLake) StoreResource ¶
StoreResource stores the resource data
type Resource ¶
type Resource struct {
Data []byte
}
Resource represents an object being stored
func NewBase64Resource ¶
NewBase64Resource creates a Base64 resource
func NewBinaryResource ¶
NewBinaryResource creates a binary resource
func NewJSONResource ¶
NewJSONResource creates a JSON resource
func (*Resource) ScanBase64 ¶
ScanBase64 parses the resource data as Base64
func (*Resource) ScanBinary ¶
ScanBinary parses the resource data as binary
type Storage ¶
type Storage interface { Store(data []byte, path ...string) error IsStored(path ...string) (bool, error) Retrieve(path ...string) ([]byte, error) }
Storage is an interface for storing and retrieving raw data
func NewFileStorage ¶
NewFileStorage creates a filesystem storage
func NewRedisStorage ¶
NewRedisStorage creates a Redis storage
func NewS3Storage ¶
NewS3Storage creates an Amazon S3 storage