Documentation ¶
Index ¶
- Variables
- type AppParams
- type BrowsePageData
- type Config
- type ContainerResolver
- type FrostFS
- type GetObjectsResponse
- type Handler
- func (h *Handler) DownloadByAddressOrBucketName(c *fasthttp.RequestCtx)
- func (h *Handler) DownloadByAttribute(c *fasthttp.RequestCtx)
- func (h *Handler) DownloadZipped(c *fasthttp.RequestCtx)
- func (h *Handler) HeadByAddressOrBucketName(c *fasthttp.RequestCtx)
- func (h *Handler) HeadByAttribute(c *fasthttp.RequestCtx)
- func (h *Handler) Upload(c *fasthttp.RequestCtx)
- type MultipartFile
- type Object
- type PrmAuth
- type PrmContainer
- type PrmInitMultiObjectReader
- type PrmObjectCreate
- type PrmObjectGet
- type PrmObjectHead
- type PrmObjectRange
- type PrmObjectSearch
- type ResObjectSearch
- type ResponseObject
- type ResponseObjectExtended
- type TestFrostFS
- func (t *TestFrostFS) AllowUserOperation(cnrID cid.ID, userID user.ID, op acl.Op, objID oid.ID)
- func (t *TestFrostFS) Container(_ context.Context, prm PrmContainer) (*container.Container, error)
- func (t *TestFrostFS) ContainerID(name string) (*cid.ID, error)
- func (t *TestFrostFS) CreateObject(_ context.Context, prm PrmObjectCreate) (oid.ID, error)
- func (t *TestFrostFS) GetEpochDurations(context.Context) (*utils.EpochDurations, error)
- func (t *TestFrostFS) GetObject(_ context.Context, prm PrmObjectGet) (*Object, error)
- func (t *TestFrostFS) HeadObject(_ context.Context, prm PrmObjectHead) (*object.Object, error)
- func (t *TestFrostFS) InitMultiObjectReader(context.Context, PrmInitMultiObjectReader) (io.Reader, error)
- func (t *TestFrostFS) RangeObject(_ context.Context, prm PrmObjectRange) (io.ReadCloser, error)
- func (t *TestFrostFS) SearchObjects(_ context.Context, prm PrmObjectSearch) (ResObjectSearch, error)
- func (t *TestFrostFS) SetContainer(cnrID cid.ID, cnr *container.Container)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAccessDenied is returned from FrostFS in case of access violation. ErrAccessDenied = errors.New("access denied") // ErrGatewayTimeout is returned from FrostFS in case of timeout, deadline exceeded etc. ErrGatewayTimeout = errors.New("gateway timeout") )
Functions ¶
This section is empty.
Types ¶
type AppParams ¶ added in v0.30.0
type AppParams struct { Logger *zap.Logger FrostFS FrostFS Owner *user.ID Resolver ContainerResolver Cache *cache.BucketCache }
type BrowsePageData ¶ added in v0.31.0
type BrowsePageData struct { HasErrors bool Container string Prefix string Protocol string Objects []ResponseObject }
type ContainerResolver ¶ added in v0.30.0
type FrostFS ¶ added in v0.30.0
type FrostFS interface { Container(context.Context, PrmContainer) (*container.Container, error) HeadObject(context.Context, PrmObjectHead) (*object.Object, error) GetObject(context.Context, PrmObjectGet) (*Object, error) RangeObject(context.Context, PrmObjectRange) (io.ReadCloser, error) CreateObject(context.Context, PrmObjectCreate) (oid.ID, error) SearchObjects(context.Context, PrmObjectSearch) (ResObjectSearch, error) InitMultiObjectReader(ctx context.Context, p PrmInitMultiObjectReader) (io.Reader, error) utils.EpochInfoFetcher }
FrostFS represents virtual connection to FrostFS network.
type GetObjectsResponse ¶ added in v0.31.0
type GetObjectsResponse struct {
// contains filtered or unexported fields
}
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func New ¶
func New(params *AppParams, config Config, tree layer.TreeService, workerPool *ants.Pool) *Handler
func (*Handler) DownloadByAddressOrBucketName ¶
func (h *Handler) DownloadByAddressOrBucketName(c *fasthttp.RequestCtx)
DownloadByAddressOrBucketName handles download requests using simple cid/oid or bucketname/key format.
func (*Handler) DownloadByAttribute ¶
func (h *Handler) DownloadByAttribute(c *fasthttp.RequestCtx)
DownloadByAttribute handles attribute-based download requests.
func (*Handler) DownloadZipped ¶
func (h *Handler) DownloadZipped(c *fasthttp.RequestCtx)
DownloadZipped handles zip by prefix requests.
func (*Handler) HeadByAddressOrBucketName ¶
func (h *Handler) HeadByAddressOrBucketName(c *fasthttp.RequestCtx)
HeadByAddressOrBucketName handles head requests using simple cid/oid or bucketname/key format.
func (*Handler) HeadByAttribute ¶
func (h *Handler) HeadByAttribute(c *fasthttp.RequestCtx)
HeadByAttribute handles attribute-based head requests.
func (*Handler) Upload ¶
func (h *Handler) Upload(c *fasthttp.RequestCtx)
Upload handles multipart upload request.
type MultipartFile ¶
type MultipartFile interface { io.ReadCloser FileName() string }
MultipartFile provides standard ReadCloser interface and also allows one to get file name, it's used for multipart uploads.
type Object ¶ added in v0.30.3
type Object struct { // Object header (doesn't contain payload). Header object.Object // Object payload part encapsulated in io.Reader primitive. // Returns ErrAccessDenied on read access violation. Payload io.ReadCloser }
Object represents FrostFS object.
type PrmAuth ¶ added in v0.30.0
type PrmAuth struct { // Bearer token to be used for the operation. Overlaps PrivateKey. Optional. BearerToken *bearer.Token }
PrmAuth groups authentication parameters for the FrostFS operation.
type PrmContainer ¶ added in v0.30.0
PrmContainer groups parameters of FrostFS.Container operation.
type PrmInitMultiObjectReader ¶ added in v0.30.3
type PrmObjectCreate ¶ added in v0.30.0
type PrmObjectCreate struct { // Authentication parameters. PrmAuth Object *object.Object // Object payload encapsulated in io.Reader primitive. Payload io.Reader // Enables client side object preparing. ClientCut bool // Disables using Tillich-Zémor hash for payload. WithoutHomomorphicHash bool // Sets max buffer size to read payload. BufferMaxSize uint64 }
PrmObjectCreate groups parameters of FrostFS.CreateObject operation.
type PrmObjectGet ¶ added in v0.30.3
type PrmObjectGet struct { // Authentication parameters. PrmAuth // Address to read the object header from. Address oid.Address }
PrmObjectGet groups parameters of FrostFS.GetObject operation.
type PrmObjectHead ¶ added in v0.30.3
type PrmObjectHead struct { // Authentication parameters. PrmAuth // Address to read the object header from. Address oid.Address }
PrmObjectHead groups parameters of FrostFS.HeadObject operation.
type PrmObjectRange ¶ added in v0.30.3
type PrmObjectRange struct { // Authentication parameters. PrmAuth // Address to read the object header from. Address oid.Address // Offset-length range of the object payload to be read. PayloadRange [2]uint64 }
PrmObjectRange groups parameters of FrostFS.RangeObject operation.
type PrmObjectSearch ¶ added in v0.30.0
type PrmObjectSearch struct { // Authentication parameters. PrmAuth // Container to select the objects from. Container cid.ID Filters object.SearchFilters }
PrmObjectSearch groups parameters of FrostFS.sear SearchObjects operation.
type ResObjectSearch ¶ added in v0.30.0
type ResponseObject ¶ added in v0.31.0
type ResponseObjectExtended ¶ added in v0.31.0
type ResponseObjectExtended struct { Object ResponseObject Error error }
type TestFrostFS ¶ added in v0.30.0
type TestFrostFS struct {
// contains filtered or unexported fields
}
func NewTestFrostFS ¶ added in v0.30.0
func NewTestFrostFS(key *keys.PrivateKey) *TestFrostFS
func (*TestFrostFS) AllowUserOperation ¶ added in v0.30.0
AllowUserOperation grants access to object operations. Empty userID and objID means any user and object respectively.
func (*TestFrostFS) Container ¶ added in v0.30.0
func (t *TestFrostFS) Container(_ context.Context, prm PrmContainer) (*container.Container, error)
func (*TestFrostFS) ContainerID ¶ added in v0.30.0
func (t *TestFrostFS) ContainerID(name string) (*cid.ID, error)
func (*TestFrostFS) CreateObject ¶ added in v0.30.0
func (t *TestFrostFS) CreateObject(_ context.Context, prm PrmObjectCreate) (oid.ID, error)
func (*TestFrostFS) GetEpochDurations ¶ added in v0.30.0
func (t *TestFrostFS) GetEpochDurations(context.Context) (*utils.EpochDurations, error)
func (*TestFrostFS) GetObject ¶ added in v0.30.3
func (t *TestFrostFS) GetObject(_ context.Context, prm PrmObjectGet) (*Object, error)
func (*TestFrostFS) HeadObject ¶ added in v0.30.3
func (t *TestFrostFS) HeadObject(_ context.Context, prm PrmObjectHead) (*object.Object, error)
func (*TestFrostFS) InitMultiObjectReader ¶ added in v0.30.3
func (t *TestFrostFS) InitMultiObjectReader(context.Context, PrmInitMultiObjectReader) (io.Reader, error)
func (*TestFrostFS) RangeObject ¶ added in v0.30.3
func (t *TestFrostFS) RangeObject(_ context.Context, prm PrmObjectRange) (io.ReadCloser, error)
func (*TestFrostFS) SearchObjects ¶ added in v0.30.0
func (t *TestFrostFS) SearchObjects(_ context.Context, prm PrmObjectSearch) (ResObjectSearch, error)
func (*TestFrostFS) SetContainer ¶ added in v0.30.0
func (t *TestFrostFS) SetContainer(cnrID cid.ID, cnr *container.Container)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package multipart implements MIME multipart parsing, as defined in RFC 2046.
|
Package multipart implements MIME multipart parsing, as defined in RFC 2046. |