beacon

package
v0.0.0-...-6d0372d Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package beacon implements a GA4GH Beacon API (https://github.com/ga4gh-beacon/specification/blob/master/beacon.md).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationMode

type AuthenticationMode uint

AuthenticationMode defines what authentication credentials the server uses to connect to BigQuery.

const (
	// ServiceAuth will configure the server to use its service account credentials to access the
	// BigQuery datasets.
	ServiceAuth AuthenticationMode = iota
	// UserAuth will configure the server to use the authentication header provided in the request to
	// access the BigQuery datasets.
	UserAuth
)

type Server

type Server struct {
	// ProjectID is the GCloud project ID.
	ProjectID string
	// TableID is the ID of the allele BigQuery table to query.
	// Must be provided in the following format: bigquery-project.dataset.table.
	TableID string
	// AuthMode determines the authentication provider for the BigQuery client.
	AuthMode AuthenticationMode
}

Server provides handlers for Beacon API requests.

func (*Server) About

func (api *Server) About(w http.ResponseWriter, r *http.Request)

About retrieves all the necessary information on the beacon and the API.

func (*Server) Export

func (server *Server) Export(mux *http.ServeMux)

Export registers the beacon API endpoint with mux.

func (*Server) Query

func (api *Server) Query(w http.ResponseWriter, r *http.Request)

Query retrieves whether the requested allele exists in the dataset.

Jump to

Keyboard shortcuts

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