Documentation ¶
Overview ¶
Package cellosaurus is an API for the Cellosaurus database.
The Cellosaurus is publicly accessible at:
This API, and all its usage documentation, are available at:
Index ¶
- Constants
- func BadRequest(c *gin.Context)
- func Database() (*sql.DB, error)
- func FindCell(c *gin.Context)
- func GetReleaseInfo(c *gin.Context)
- func Init(c Context)
- func InternalServerError(c *gin.Context)
- func ListCells(c *gin.Context)
- func ListReferences(c *gin.Context)
- func ListTerminologies(c *gin.Context)
- func NotFound(c *gin.Context)
- func Render(c *gin.Context, indent bool, obj interface{})
- func SetMysqlConf()
- type Accession
- type CC
- type Cell
- type Cells
- type Context
- type DI
- type DR
- type Error
- type HI
- type Marker
- type OI
- type OX
- type Reference
- type References
- type Release
- type Route
- type Routes
- type ST
- type Terminologies
- type Terminology
Constants ¶
const ( GET string = "GET" HEAD string = "HEAD" POST string = "POST" PUT string = "PUT" DELETE string = "DELETE" OPTION string = "OPTION" PATCH string = "PATCH" )
HTTP methods.
Variables ¶
This section is empty.
Functions ¶
func BadRequest ¶
BadRequest responds with error status code 400, Bad Request.
func GetReleaseInfo ¶
GetReleaseInfo returns release information for current version of database.
func InternalServerError ¶
InternalServerError responds with error status code 500, Internal Server Error.
func ListReferences ¶
ListReferences handles GET requests for /references.
func ListTerminologies ¶
ListTerminologies returns a list of terminologies used in database.
Types ¶
type CC ¶
type CC struct { Category string `json:"category,omitempty"` Comment string `json:"comment,omitemtpy"` }
CC is a comments data.
type Cell ¶
type Cell struct { ID string `json:"identifier"` AC Accession `json:"accession"` SY []string `json:"synonyms,omitempty"` CA string `json:"category,omitempty"` SX string `json:"sex,omitempty"` DR []DR `json:"cross-references,omitempty"` RX []string `json:"reference-identifiers,omitempty"` WW []string `json:"web-pages,omitempty"` CC []CC `json:"comments,omitempty"` ST ST `json:"str-profile-data,omitempty"` DI []DI `json:"diseases,omitempty"` OX []OX `json:"species-of-origin,omitempty"` HI []HI `json:"hierarchy,omitempty"` OI []OI `json:"same-origin-as,omitempty"` }
Cell is a cell line model.
type Cells ¶
type Cells struct { Meta cellMeta `json:"meta"` Data []Cell `json:"data"` }
Cells is a list of cell lines.
type DI ¶
type DI struct { Terminology string `json:"terminology,omitempty"` Accession string `json:"accession,omitempty"` Disease string `json:"disease,omitempty"` }
DI is a disease data.
type DR ¶
type DR struct { Database string `json:"database,omitempty"` Accession string `json:"accession,omitempty"` }
DR is a cross references data.
type Error ¶
type Error struct { Code int `json:"code"` Status string `json:"status"` Message string `json:"message"` }
Error is a custom error structure.
type HI ¶
type HI struct { Terminology string `json:"terminology,omitempty"` Accession string `json:"accession,omitempty"` DF string `json:"derived-from,omitempty"` }
HI is a hierarchy data.
type OI ¶
type OI struct { Terminology string `json:"terminology,omitempty"` Accession string `json:"accession,omitempty"` Identifier string `json:"identifier,omitempty"` }
OI is a same-origin-as data.
type OX ¶
type OX struct { Terminology string `json:"terminology,omitempty"` Accession string `json:"accession,omitempty"` Species string `json:"species,omitempty"` }
OX is a species of origin data.
type Reference ¶
type Reference struct { RX []string `json:"identifier"` RA []string `json:"authors,omitempty"` RG []string `json:"group/consortium,omitempty"` RT string `json:"title"` RL string `json:"citation"` }
Reference contains reference data for the Cellosaurus.
type References ¶
type References struct { Meta refMeta `json:"meta"` Data []Reference `json:"data"` }
References is a list of Reference.
func (*References) List ¶
func (refs *References) List() error
List returns a list of paginated references.
type Release ¶
type Release struct { Name string `json:"database"` Description string `json:"description"` Stat relStat `json:"release-information"` }
Release models release specific information for the Cellosaurus.
type Route ¶
type Route struct { Method string Endpoint string Handler gin.HandlerFunc }
Route is a routing model.
type ST ¶
type ST struct { Sources []string `json:"sources,omitempty"` Markers []Marker `json:"markers,omitempty"` }
ST is an str profile data.
type Terminologies ¶
type Terminologies []Terminology
Terminologies is a list of Terminology.
func (*Terminologies) List ¶
func (terms *Terminologies) List() error
List returns a list of terminologies.