nmdc

package
v0.0.0-...-08568b3 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabase

func NewDatabase() (databases.Database, error)

Types

type DataGeneration

type DataGeneration struct {
	AssociatedStudies []string
}

type DataObject

type DataObject struct {
	FileSizeBytes          int            `json:"file_size_bytes"`
	MD5Checksum            string         `json:"md5_checksum"`
	DataObjectType         string         `json:"data_object_type"`
	CompressionType        string         `json:"compression_type"`
	URL                    string         `json:"url"`
	Type                   string         `json:"type"`
	Id                     string         `json:"id"`
	Name                   string         `json:"name"`
	Description            string         `json:"description"`
	WasGeneratedBy         DataGeneration `json:"was_informed_by"`
	AlternativeIdentifiers []string       `json:"alternative_identifiers,omitempty"`
}

data object type for JSON marshalling (see https://microbiomedata.github.io/nmdc-schema/DataObject/)

type Database

type Database struct {
	// HTTP client that caches queries
	Client http.Client
	// authorization info
	Auth authorization
	// mapping of host URLs to endpoints
	EndpointForHost map[string]string
}

file database appropriate for handling searches and transfers (implements the databases.Database interface)

func (*Database) Load

func (db *Database) Load(state databases.DatabaseSaveState) error

func (Database) LocalUser

func (db Database) LocalUser(orcid string) (string, error)

func (Database) Resources

func (db Database) Resources(orcid string, fileIds []string) ([]frictionless.DataResource, error)

func (Database) Save

func (*Database) Search

func (db *Database) Search(orcid string, params databases.SearchParameters) (databases.SearchResults, error)

func (Database) SpecificSearchParameters

func (db Database) SpecificSearchParameters() map[string]interface{}

func (Database) StageFiles

func (db Database) StageFiles(orcid string, fileIds []string) (uuid.UUID, error)

func (Database) StagingStatus

func (db Database) StagingStatus(id uuid.UUID) (databases.StagingStatus, error)

Jump to

Keyboard shortcuts

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