_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c6200 | // Internal implementation of Authenticate
//
// Call with authLock held | |
c6201 | // Get an authToken and url
//
// The Url may be updated if it needed to authenticate using the OnReAuth function | |
c6202 | // flushKeepaliveConnections is called to flush pending requests after an error. | |
c6203 | // UnAuthenticate removes the authentication from the Connection. | |
c6204 | // Authenticated returns a boolean to show if the current connection
// is authenticated.
//
// Doesn't actually check the credentials against the server. | |
c6205 | // readLines reads the response into an array of strings.
//
// Closes the response when done | |
c6206 | // readJson reads the response into the json type passed in
//
// Closes the response when done | |
c6207 | // parse the ContainerOpts | |
c6208 | // ContainerNames returns a slice of names of containers in this account. | |
c6209 | // Containers returns a slice of structures with full information as
// described in Container. | |
c6210 | // containersAllOpts makes a copy of opts if set or makes a new one and
// overrides Limit and Marker | |
c6211 | // ContainersAll is like Containers but it returns all the Containers
//
// It calls Containers multiple times using the Marker parameter
//
// It has a default Limit parameter but you may pass in your own | |
c6212 | // ContainerNamesAll is like ContainerNamess but it returns all the Containers
//
// It calls ContainerNames multiple times using the Marker parameter
//
// It has a default Limit parameter but you may pass in your own | |
c6213 | // parse reads values out of ObjectsOpts | |
c6214 | // ObjectNames returns a slice of names of objects in a given container. | |
c6215 | // objectsAllOpts makes a copy of opts if set or makes a new one and
// overrides Limit and Marker
// Marker is not overriden if KeepMarker is set | |
c6216 | // ObjectsAll is like Objects but it returns an unlimited number of Objects in a slice
//
// It calls Objects multiple times using the Marker parameter | |
c6217 | // ObjectNamesAll is like ObjectNames but it returns all the Objects
//
// It calls ObjectNames multiple times using the Marker parameter. Marker is
// reset unless KeepMarker is set
//
// It has a default Limit parameter but you may pass in your own | |
c6218 | // getInt64FromHeader is a helper function to decode int64 from header. | |
c6219 | // Account returns info about the account in an Account struct. | |
c6220 | // AccountUpdate adds, replaces or remove account metadata.
//
// Add or update keys by mentioning them in the Headers.
//
// Remove keys by setting them to an empty string. | |
c6221 | // ContainerCreate creates a container.
//
// If you don't want to add Headers just pass in nil
//
// No error is returned if it already exists but the metadata if any will be updated. | |
c6222 | // ContainerDelete deletes a container.
//
// May return ContainerDoesNotExist or ContainerNotEmpty | |
c6223 | // Container returns info about a single container including any
// metadata in the headers. | |
c6224 | // Write bytes to the object - see io.Writer | |
c6225 | // objectPutHeaders create a set of headers for a PUT
//
// It guesses the contentType from the objectName if it isn't set
//
// checkHash may be changed | |
c6226 | // ObjectPutString creates an object from a string in a container.
//
// This is a simplified interface which checks the MD5 | |
c6227 | // Read bytes from the object - see io.Reader | |
c6228 | // Length gets the objects content length either from a cached copy or
// from the server. | |
c6229 | // Close the object and checks the length and md5sum if it was
// required and all the object was read | |
c6230 | // ObjectGetString returns an object as a string.
//
// This is a simplified interface which checks the MD5 | |
c6231 | // ObjectDelete deletes the object.
//
// May return ObjectNotFound if the object isn't found | |
c6232 | // ObjectTempUrl returns a temporary URL for an object | |
c6233 | // parseResponseStatus parses string like "200 OK" and returns Error.
//
// For status codes beween 200 and 299, this returns nil. | |
c6234 | // urlPathEscape escapes URL path the in string using URL escaping rules
//
// This mimics url.PathEscape which only available from go 1.8 | |
c6235 | // ObjectCopy does a server side copy of an object to a new position
//
// All metadata is preserved. If metadata is set in the headers then
// it overrides the old metadata on the copied object.
//
// The destination container must exist before the copy.
//
// You can use this to copy an object to itself - this is the only way
// to update the content type of an object. | |
c6236 | // ObjectMove does a server side move of an object to a new position
//
// This is a convenience method which calls ObjectCopy then ObjectDelete
//
// All metadata is preserved.
//
// The destination container must exist before the copy. | |
c6237 | // ObjectUpdateContentType updates the content type of an object
//
// This is a convenience method which calls ObjectCopy
//
// All other metadata is preserved. | |
c6238 | // VersionEnable enables versioning on the current container with version as the tracking container.
//
// May return Forbidden if this isn't supported by the server | |
c6239 | // VersionDisable disables versioning on the current container. | |
c6240 | // Reset a timer - Doesn't work properly < go 1.1
//
// This is quite hard to do properly under go < 1.1 so we do a crude
// approximation and hope that everyone upgrades to go 1.1 quickly | |
c6241 | // StringWidth return width as you can see | |
c6242 | // FillRight return string filled in left by spaces in w cells | |
c6243 | // `computeRootHash` computes the root hash with leaf node.
// Does not verify the root hash. | |
c6244 | // `computeRootHash` computes the root hash assuming some leaf hash.
// Does not verify the root hash. | |
c6245 | // returns -1 if invalid. | |
c6246 | // PrintTree prints the whole tree in an indented form. | |
c6247 | // NewNode returns a new node from a key, value and version. | |
c6248 | // String returns a string representation of the node. | |
c6249 | // clone creates a shallow copy of a node with its hash set to nil. | |
c6250 | // Check if the node has a descendant with the given key. | |
c6251 | // Get a key under the node. | |
c6252 | // Computes the hash of the node without computing its descendants. Must be
// called on nodes which have descendant node hashes already computed. | |
c6253 | // Hash the node and its descendants recursively. This usually mutates all
// descendant nodes. Returns the node hash and number of nodes hashed. | |
c6254 | // Writes the node's hash to the given io.Writer. This function expects
// child hashes to be already set. | |
c6255 | // Writes the node's hash to the given io.Writer.
// This function has the side-effect of calling hashWithCount. | |
c6256 | // Writes the node as a serialized byte slice to the supplied io.Writer. | |
c6257 | // traverse is a wrapper over traverseInRange when we want the whole tree | |
c6258 | // Only used in testing... | |
c6259 | // pathToLeaf is a helper which recursively constructs the PathToLeaf.
// As an optimization the already constructed path is passed in as an argument
// and is shared among recursive calls. | |
c6260 | // Verify that proof is valid. | |
c6261 | // ComputeRootHash computes the root hash with leaves.
// Returns nil if error or proof is nil.
// Does not verify the root hash. | |
c6262 | // GetVersionedWithProof gets the value under the key at the specified version
// if it exists, or returns nil. | |
c6263 | // NewImmutableTree creates both in-memory and persistent instances | |
c6264 | // String returns a string representation of Tree. | |
c6265 | // Size returns the number of leaf nodes in the tree. | |
c6266 | // Height returns the height of the tree. | |
c6267 | // Has returns whether or not a key exists. | |
c6268 | // Hash returns the root hash. | |
c6269 | // hashWithCount returns the root hash and hash count. | |
c6270 | // Get returns the index and value of the specified key if it exists, or nil
// and the next index, if it doesn't. | |
c6271 | // GetByIndex gets the key and value at the specified index. | |
c6272 | // Iterate iterates over all keys of the tree, in order. | |
c6273 | // Clone creates a clone of the tree.
// Used internally by MutableTree. | |
c6274 | // nodeSize is like Size, but includes inner nodes too. | |
c6275 | // NewMutableTree returns a new tree with the specified cache size and datastore. | |
c6276 | // Hash returns the hash of the latest saved version of the tree, as returned
// by SaveVersion. If no versions have been saved, Hash returns nil. | |
c6277 | // Set sets a key in the working tree. Nil values are not supported. | |
c6278 | // Remove removes a key from the working tree. | |
c6279 | // remove tries to remove a key from the tree and if removed, returns its
// value, nodes orphaned and 'true'. | |
c6280 | // Returns the version number of the latest version found | |
c6281 | // LoadVersionOverwrite returns the version number of targetVersion.
// Higher versions' data will be deleted. | |
c6282 | // GetImmutable loads an ImmutableTree at a given version for querying | |
c6283 | // Rollback resets the working tree to the latest saved version, discarding
// any unsaved modifications. | |
c6284 | // GetVersioned gets the value at the specified key and version. | |
c6285 | // SaveVersion saves a new tree version to disk, based on the current state of
// the tree. Returns the hash and new version number. | |
c6286 | // DeleteVersion deletes a tree version from disk. The version can then no
// longer be accessed. | |
c6287 | // deleteVersionsFrom deletes tree version from disk specified version to latest version. The version can then no
// longer be accessed. | |
c6288 | // Rotate right and return the new node and orphan. | |
c6289 | // Rotate left and return the new node and orphan. | |
c6290 | // GetNode gets a node from cache or disk. If it is an inner node, it does not
// load its children. | |
c6291 | // SaveNode saves a node to disk. | |
c6292 | // Has checks if a hash exists in the database. | |
c6293 | // DeleteVersion deletes a tree version from disk. | |
c6294 | // Saves a single orphan to disk. | |
c6295 | // deleteOrphans deletes orphaned nodes from disk, and the associated orphan
// entries. | |
c6296 | // deleteRoot deletes the root entry from disk, but not the node it points to. | |
c6297 | // Traverse orphans ending at a certain version. | |
c6298 | // Traverse all keys. | |
c6299 | // Traverse all keys with a certain prefix. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.