Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source interface { // CanonicalURI converts a source URI to its canonical form. The result // should be byte-wise identical to all other canonicalized URIs which // refer to the same location. // // CanonicalURI is called with an absolute URI which doesn't contain // successive slashes. It starts with the source name (e.g. "/foo/..."). // // If the URI is know to be invalid, an error should be returned. CanonicalURI(uri string) (string, error) // OpenURI for reading an object. The argument is a URI returned by // CanonicalizeURI. // // If the object's size exceeds maxSize, the object is not to be opened. // The reader is not necessarily drained, but it will be closed. The // reader must produce exactly contentLength's worth of bytes when read in // full. // // Not-found condition can be signaled by returning nil content with zero // length. Content-too-long condition can be signaled by returning nil // content with nonzero length (doesn't have to be actual content length). OpenURI( ctx Context, uri string, maxSize int, ) ( content io.ReadCloser, contentLength int64, err error, ) }
Source of immutable data.
Click to show internal directories.
Click to hide internal directories.