postgresstore

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 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 CheckDatarangeOverlapParams

type CheckDatarangeOverlapParams struct {
	Datas3tID       int64
	MinDatapointKey int64
	MaxDatapointKey int64
}

type CheckDatarangeUploadOverlapParams

type CheckDatarangeUploadOverlapParams struct {
	Datas3tID             int64
	FirstDatapointIndex   int64
	FirstDatapointIndex_2 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 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 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 GetDatas3tWithBucketRow

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

type KeysToDelete

type KeysToDelete struct {
	ID                 int64
	PresignedDeleteUrl string
	CreatedAt          pgtype.Timestamp
	UpdatedAt          pgtype.Timestamp
	DeleteAfter        pgtype.Timestamp
}

type ListAllBucketsRow

type ListAllBucketsRow struct {
	Name     string
	Endpoint string
	Bucket   string
}

type ListDatas3tsRow

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

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) CountDatarangeUploads

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

func (*Queries) CountDataranges

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

func (*Queries) CountKeysToDelete

func (q *Queries) CountKeysToDelete(ctx context.Context) (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) 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) GetAllDatarangeUploads

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

func (*Queries) GetAllDataranges

func (q *Queries) GetAllDataranges(ctx context.Context) ([]GetAllDatarangesRow, 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) GetDatas3tWithBucket

func (q *Queries) GetDatas3tWithBucket(ctx context.Context, name string) (GetDatas3tWithBucketRow, 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) ListDatas3ts

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

func (*Queries) ScheduleKeyForDeletion

func (q *Queries) ScheduleKeyForDeletion(ctx context.Context, arg ScheduleKeyForDeletionParams) 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 ScheduleKeyForDeletionParams

type ScheduleKeyForDeletionParams struct {
	PresignedDeleteUrl string
	DeleteAfter        pgtype.Timestamp
}

Jump to

Keyboard shortcuts

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