objectstoreService

package
v0.0.0-...-27c9e6d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectstoreService

type ObjectstoreService interface {

	// Get total usage of the object store across all projects in the account
	GetTotalUsage(accountId string) (int, error)

	// Get total usage of the object store across all projects with given type in the account
	GetUsageByProjectType(accountId, projectType string) (int64, error)

	// Add an object to the object_store table
	AddObject(objectstore models.Objectstore) error

	// Get an object from the object_store table
	GetObject(accountId, projectTag, fileName string) (models.Objectstore, error)

	// Delete a file from the object_store table. If tpAccountId is not empty, it will be included in the where clause, o.w. it will be ignored
	DeleteObject(accountId, tpAccountId, projectTag, fileName string) error

	// List all objects of a project
	ListFiles(accountId, projectTag string) ([]models.Objectstore, error)

	// Returns a public url for file based on given expiration time (in seconds)
	GetPresignUrl(accountId, projectTag, fileName, expiresIn string) (map[string]interface{}, error)

	CheckUploadFileAccess(accountId, projectType string) (bool, error)

	SetUserGroups(accountId, projectTag, fileName string, userGroups []string) error

	SetAccess(accountId, projectTag, fileName, newUrl string, isPublic bool) error
}

Jump to

Keyboard shortcuts

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