file

package
v0.0.0-...-1cfe57a Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ingest

func Ingest(ingestInfo helpers.FileInfo) error

Ingest triggers the ingestion of a file via the SDA API. Depending on the provided fields in ingestInfo: - If ingestInfo.Id is empty, it sends a POST request to /file/ingest with a JSON body containing the file path and user. - If ingestInfo.Id is set, it sends a POST request to /file/ingest with the fileid as a query parameter and no JSON body.

func List

func List(apiURI, token, username string) error

List returns all files

func RotateKey

func RotateKey(apiURI, token, fileID string) error

RotateKey rotates the encryption key for a file

func SetAccession

func SetAccession(accessionInfo helpers.FileInfo) error

SetAccession assigns an accession ID to a file via the SDA API. Depending on the provided fields in accessionInfo: - If accessionInfo.Id is empty, it sends a POST request to /file/accession with a JSON body containing accession_id, filepath, and user. - If accessionInfo.Id is set, it sends a POST request to /file/accession with fileid and accessionid as query parameters.

Types

type RequestBodyFileAccession

type RequestBodyFileAccession struct {
	AccessionID string `json:"accession_id"`
	Filepath    string `json:"filepath"`
	User        string `json:"user"`
}

type RequestBodyFileIngest

type RequestBodyFileIngest struct {
	Filepath string `json:"filepath"`
	User     string `json:"user"`
}

Jump to

Keyboard shortcuts

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