Documentation ¶
Index ¶
- type DatasetsStore
- type DatasetsStoreFactory
- type PackagePage
- type PostgresConfig
- type Queries
- func (q *Queries) CountDatasetPackagesByStates(ctx context.Context, datasetId int64, states []packageState.State) (int, error)
- func (q *Queries) GetDatasetByNodeId(ctx context.Context, dsNodeId string) (*pgdb.Dataset, error)
- func (q *Queries) GetDatasetPackageByNodeId(ctx context.Context, datasetId int64, packageNodeId string) (*pgdb.Package, error)
- func (q *Queries) GetTrashcanPaginated(ctx context.Context, datasetId int64, parentId int64, limit int, offset int) (*PackagePage, error)
- func (q *Queries) GetTrashcanRootPaginated(ctx context.Context, datasetId int64, limit int, offset int) (*PackagePage, error)
- type TestDB
- func (tdb *TestDB) Close()
- func (tdb *TestDB) CloseRows(rows *sql.Rows)
- func (tdb *TestDB) ExecSQLFile(sqlFile string)
- func (tdb *TestDB) PingUntilReady() error
- func (tdb *TestDB) Queries(orgId int) *Queries
- func (tdb *TestDB) Truncate(orgID int, table string)
- func (tdb *TestDB) TruncatePennsieve(table string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatasetsStore ¶
type DatasetsStore interface { GetDatasetByNodeId(ctx context.Context, dsNodeId string) (*pgdb.Dataset, error) GetTrashcanRootPaginated(ctx context.Context, datasetId int64, limit int, offset int) (*PackagePage, error) GetTrashcanPaginated(ctx context.Context, datasetId int64, parentId int64, limit int, offset int) (*PackagePage, error) CountDatasetPackagesByStates(ctx context.Context, datasetId int64, states []packageState.State) (int, error) GetDatasetPackageByNodeId(ctx context.Context, datasetId int64, packageNodeId string) (*pgdb.Package, error) }
type DatasetsStoreFactory ¶
type DatasetsStoreFactory interface { NewSimpleStore(orgId int) DatasetsStore ExecStoreTx(ctx context.Context, orgId int, fn func(store DatasetsStore) error) error }
func NewDatasetsStoreFactory ¶
func NewDatasetsStoreFactory(pennsieveDB *sql.DB) DatasetsStoreFactory
type PackagePage ¶
type PostgresConfig ¶
type PostgresConfig struct { Host string Port string User string Password string DBName string SSLMode string }
func PostgresConfigFromEnv ¶
func PostgresConfigFromEnv() *PostgresConfig
func (*PostgresConfig) LogString ¶
func (c *PostgresConfig) LogString() string
func (*PostgresConfig) OpenAtSchema ¶
func (c *PostgresConfig) OpenAtSchema(schema string) (*sql.DB, error)
func (*PostgresConfig) String ¶
func (c *PostgresConfig) String() string
type Queries ¶
type Queries struct { OrgId int // contains filtered or unexported fields }
func (*Queries) CountDatasetPackagesByStates ¶
func (*Queries) GetDatasetByNodeId ¶
func (*Queries) GetDatasetPackageByNodeId ¶
func (*Queries) GetTrashcanPaginated ¶
func (*Queries) GetTrashcanRootPaginated ¶
type TestDB ¶
func (*TestDB) ExecSQLFile ¶
func (*TestDB) PingUntilReady ¶
PingUntilReady pings the db up to 10 times, stopping when a ping is successful. Used because there have been problems on Jenkins with the test DB not being fully started and ready to make connections. But there must be a better way.
func (*TestDB) TruncatePennsieve ¶
Click to show internal directories.
Click to hide internal directories.