v1alpha1

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 defines versioned interfaces for file-store capability

Index

Constants

This section is empty.

Variables

View Source
var FileStoreV1alpha1GV = schema.GroupVersion{Group: filestore.CapabilityName, Version: "v1alpha1"}

FileStoreV1alpha1GV is group version used to register versioned resource

Functions

This section is empty.

Types

type FileMetaInterface

type FileMetaInterface interface {
	// ListFileMetas for list file metas
	ListFileMetas(ctx context.Context, opt v1alpha1.FileMetaListOptions) ([]v1alpha1.FileMeta, error)
	// GetFileMeta for get file meta
	GetFileMeta(ctx context.Context, objectName string) (*v1alpha1.FileMeta, error)
}

FileMetaInterface for file meta

type FileObject

type FileObject struct {
	v1alpha1.FileMeta
	FileReadCloser io.ReadCloser
}

FileObject wraps FileMeta with file reader for implementing file download

type FileObjectInterface

type FileObjectInterface interface {
	// GetFileObject for get file object
	GetFileObject(ctx context.Context, objectName string) (*FileObject, error)
	// PutFileObject for put file object, use FileObject.Name to store objectName
	PutFileObject(ctx context.Context, obj *FileObject) (*v1alpha1.FileMeta,
		error)
	// DeleteFileObject for delete file object
	DeleteFileObject(ctx context.Context, objectName string) error
}

FileObjectInterface for file object

type FileStoreCapable

type FileStoreCapable interface {
	FileObjectInterface
	FileMetaInterface
}

FileStoreCapable defines methods of file-store capability

Jump to

Keyboard shortcuts

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