postgresstore

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MigrationsFS embed.FS

Functions

This section is empty.

Types

type AddBucketParams

type AddBucketParams struct {
	Name      string
	Endpoint  string
	Bucket    string
	AccessKey string
	SecretKey string
}

type AddDatarangeUploadParams

type AddDatarangeUploadParams struct {
	FirstDatapointIndex int64
	NumberOfDatapoints  int64
	DataSize            int64
	Datas3tName         string
}

type AddDatas3tParams

type AddDatas3tParams struct {
	Datas3tName string
	BucketName  string
}

type AggregateUpload added in v0.1.3

type AggregateUpload struct {
	ID                  int64
	Datas3tID           int64
	UploadID            string
	DataObjectKey       string
	IndexObjectKey      string
	FirstDatapointIndex int64
	LastDatapointIndex  int64
	TotalDataSize       int64
	SourceDatarangeIds  []int64
	CreatedAt           pgtype.Timestamp
	UpdatedAt           pgtype.Timestamp
}

type CheckDatarangeOverlapParams

type CheckDatarangeOverlapParams struct {
	Datas3tID       int64
	MinDatapointKey int64
	MaxDatapointKey int64
}

type CheckDatarangeUploadOverlapParams

type CheckDatarangeUploadOverlapParams struct {
	Datas3tID             int64
	FirstDatapointIndex   int64
	FirstDatapointIndex_2 int64
}

type CheckFullDatarangeCoverageParams added in v0.1.3

type CheckFullDatarangeCoverageParams struct {
	Name            string
	MinDatapointKey int64
	MaxDatapointKey int64
}

type ClearDatas3tDatarangesRow added in v0.1.9

type ClearDatas3tDatarangesRow struct {
	ID             int64
	DataObjectKey  string
	IndexObjectKey string
	S3BucketID     int64
	Endpoint       string
	Bucket         string
	AccessKey      string
	SecretKey      string
}

type CreateAggregateUploadParams added in v0.1.3

type CreateAggregateUploadParams struct {
	Datas3tID           int64
	UploadID            string
	DataObjectKey       string
	IndexObjectKey      string
	FirstDatapointIndex int64
	LastDatapointIndex  int64
	TotalDataSize       int64
	SourceDatarangeIds  []int64
}

type CreateDatarangeParams

type CreateDatarangeParams struct {
	Datas3tID       int64
	DataObjectKey   string
	IndexObjectKey  string
	MinDatapointKey int64
	MaxDatapointKey int64
	SizeBytes       int64
}

type CreateDatarangeUploadParams

