Documentation ¶
Overview ¶
Package api implements the htsget readset retrieval API.
The version implemented by this package is v1.0.0 defined at: http://samtools.github.io/hts-specs/htsget.html.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientFromBearerToken ¶
NewClientFromBearerToken constructs a storage client that uses the OAuth2 bearer token found in req to make storage requests. It returns the authorization header containing the bearer token as well to allow subsequent requests to be authenticated correctly.
func NewDefaultClient ¶
NewDefaultClient returns a storage client that uses the application default credentials. It caches the storage client for efficiency.
Types ¶
type NewStorageClientFunc ¶
NewStorageClientFunc is the type of function that constructs the appropriate storage.Client to satisfy the incoming request. Any headers that caused this particular client to be created are returned to allow block requests to be generated correctly.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides an htsget protocol server. Must be created with NewServer.
func NewServer ¶
func NewServer(newStorageClient NewStorageClientFunc, blockSizeLimit uint64) *Server
NewServer returns a new Server configured to use newStorageClient and blockSizeLimit. The server will call storageClientFunc on each request to determine which GCS storage client to use.