Documentation
¶
Index ¶
- func DeleteDataObject(ctx context.Context, key string) error
- func DeleteKvData(ctx context.Context, key string) error
- func InitKvClient()
- func InitS3Client()
- func ListDataObjects(ctx context.Context) (map[string]types.Object, error)
- func ListFileMetadata(ctx context.Context) (map[string]FileMetadata, error)
- func ListKvKeys(ctx context.Context) ([]string, error)
- func ReadKvData(ctx context.Context, key string) ([]byte, error)
- func UploadData(ctx context.Context, key string, reader io.Reader, fileSize int64) error
- func WriteFileMetadata(ctx context.Context, fileId string, metadata FileMetadata) error
- func WriteKvData(ctx context.Context, key string, value []byte) error
- type FileMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDataObject ¶
DeleteDataObject deletes the object with the given key from the configured S3 bucket.
func DeleteKvData ¶
DeleteKvData deletes the KV data stored under the given key.
func InitKvClient ¶
func InitKvClient()
func InitS3Client ¶
func InitS3Client()
func ListFileMetadata ¶
func ListFileMetadata(ctx context.Context) (map[string]FileMetadata, error)
ListFileMetadata returns a map with file IDs and their metadata.
func ListKvKeys ¶
ListKvKeys returns a list of all keys in the KV store.
func UploadData ¶
UploadData uploads the data from the given reader to the configured S3 bucket.
func WriteFileMetadata ¶
func WriteFileMetadata(ctx context.Context, fileId string, metadata FileMetadata) error
Types ¶
type FileMetadata ¶
type FileMetadata struct { Name crypto.EncryptedValue `json:"name"` Checksum crypto.EncryptedValue `json:"checksum"` Iv string `json:"iv"` Size int64 `json:"size"` }
func ReadFileMetadata ¶
func ReadFileMetadata(ctx context.Context, fileId string) (FileMetadata, error)
ReadFileMetadata returns the metadata stored for a file with the given file ID.
Click to show internal directories.
Click to hide internal directories.