Documentation
¶
Index ¶
- Constants
- Variables
- func Fetch(api *metax.MetaxService, db *psql.DB, logger zerolog.Logger, uid uuid.UUID, ...) error
- func FetchAll(api *metax.MetaxService, db *psql.DB, logger zerolog.Logger, uid uuid.UUID, ...) error
- func FetchSince(api *metax.MetaxService, db *psql.DB, logger zerolog.Logger, uid uuid.UUID, ...) error
- func Publish(api *metax.MetaxService, db *psql.DB, id uuid.UUID, owner *models.User) (versionId string, newVersionId string, newQVersionId *uuid.UUID, err error)
- func UnpublishAndDelete(api *metax.MetaxService, db *psql.DB, id uuid.UUID, owner uuid.UUID) error
Constants ¶
View Source
const DefaultRequestTimeout = 15 * time.Second
View Source
const ( // PublishTimeout is how long we wait for response when publishling or unpublishing PublishTimeout = 10 * time.Second )
View Source
const RetryInterval = 10 * time.Second
Variables ¶
View Source
var ( // ErrNoIdentifier means we can't find the Metax dataset identifier in created or updated datasets. ErrNoIdentifier = errors.New("no identifier in dataset") )
Functions ¶
func FetchSince ¶
func Publish ¶
func Publish(api *metax.MetaxService, db *psql.DB, id uuid.UUID, owner *models.User) (versionId string, newVersionId string, newQVersionId *uuid.UUID, err error)
Publish stores a dataset in Metax and updates the Qvain database. It returns the Metax identifier for the dataset, the new version idenifier if such was created, and an error. The error returned can be a Metax ApiError, a Qvain database error, or a basic Go error.
func UnpublishAndDelete ¶
UnpublishAndDelete marks a dataset as removed in Metax and deletes it from the Qvain db. The dataset will no longer be visible in Metax queries unless the ?removed=true parameter is used.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.