type CreateDatarangeUploadParams struct {
	Datas3tID           int64
	UploadID            string
	DataObjectKey       string
	IndexObjectKey      string
	FirstDatapointIndex int64
	NumberOfDatapoints  int64
	DataSize            int64
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Datarange

type Datarange struct {
	ID              int64
	Datas3tID       int64
	DataObjectKey   string
	IndexObjectKey  string
	MinDatapointKey int64
	MaxDatapointKey int64
	SizeBytes       int64
	CreatedAt       pgtype.Timestamp
	UpdatedAt       pgtype.Timestamp
}

type DatarangeUpload

type DatarangeUpload struct {
	ID                  int64
	Datas3tID           int64
	UploadID            string
	DataObjectKey       string
	IndexObjectKey      string
	FirstDatapointIndex int64
	NumberOfDatapoints  int64
	DataSize            int64
	CreatedAt           pgtype.Timestamp
	UpdatedAt           pgtype.Timestamp
}

type Datas3t

type Datas3t struct {
	ID            int64
	Name          string
	S3BucketID    int64
	UploadCounter int64
	CreatedAt     pgtype.Timestamp
	UpdatedAt     pgtype.Timestamp
}

type GetAggregateUploadWithDetailsRow added in v0.1.3

type GetAggregateUploadWithDetailsRow struct {
	ID                  int64
	Datas3tID           int64
	UploadID            string
	FirstDatapointIndex int64
	LastDatapointIndex  int64
	TotalDataSize       int64
	SourceDatarangeIds  []int64
	DataObjectKey       string
	IndexObjectKey      string
	Datas3tName         string
	S3BucketID          int64
	Endpoint            string
	Bucket              string
	AccessKey           string
	SecretKey           string
}

type GetAllDatarangeUploadsRow

type GetAllDatarangeUploadsRow struct {
	ID                  int64
	Datas3tID           int64
	UploadID            string
	FirstDatapointIndex int64
	NumberOfDatapoints  int64
	DataSize            int64
}

type GetAllDatarangesRow

type GetAllDatarangesRow struct {
	ID              int64
	Datas3tID       int64
	MinDatapointKey int64
	MaxDatapointKey int64
	SizeBytes       int64
}

type GetBucketCredentialsRow added in v0.1.3

type GetBucketCredentialsRow struct {
	ID        int64
	Name      string
	Endpoint  string
	Bucket    string
	AccessKey string
	SecretKey string
}

type GetDatarangeByExactRangeParams

type GetDatarangeByExactRangeParams struct {
	Name            string
	MinDatapointKey int64
	MaxDatapointKey int64
}

type GetDatarangeByExactRangeRow

type GetDatarangeByExactRangeRow struct {
	ID              int64
	Datas3tID       int64
	DataObjectKey   string
	IndexObjectKey  string
	MinDatapointKey int64
	MaxDatapointKey int64
	SizeBytes       int64
	Datas3tName     string
	Endpoint        string
	Bucket          string
	AccessKey       string
	SecretKey       string
}

type GetDatarangeFieldsRow

type GetDatarangeFieldsRow struct {
	MinDatapointKey int64
	MaxDatapointKey int64
	SizeBytes       int64
}

type GetDatarangeUploadWithDetailsRow

type GetDatarangeUploadWithDetailsRow struct {
	ID                  int64
	Datas3tID           int64
	UploadID            string
	FirstDatapointIndex int64
	NumberOfDatapoints  int64
	DataSize            int64
	DataObjectKey       string
	IndexObjectKey      string
	Datas3tName         string
	S3BucketID          int64
	Endpoint            string
	Bucket              string
	AccessKey           string
	SecretKey           string
}

type GetDatarangesForDatapointsParams

type GetDatarangesForDatapointsParams struct {
	Name            string
	MinDatapointKey int64
	MaxDatapointKey int64
}

type GetDatarangesForDatapointsRow

type GetDatarangesForDatapointsRow struct {
	ID              int64
	DataObjectKey   string
	IndexObjectKey  string
	MinDatapointKey int64
	MaxDatapointKey int64
	SizeBytes       int64
	Datas3tName     string
	Endpoint        string
	Bucket          string
	AccessKey       string
	SecretKey       string
}

type GetDatarangesForDatas3tRow added in v0.1.2

type GetDatarangesForDatas3tRow struct {
	MinDatapointKey int64
	MaxDatapointKey int64
}

type GetDatarangesInRangeParams added in v0.1.3

type GetDatarangesInRangeParams struct {
	Name            string
	MaxDatapointKey int64
	MinDatapointKey int64
}

type GetDatarangesInRangeRow added in v0.1.3

type GetDatarangesInRangeRow struct {
	ID              int64
	DataObjectKey   string
	IndexObjectKey  string
	MinDatapointKey int64
	MaxDatapointKey int64
	SizeBytes       int64
	Datas3tName     string
	S3BucketID      int64
	Endpoint        string
	Bucket          string
	AccessKey       string
	SecretKey       string
}

type GetDatas3tWithBucketRow

type GetDatas3tWithBucketRow struct {
	ID            int64
	Name          string
	S3BucketID    int64
	UploadCounter int64
	Endpoint      string
	Bucket        string
	AccessKey     string
	SecretKey     string
}

type GetKeysToDeleteRow added in v0.1.7

type GetKeysToDeleteRow struct {
	ID                 int64
	PresignedDeleteUrl string
}

type GetObjectsToDeleteRow added in v0.1.12

type GetObjectsToDeleteRow struct {
	ID         int64
	ObjectName *string
	Endpoint   string
	Bucket     string
	AccessKey  string
	SecretKey  string
}

type ListAllBucketsRow

type ListAllBucketsRow struct {
	Name     string
	Endpoint string
	Bucket   string
}

type ListDatarangesForDatas3tRow added in v0.1.5

type ListDatarangesForDatas3tRow struct {
	ID              int64
	DataObjectKey   string
	IndexObjectKey  string
	MinDatapointKey int64
	MaxDatapointKey int64
	SizeBytes       int64
}

type ListDatas3tsRow

type ListDatas3tsRow struct {
	Datas3tName      string
	BucketName       string
	DatarangeCount   interface{}
	TotalDatapoints  interface{}
	LowestDatapoint  interface{}
	HighestDatapoint interface{}
	TotalBytes       interface{}
}

type ObjectsToDelete added in v0.1.12

type ObjectsToDelete struct {
	ID                 int64
	PresignedDeleteUrl string
	CreatedAt          pgtype.Timestamp
	UpdatedAt          pgtype.Timestamp
	S3BucketID         *int64
	ObjectName         *string
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AddBucket

func (q *Queries) AddBucket(ctx context.Context, arg AddBucketParams) error

func (*Queries) AddDatarangeUpload

func (q *Queries) AddDatarangeUpload(ctx context.Context, arg AddDatarangeUploadParams) (int64, error)

func (*Queries) AddDatas3t

func (q *Queries) AddDatas3t(ctx context.Context, arg AddDatas3tParams) error

func (*Queries) AllAccessConfigs

func (q *Queries) AllAccessConfigs(ctx context.Context) ([]string, error)

func (*Queries) AllDatas3ts

func (q *Queries) AllDatas3ts(ctx context.Context) ([]string, error)

func (*Queries) BucketExists

func (q *Queries) BucketExists(ctx context.Context, name string) (bool, error)

func (*Queries) CheckDatarangeOverlap

func (q *Queries) CheckDatarangeOverlap(ctx context.Context, arg CheckDatarangeOverlapParams) (bool, error)

func (*Queries) CheckDatarangeUploadOverlap

func (q *Queries) CheckDatarangeUploadOverlap(ctx context.Context, arg CheckDatarangeUploadOverlapParams) (bool, error)

func (*Queries) CheckFullDatarangeCoverage added in v0.1.3

func (q *Queries) CheckFullDatarangeCoverage(ctx context.Context, arg CheckFullDatarangeCoverageParams) (bool, error)

Check if a datapoint range is fully covered by existing dataranges with no gaps Returns true if the range is fully covered by at least two dataranges

func (*Queries) ClearDatas3tDataranges added in v0.1.9

func (q *Queries) ClearDatas3tDataranges(ctx context.Context, name string) ([]ClearDatas3tDatarangesRow, error)

func (*Queries) CountDatarangeUploads

func (q *Queries) CountDatarangeUploads(ctx context.Context) (int64, error)

func (*Queries) CountDataranges

func (q *Queries) CountDataranges(ctx context.Context) (int64, error)

func (*Queries) CountDatarangesForDatas3t added in v0.1.16

func (q *Queries) CountDatarangesForDatas3t(ctx context.Context, name string) (int32, error)

func (*Queries) CountKeysToDelete

func (q *Queries) CountKeysToDelete(ctx context.Context) (int64, error)

func (*Queries) CountObjectsToDelete added in v0.1.12

func (q *Queries) CountObjectsToDelete(ctx context.Context) (int64, error)

func (*Queries) CreateAggregateUpload added in v0.1.3

func (q *Queries) CreateAggregateUpload(ctx context.Context, arg CreateAggregateUploadParams) (int64, error)

func (*Queries) CreateDatarange

func (q *Queries) CreateDatarange(ctx context.Context, arg CreateDatarangeParams) (int64, error)

func (*Queries) CreateDatarangeUpload

func (q *Queries) CreateDatarangeUpload(ctx context.Context, arg CreateDatarangeUploadParams) (int64, error)

func (*Queries) Datas3tExists

func (q *Queries) Datas3tExists(ctx context.Context) (bool, error)

func (*Queries) DeleteAggregateUpload added in v0.1.3

func (q *Queries) DeleteAggregateUpload(ctx context.Context, id int64) error

func (*Queries) DeleteDatarange

func (q *Queries) DeleteDatarange(ctx context.Context, id int64) error

func (*Queries) DeleteDatarangeUpload

func (q *Queries) DeleteDatarangeUpload(ctx context.Context, id int64) error

func (*Queries) DeleteDatarangesByIDs added in v0.1.3

func (q *Queries) DeleteDatarangesByIDs(ctx context.Context, dollar_1 []int64) error

func (*Queries) DeleteDatas3t added in v0.1.16

func (q *Queries) DeleteDatas3t(ctx context.Context, name string) error

func (*Queries) DeleteKeysToDelete added in v0.1.7

func (q *Queries) DeleteKeysToDelete(ctx context.Context, dollar_1 []int64) error

func (*Queries) DeleteObjectsToDelete added in v0.1.12

func (q *Queries) DeleteObjectsToDelete(ctx context.Context, dollar_1 []int64) error

func (*Queries) GetAggregateUploadWithDetails added in v0.1.3

func (q *Queries) GetAggregateUploadWithDetails(ctx context.Context, id int64) (GetAggregateUploadWithDetailsRow, error)

func (*Queries) GetAllDatarangeUploads

func (q *Queries) GetAllDatarangeUploads(ctx context.Context) ([]GetAllDatarangeUploadsRow, error)

func (*Queries) GetAllDataranges

func (q *Queries) GetAllDataranges(ctx context.Context) ([]GetAllDatarangesRow, error)

func (*Queries) GetBucketCredentials added in v0.1.3

func (q *Queries) GetBucketCredentials(ctx context.Context, name string) (GetBucketCredentialsRow, error)

func (*Queries) GetDatarangeByExactRange

func (*Queries) GetDatarangeFields

func (q *Queries) GetDatarangeFields(ctx context.Context) ([]GetDatarangeFieldsRow, error)

func (*Queries) GetDatarangeUploadIDs

func (q *Queries) GetDatarangeUploadIDs(ctx context.Context) ([]string, error)

func (*Queries) GetDatarangeUploadWithDetails

func (q *Queries) GetDatarangeUploadWithDetails(ctx context.Context, id int64) (GetDatarangeUploadWithDetailsRow, error)

func (*Queries) GetDatarangesForDatapoints

func (q *Queries) GetDatarangesForDatapoints(ctx context.Context, arg GetDatarangesForDatapointsParams) ([]GetDatarangesForDatapointsRow, error)

func (*Queries) GetDatarangesForDatas3t added in v0.1.2

func (q *Queries) GetDatarangesForDatas3t(ctx context.Context, name string) ([]GetDatarangesForDatas3tRow, error)

func (*Queries) GetDatarangesInRange added in v0.1.3

func (q *Queries) GetDatarangesInRange(ctx context.Context, arg GetDatarangesInRangeParams) ([]GetDatarangesInRangeRow, error)

func (*Queries) GetDatas3tIDByName added in v0.1.16

func (q *Queries) GetDatas3tIDByName(ctx context.Context, name string) (int64, error)

func (*Queries) GetDatas3tWithBucket

func (q *Queries) GetDatas3tWithBucket(ctx context.Context, name string) (GetDatas3tWithBucketRow, error)

func (*Queries) GetKeysToDelete added in v0.1.7

func (q *Queries) GetKeysToDelete(ctx context.Context, limit int32) ([]GetKeysToDeleteRow, error)

func (*Queries) GetObjectsToDelete added in v0.1.12

func (q *Queries) GetObjectsToDelete(ctx context.Context, limit int32) ([]GetObjectsToDeleteRow, error)

func (*Queries) IncrementUploadCounter

func (q *Queries) IncrementUploadCounter(ctx context.Context, id int64) (int64, error)

func (*Queries) ListAllBuckets

func (q *Queries) ListAllBuckets(ctx context.Context) ([]ListAllBucketsRow, error)

func (*Queries) ListDatarangesForDatas3t added in v0.1.5

func (q *Queries) ListDatarangesForDatas3t(ctx context.Context, name string) ([]ListDatarangesForDatas3tRow, error)

func (*Queries) ListDatas3ts

func (q *Queries) ListDatas3ts(ctx context.Context) ([]ListDatas3tsRow, error)

func (*Queries) ScheduleKeyForDeletion

func (q *Queries) ScheduleKeyForDeletion(ctx context.Context, presignedDeleteUrl string) error

func (*Queries) ScheduleObjectForDeletion added in v0.1.12

func (q *Queries) ScheduleObjectForDeletion(ctx context.Context, arg ScheduleObjectForDeletionParams) error

func (*Queries) ScheduleObjectsForDeletion added in v0.1.12

func (q *Queries) ScheduleObjectsForDeletion(ctx context.Context, arg ScheduleObjectsForDeletionParams) error

func (*Queries) UpdateUploadCounter added in v0.1.3

func (q *Queries) UpdateUploadCounter(ctx context.Context, arg UpdateUploadCounterParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type S3Bucket

type S3Bucket struct {
	ID        int64
	Name      string
	Endpoint  string
	Bucket    string
	AccessKey string
	SecretKey string
	CreatedAt pgtype.Timestamp
	UpdatedAt pgtype.Timestamp
}

type ScheduleObjectForDeletionParams added in v0.1.12

type ScheduleObjectForDeletionParams struct {
	S3BucketID *int64
	ObjectName *string
}

type ScheduleObjectsForDeletionParams added in v0.1.12

type ScheduleObjectsForDeletionParams struct {
	S3BucketID *int64
	Column2    []string
}

type UpdateUploadCounterParams added in v0.1.3

type UpdateUploadCounterParams struct {
	ID            int64
	UploadCounter int64
}

Jump to

Keyboard shortcuts

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