_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c172300 | // Remove deletes all files with the provided name from the GridFS. | |
c172301 | // SetChunkSize sets size of saved chunks. Once the file is written to, it
// will be split in blocks of that size and each block saved into an
// independent chunk document. The default chunk size is 256kb.
//
// It is a runtime error to call this function once the file has started
// being written to. | |
c172302 | // SetId changes the current file Id.
//
// It is a runtime error to call this function once the file has started
// being written to, or when the file is not open for writing. | |
c172303 | // SetName changes the optional file name. An empty string may be used to
// unset it.
//
// It is a runtime error to call this function when the file is not open
// for writing. | |
c172304 | // ContentType changes the optional file content type. An empty string may be
// used to unset it.
//
// It is a runtime error to call this function when the file is not open
// for writing. | |
c172305 | // Size returns the file size in bytes. | |
c172306 | // SetUploadDate changes the file upload time.
//
// It is a runtime error to call this function when the file is not open
// for writing. | |
c172307 | // Abort cancels an in-progress write, preventing the file from being
// automically created and ensuring previously written chunks are
// removed when the file is closed.
//
// It is a runtime error to call Abort when the file was not opened
// for writing. | |
c172308 | // Write writes the provided data to the file and returns the
// number of bytes written and an error in case something
// wrong happened.
//
// The file will internally cache the data so that all but the last
// chunk sent to the database have the size defined by SetChunkSize.
// This also means that errors may be def... | |
c172309 | // Read reads into b the next available data from the file and
// returns the number of bytes written and an error in case
// something wrong happened. At the end of the file, n will
// be zero and err will be set to os.EOF.
//
// The parameters and behavior of this function turn the file
// into an io.Reader. | |
c172310 | // setCursorPosition sets the cursor to the specified position, bounded to the screen size | |
c172311 | // collectAnsiIntoWindowsAttributes modifies the passed Windows text mode flags to reflect the
// request represented by the passed ANSI mode. | |
c172312 | // invertAttributes inverts the foreground and background colors of a Windows attributes value | |
c172313 | // simulateLF simulates a LF or CR+LF by scrolling if necessary to handle the
// current cursor position and scroll region settings, in which case it returns
// true. If no special handling is necessary, then it does nothing and returns
// false.
//
// In the false case, the caller should ensure that a carriage return
... | |
c172314 | // executeLF executes a LF without a CR. | |
c172315 | // effectiveSr gets the current effective scroll region in buffer coordinates | |
c172316 | // scroll scrolls the provided scroll region by param lines. The scroll region is in buffer coordinates. | |
c172317 | // scrollLine scrolls a line horizontally starting at the provided position by a number of columns. | |
c172318 | // bytesToHex converts a slice of bytes to a human-readable string. | |
c172319 | // Can we change this to be an io.ReadCloser return | |
c172320 | // A transformer function can be used to do post-download
// processing on the file before it is stored in the cache. | |
c172321 | // Currently populateCache takes a transformer due to the fact that a fetchCachedDirectory
// uses only a TarTransformer, which overwrites what is currently set. This way one transformer
// can be used to call Fetch and FetchAsDirectory | |
c172322 | // Log calls UI.Log to write.
// LogFGColor and LogBGColor are used for color. | |
c172323 | // Output calls UI.Output to write.
// OutputFGColor and OutputBGColor are used for color. | |
c172324 | // Success calls UI.Success to write.
// Useful when you want separate colors or prefixes.
// SuccessFGColor and SuccessBGColor are used for color. | |
c172325 | // Info calls UI.Info to write.
// Useful when you want separate colors or prefixes.
// InfoFGColor and InfoBGColor are used for color. | |
c172326 | // Error calls UI.Error to write.
// ErrorFGColor and ErrorBGColor are used for color. | |
c172327 | // Warn calls UI.Warn to write.
// Useful when you want separate colors or prefixes.
// WarnFGColor and WarnBGColor are used for color. | |
c172328 | // Running calls UI.Running to write.
// Useful when you want separate colors or prefixes.
// RunningFGColor and RunningBGColor are used for color. | |
c172329 | // Log prefixes to message before writing to Writer. | |
c172330 | // Output simply writes to Writer. | |
c172331 | // Error writes message to ErrorWriter. | |
c172332 | // Log calls UI.Log to write.
// LogPrefix is used to prefix the message. | |
c172333 | // Output calls UI.Output to write.
// OutputPrefix is used to prefix the message. | |
c172334 | // Success calls UI.Success to write.
// Useful when you want separate colors or prefixes.
// SuccessPrefix is used to prefix the message. | |
c172335 | // Info calls UI.Info to write.
// Useful when you want separate colors or prefixes.
// InfoPrefix is used to prefix the message. | |
c172336 | // Error call UI.Error to write.
// ErrorPrefix is used to prefix the message. | |
c172337 | // Warn calls UI.Warn to write.
// Useful when you want separate colors or prefixes.
// WarnPrefix is used to prefix message. | |
c172338 | // Running calls Output to write.
// Useful when you want separate colors or prefixes.
// RunningPrefix is used to prefix message. | |
c172339 | //New creates a BasicUI.
//This should be the first function you call.
//This is not thread safe and should only be used in serial applications. | |
c172340 | //AddColor will wrap a colorful UI on top of ui.
//Use wlog's color variables for the color.
//All background colors are not changed by this function but you are able to change them manually.
//Just create this structure manually and change any of the background colors you want.
//Arguments are in alphabetical order. | |
c172341 | // Log calls UI.Log to write.
// This is a thread safe function. | |
c172342 | // NewMongoStore returns a new MongoStore.
// Set ensureTTL to true let the database auto-remove expired object by maxAge. | |
c172343 | // New returns a session for the given name without adding it to the registry. | |
c172344 | // Push pushes a segment id onto the segment stack. | |
c172345 | // Pop pops a segment id off of the segment stack. It returns false if the stack is empty. | |
c172346 | // Peek returns id from the top of the stack. It returns rootSegment if the stack is empty. | |
c172347 | // RecordMetricsWithRecorder records metrics with the given recorder. | |
c172348 | // Init initializes the embedded newrelic agent with the given app name and license key. | |
c172349 | // errNo returns an error if the errno is < 0 | |
c172350 | // caller returns the name of the function that called the function this function was called from. | |
c172351 | /**
* Start the CollectorClient and the harvester thread that sends application
* performance data to New Relic once a minute.
*
* @param license New Relic account license key
* @param app_name name of instrumented application
* @param language name of application programming language
* @param language_versio... | |
c172352 | /**
* Tell the CollectorClient to shutdown and stop reporting application
* performance data to New Relic.
*
* @reason reason for shutdown request
* @return 0 on success, error code on error, else warning code
*/ | |
c172353 | // NewTx returns a new transaction. | |
c172354 | // NewRequestTx returns a new transaction with a request url. | |
c172355 | // NewBackgroundTx returns a new background transaction | |
c172356 | // Start starts a transaction, setting the id. | |
c172357 | // End ends a transaction. | |
c172358 | // StartGeneric starts a generic segment. | |
c172359 | // StartDatastore starts a datastore segment. | |
c172360 | // StartExternal starts an external segment. | |
c172361 | // EndSegment ends the segment at the top of the stack. | |
c172362 | // ReportError reports an error that occured during the transaction. | |
c172363 | // WithTx inserts a newrelic.Tx into the provided context. | |
c172364 | // FromContext returns a newrelic.Tx from the context. | |
c172365 | // TraceExternal adds an external segment to the newrelic transaction, if one exists in the context. | |
c172366 | // TraceGeneric adds a generic segment to the newrelic transaction, if one exists in the context. | |
c172367 | // TraceDatastore adds a datastore segment to the newrelic transaction, if one exists in the context. | |
c172368 | // trace is a helper function for TraceExternal and TraceGeneric, you probably don't want
// to use it directly. | |
c172369 | // Static returns a middleware handler that serves static files in the given directory. | |
c172370 | // Purge is used to completely clear the cache. | |
c172371 | // RemoveOldest removes the oldest item from the cache. | |
c172372 | // removeElement is used to remove a given list element from the cache | |
c172373 | // DefaultCluster returns the default Cluster. | |
c172374 | // NewClusterWithHost returns a cluster with the given URIs. | |
c172375 | // AddHost adds a host to the cluster. | |
c172376 | // Host returns a host in the cluster. | |
c172377 | // RemoveHost black lists the host with the given URI from the cluster. | |
c172378 | // Hosts returns all available hosts in the cluster. | |
c172379 | // Less returns true if this column sorts before the given Record. | |
c172380 | // Less returns true if this field value sorts before the given Record. | |
c172381 | // Index returns an index with a name. | |
c172382 | // Indexes return a copy of the indexes in this schema | |
c172383 | // HasIndex returns true if the given index is in the schema. | |
c172384 | // NewPQLBaseQuery creates a new PQLQuery with the given PQL and index. | |
c172385 | // Add adds a query to the batch. | |
c172386 | // NewPQLRowQuery creates a new PqlRowQuery. | |
c172387 | // String serializes this index to a JSON string. | |
c172388 | // OptIndexKeys sets whether index uses string keys. | |
c172389 | // OptIndexTrackExistence enables keeping track of existence of columns. | |
c172390 | // NewIndex creates an index with a name. | |
c172391 | // Fields return a copy of the fields in this index | |
c172392 | // HasFields returns true if the given field exists in the index. | |
c172393 | // Field creates a Field struct with the specified name and defaults. | |
c172394 | // BatchQuery creates a batch query with the given queries. | |
c172395 | // RawQuery creates a query with the given string.
// Note that the query is not validated before sending to the server. | |
c172396 | // Intersect creates an Intersect query.
// Intersect performs a logical AND on the results of each ROW_CALL query passed to it. | |
c172397 | // Not creates a Not query. | |
c172398 | // Count creates a Count query.
// Returns the number of set columns in the ROW_CALL passed in. | |
c172399 | // Options creates an Options query. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.