tap

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tap asks a Table Access Protocol service one question in ADQL and waits for the answer. The archives here that hold tables of observations and of stars answer this way.

Index

Constants

View Source
const (
	CSV = "csv" // defined: TAP 1.1, values split by commas
)

The formats an answer may be asked for in.

View Source
const Every = 0

Every asks Search for every row. It's defined by Search.

Variables

This section is empty.

Functions

func Query

func Query(get web.Web, sync, adql string) (*votable.Table, error)

Query asks a service's sync endpoint one ADQL query and reads the VOTable it answers with. When the service says the query failed, Query gives what it said.

func Search(top int, columns, table string, near *celestialdata.Near, and,
	order string) string

Search is the ADQL query for some columns of a table's rows whose ra and dec columns fall in a circle. top keeps that many rows, or Every does not limit them. and is a further condition, or none. order is what the rows are sorted by, or none.

func URL

func URL(sync, adql, format string) string

URL is the address that asks a service's sync endpoint one ADQL query, for an answer in a format.

func Within

func Within(near *celestialdata.Near, ra, dec string) string

Within is the ADQL condition that a table's columns of right ascension and declination fall within a circle.

Types

type Jobs

type Jobs struct {
	// contains filtered or unexported fields
}

Jobs is a web that runs a query asked of a service's async endpoint as a job. Asked for such a query's address, as URL makes it, it submits the query, asks after the job every so often until it is complete, and opens its answer. It asks the web under it for anything else unchanged.

It says each job's address when it is submitted and when it is complete, so a fetch says which job its file came from.

func NewJobs

func NewJobs(under web.Web, every time.Duration, asks int,
	told io.Writer) (*Jobs, error)

NewJobs is a web of jobs over under, which asks after a job every so often and at most asks times, and says each job's address to told. It refuses no web under it, a wait that is not one, fewer than one ask, and no one to tell.

func (*Jobs) Get

func (jobs *Jobs) Get(address string) (io.ReadCloser, int64, error)

Get opens what an address holds. For a query asked of an async endpoint, that is the job's answer, once the job is complete.

func (*Jobs) Head

func (jobs *Jobs) Head(address string) (int64, error)

Head is the length of what an address holds. A job's answer has none until it has run, and asking would run it, so for a job it is unsaid.

func (*Jobs) Post

func (jobs *Jobs) Post(address string, form url.Values) (string, error)

Post sends a form through the web under it.

Jump to

Keyboard shortcuts

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