Documentation ¶
Overview ¶
Package storage contains FileStorage interface and its mock.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
ErrNotFound means that file is not found.
Functions ¶
This section is empty.
Types ¶
type FileStorage ¶ added in v1.2.0
type FileStorage interface { health.Pinger List(ctx context.Context, prefix string, from uint64, limit uint16) ([]string, error) Read(ctx context.Context, path string) (io.ReadCloser, error) Write(ctx context.Context, data io.Reader, size int64, path string) error DeleteData(ctx context.Context, address string) error }
FileStorage is interface which provides access to user's data.
type IndexStorage ¶ added in v1.2.0
type IndexStorage interface { InTx(ctx context.Context, f func(s IndexStorage) error) error SetHeight(ctx context.Context, height uint64) error GetHeight(ctx context.Context) (uint64, error) GetProfile(ctx context.Context, addr string) (*Profile, error) GetProfiles(ctx context.Context, addr []string) ([]*Profile, error) SetProfile(ctx context.Context, p *SetProfileParams) error DeleteProfile(ctx context.Context, addr string) error }
IndexStorage provides access to pdv index.
Directories ¶
Path | Synopsis |
---|---|
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
Package postgres is implementation of storage interface.
|
Package postgres is implementation of storage interface. |
Package s3 contains implementation FileStorage interface with any s3-compatible storage.
|
Package s3 contains implementation FileStorage interface with any s3-compatible storage. |
Click to show internal directories.
Click to hide internal directories.