nr

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveNames

func ResolveNames(url, loc string, ngc []byte, batch int, accs map[string]bool) (map[string]*Accession, error)

url: the endpoint for ResolveNames to use, otherwise default will be used. loc: the location to request the files to be in. ngc: the bytes that represent an ngc file, authorizing access to accessions batch: the number of accessions to ask for at once in one request. accs: the accessions to resolve names for.

Types

type Accession

type Accession struct {
	ID string `json:"accession,omitempty"`

	Files map[string]File
	// contains filtered or unexported fields
}

func (*Accession) AppendError added in v0.0.3

func (a *Accession) AppendError(message string)

func (*Accession) ErrorLog added in v0.0.3

func (a *Accession) ErrorLog() string

func (*Accession) HasError added in v0.0.3

func (a *Accession) HasError() bool

type File

type File struct {
	Name           string    `json:"name,omitempty"`
	Size           string    `json:"size,omitempty"`
	Type           string    `json:"type,omitempty"`
	ModifiedDate   time.Time `json:"modificationDate,omitempty"`
	Md5Hash        string    `json:"md5,omitempty"`
	Link           string    `json:"link,omitempty"`
	ExpirationDate time.Time `json:"expirationDate,omitempty"`
	Service        string    `json:"service,omitempty"`
}

type Payload

type Payload struct {
	ID      string `json:"accession,omitempty"`
	Status  int    `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
	Files   []File `json:"files,omitempty"`
}

Jump to

Keyboard shortcuts

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