db

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: AGPL-3.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 ApiKey added in v1.14.0

type ApiKey struct {
	WithDatabase
	WithSecret bool
}

func (*ApiKey) Run added in v1.14.0

func (s *ApiKey) Run() error

type BeginObject added in v1.14.0

type BeginObject struct {
	Database string
}

func (BeginObject) Run added in v1.14.0

func (i BeginObject) Run() error

type Db added in v1.14.0

type Db struct {
	Inline       Inline       `cmd:"" help:"inline segment load test"`
	GetObject    GetObject    `cmd:"" help:"get object from metabase by project ID, bucket and encrypted path"`
	GetBucket    GetBucket    `cmd:"" help:"get bucket from metabase by project ID and bucket name"`
	GetNode      GetNode      `cmd:"" help:"get node from satellite db by node ID"`
	ListProjects ListProjects `cmd:"" help:"List projects."`
	ApiKey       ApiKey       `cmd:"" help:"Print details of current api key (including project id)"`
	GetUser      GetUser      `cmd:"" help:"Print details of a user"`
}

type GetBucket added in v1.14.0

type GetBucket struct {
	WithDatabase
	ProjectID uuid.UUID `help:"the project ID. Keep it empty and set UPLINK_ACCESS env var to use the project ID from the access grant"`
	Bucket    string    `arg:""`
}

func (*GetBucket) Run added in v1.14.0

func (s *GetBucket) Run() error

type GetNode added in v1.14.0

type GetNode struct {
	WithDatabase
	NodeID storj.NodeID `arg:""`
}

func (*GetNode) Run added in v1.14.0

func (s *GetNode) Run() error

type GetObject added in v1.14.0

type GetObject struct {
	WithDatabase
	ProjectID     *uuid.UUID `help:"project ID (leave empty to find it from UPLINK_ACCESS)"`
	Bucket        string     `arg:""`
	EncryptedPath string     `arg:""`
}

func (*GetObject) Run added in v1.14.0

func (s *GetObject) Run() error

type GetUser added in v1.15.0

type GetUser struct {
	WithDatabase
	Email string `arg:""`
}

func (*GetUser) Run added in v1.15.0

func (s *GetUser) Run() error

type Inline added in v1.14.0

type Inline struct {
}

func (Inline) Run added in v1.14.0

func (i Inline) Run() error

type ListProjects added in v1.14.0

type ListProjects struct {
	WithDatabase
	ProjectID     uuid.UUID `arg:""`
	Bucket        string    `arg:""`
	EncryptedPath string    `arg:""`
}

func (*ListProjects) Run added in v1.14.0

func (s *ListProjects) Run() error

type SatelliteConfig

type SatelliteConfig struct {
	Satellite string
	Metabase  string
}

type WithDatabase

type WithDatabase struct {
	Satellite  string
	Satellites map[string]SatelliteConfig
}

func (WithDatabase) GetMetabaseDB

func (w WithDatabase) GetMetabaseDB(ctx context.Context, log *zap.Logger) (*metabase.DB, error)

func (WithDatabase) GetSatelliteDB

func (w WithDatabase) GetSatelliteDB(ctx context.Context, log *zap.Logger) (satellite.DB, error)

Jump to

Keyboard shortcuts

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