filestore

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EQ = "eq"
	NE = "ne"
)
View Source
const (
	GT = "gt"
	GE = "ge"
	IT = "it"
	LE = "le"
	IN = "in"
)
View Source
const (
	CN = "cn"
	NC = "nc"
	HP = "hp"
	HS = "hs"
)
View Source
const (
	ASC  = "asc"
	DESC = "desc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileMirror added in v1.2.1

type FileMirror struct {
	PreRootCid    boson.Address
	NextRootCid   boson.Address
	RootCid       boson.Address
	Operation     Operation
	Hash          string
	Pinned        bool
	Registered    bool
	Size          int
	Type          string
	Name          string
	Extension     string
	Default       string
	ErrDefault    string
	MimeType      string
	ReferenceLink string
}

type FileView

type FileView struct {
	RootCid       boson.Address
	Hash          string
	Pinned        bool
	Registered    bool
	Size          int
	Type          string
	Name          string
	Extension     string
	Default       string
	ErrDefault    string
	MimeType      string
	ReferenceLink string
}

type Filter

type Filter struct {
	Key   string
	Term  string
	Value string
}

type Interface

type Interface interface {
	Init() error
	Get(reference boson.Address) (FileView, bool)
	GetMirror(reference boson.Address) (*FileMirror, error)
	GetList(page Page, filter []Filter, sort Sort) ([]FileView, int)
	GetMirrors(reference boson.Address) (fms []*FileMirror, err error)
	Put(file FileView) error
	PutMirror(pre, next boson.Address, ope Operation, file FileView) error
	Delete(reference boson.Address) error
	DeleteMirror(reference boson.Address) error
	Has(reference boson.Address) bool
	Update(file FileView) error
}

func New

func New(storer storage.StateStorer) Interface

type Operation added in v1.2.1

type Operation int
const (
	REMOVE Operation = iota
	MOVE
	COPY
	MKDIR
)

func (Operation) String added in v1.2.1

func (o Operation) String() string

type Page

type Page struct {
	PageNum  int
	PageSize int
}

type Sort

type Sort struct {
	Key   string
	Order string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL