Documentation ¶
Index ¶
Constants ¶
const (
// GzipCompression indicates blob was compressed using compress/gzip package
GzipCompression = "compress/gzip"
)
the following constants are all compressions that have ever been used, names should describe the package used
const (
// JSONEncoding indicates blob was encoded as JSON
JSONEncoding = "json"
)
the following constants are all encoding formats that have ever been used
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Blob ¶
Blob is the entity that gets handled by blobstore
type Key ¶
Key identifies a blob
func NewKey ¶
NewKey constructs a new valid key or returns error on any input that produces an invalid key A valid key is of form foo_bar_baz_raz.ext The section before the period is considered the key name and the piece after the period is considered the extension Pieces are combined to form the key name and pieces are separated by underscores Keys are immutable
func NewKeyFromString ¶
NewKeyFromString constructs a valid key from string or returns error if input produces invalid key
type WrapFn ¶
WrapFn adds a single layer to a blob's wrapping; will update wrapper metadata tag and potentially modify body. WrapFn can leave input blob in an invalid state, but will always return an error in such cases.
func GzipCompressed ¶
func GzipCompressed() WrapFn
GzipCompressed returns a WrapFn used to compresses body using gzip and indicates that at the compression layer gzip was used
func JSONEncoded ¶
func JSONEncoded() WrapFn
JSONEncoded returns a WrapFn used to indicate that at the encoding layer json was used
type WrappingLayers ¶
WrappingLayers indicates the values of every wrapping layer of a blob, nil fields indicate that blob was not wrapped with layer.