storage

package
v0.0.0-...-f54f16c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*gorp.DbMap
}

func ConnectAndMigrate

func ConnectAndMigrate(dbConf *config.Storage) (*DB, error)

ConnectAndMigrate creates a new Postgres connection, connects to the database server and runs the migrations

func (*DB) GetAllStatus

func (db *DB) GetAllStatus(id string, endTime time.Time) ([]*customReportRequestStatus, error)

func (*DB) GetPreSignedURL

func (db *DB) GetPreSignedURL(id, requestorID string) (*report_manager.GetPresignedURLResponse, error)

func (*DB) InsertTask

func (db *DB) InsertTask(id, requestorID, status, reportType string, createdTime, updatedTime time.Time) error

func (*DB) UpdateTask

func (db *DB) UpdateTask(id, status, msg, preSignedURL string, updatedTime time.Time, objSize int64) error

type PreSignedURLResponse

type PreSignedURLResponse struct {
	PresignedURL string `db:"custom_report_url"`
	ReportType   string `db:"custom_report_type"`
	ReportSize   int64  `db:"custom_report_size"`
}

PreSignedURLResponse used to read custom report's presigned URL and other details from DB

Jump to

Keyboard shortcuts

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