datastores

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufferTemp

func BufferTemp(datastore config.DatastoreConfig, contents io.ReadCloser) (string, int64, io.ReadCloser, error)

func Download

func Download(ctx rcontext.RequestContext, ds config.DatastoreConfig, dsFileName string) (io.ReadSeekCloser, error)

func DownloadOrRedirect

func DownloadOrRedirect(ctx rcontext.RequestContext, ds config.DatastoreConfig, dsFileName string) (io.ReadSeekCloser, error)

func GetS3Url

func GetS3Url(ds config.DatastoreConfig, location string) (string, error)

func GetUri

func GetUri(ds config.DatastoreConfig) (string, error)

func HasListedKind

func HasListedKind(have []string, want Kind) bool

func ListS3Files

func ListS3Files(ctx rcontext.RequestContext, ds config.DatastoreConfig) (<-chan minio.ObjectInfo, error)

func ParseS3Url

func ParseS3Url(s3url string) (config.DatastoreConfig, string, error)

func Remove

func Remove(ctx rcontext.RequestContext, ds config.DatastoreConfig, location string) error

func RemoveWithDsId

func RemoveWithDsId(ctx rcontext.RequestContext, dsId string, location string) error

func ResetS3Clients

func ResetS3Clients()

func Upload

func Upload(ctx rcontext.RequestContext, ds config.DatastoreConfig, data io.ReadCloser, size int64, contentType string, sha256hash string) (string, error)

func WouldRedirectWhenCached added in v1.3.5

func WouldRedirectWhenCached(ctx rcontext.RequestContext, ds config.DatastoreConfig) (bool, error)

Types

type Kind

type Kind string
const (
	LocalMediaKind  Kind = "local_media"
	RemoteMediaKind Kind = "remote_media"
	ThumbnailsKind  Kind = "thumbnails"
	ArchivesKind    Kind = "archives"
	AllKind         Kind = "all"
)

type RedirectError

type RedirectError struct {
	RedirectUrl string
	// contains filtered or unexported fields
}

type SizeEstimate

type SizeEstimate struct {
	ThumbnailsAffected      int64 `json:"thumbnails_affected"`
	ThumbnailHashesAffected int64 `json:"thumbnail_hashes_affected"`
	ThumbnailBytes          int64 `json:"thumbnail_bytes"`

	MediaAffected       int64 `json:"media_affected"`
	MediaHashesAffected int64 `json:"media_hashes_affected"`
	MediaBytes          int64 `json:"media_bytes"`

	TotalHashesAffected int64 `json:"total_hashes_affected"`
	TotalBytes          int64 `json:"total_bytes"`
}

func SizeOfDsIdWithAge

func SizeOfDsIdWithAge(ctx rcontext.RequestContext, dsId string, beforeTs int64) (*SizeEstimate, error)

Jump to

Keyboard shortcuts

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