_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c24300 | train | // CheckAndSetDefaults checks validity of all parameters and sets defaults | {
"resource": ""
} | ||
c24301 | train | // ParseShortcut parses resource shortcut | {
"resource": ""
} | ||
c24302 | train | // walk will walk the ast tree and gather all the variable parts into a slice and return it. | {
"resource": ""
} | ||
c24303 | train | // Creates and returns a new Audit Log object whish will store its logfiles in
// a given directory. Session recording can be disabled by setting
// recordSessions to false. | {
"resource": ""
} | ||
c24304 | train | // CheckAndSetDefaults checks and sets default parameters | {
"resource": ""
} | ||
c24305 | train | // chunkFileNames returns file names of all session chunk files | {
"resource": ""
} | ||
c24306 | train | // createOrGetDownload creates a new download sync entry for a given session,
// if there is no active download in progress, or returns an existing one.
// if the new context has been created, cancel function is returned as a
// second argument. Caller should call this function to signal that download has been
// compl... | {
"resource": ""
} | ||
c24307 | train | // GetSessionChunk returns a reader which console and web clients request
// to receive a live stream of a given session. The reader allows access to a
// session stream range from offsetBytes to offsetBytes+maxBytes | {
"resource": ""
} | ||
c24308 | train | // EmitAuditEvent adds a new event to the log. If emitting fails, a Prometheus
// counter is incremented. | {
"resource": ""
} | ||
c24309 | train | // emitEvent emits event for test purposes | {
"resource": ""
} | ||
c24310 | train | // auditDirs returns directories used for audit log storage | {
"resource": ""
} | ||
c24311 | train | // Closes the audit log, which inluces closing all file handles and releasing
// all session loggers | {
"resource": ""
} | ||
c24312 | train | // periodicSpaceMonitor run forever monitoring how much disk space has been
// used on disk. Values are emitted to a Prometheus gauge. | {
"resource": ""
} | ||
c24313 | train | // New creates a new instance of a directory based backend that implements
// backend.Backend. | {
"resource": ""
} | ||
c24314 | train | // GetKeys returns a list of keys for a given bucket. | {
"resource": ""
} | ||
c24315 | train | // GetVal return a value for a given key in the bucket | {
"resource": ""
} | ||
c24316 | train | // CompareAndSwapVal compares and swap values in atomic operation | {
"resource": ""
} | ||
c24317 | train | // DeleteKey deletes a key in a bucket. | {
"resource": ""
} | ||
c24318 | train | // DeleteBucket deletes the bucket by a given path. | {
"resource": ""
} | ||
c24319 | train | // AcquireLock grabs a lock that will be released automatically in TTL. | {
"resource": ""
} | ||
c24320 | train | // ReleaseLock forces lock release before TTL. | {
"resource": ""
} | ||
c24321 | train | // pathToBucket prepends the root directory to the bucket returning the full
// path to the bucket on the filesystem. | {
"resource": ""
} | ||
c24322 | train | // decodeBucket decodes bucket into parts of path | {
"resource": ""
} | ||
c24323 | train | // isExpired checks if the bucket item is expired or not. | {
"resource": ""
} | ||
c24324 | train | // openBucket will open a file, lock it, and then read in all the items in
// the bucket. | {
"resource": ""
} | ||
c24325 | train | // readBucket will read in the bucket and return a map of keys. The second return
// value returns true to false to indicate if the file was empty or not. | {
"resource": ""
} | ||
c24326 | train | // writeBucket will truncate the file and write out the items to the file f. | {
"resource": ""
} | ||
c24327 | train | // isEmpty checks if the file is empty or not. | {
"resource": ""
} | ||
c24328 | train | // Less is used for Btree operations,
// returns true if item is less than the other one | {
"resource": ""
} | ||
c24329 | train | // Less is used for Btree operations | {
"resource": ""
} | ||
c24330 | train | // NewRemoteCluster is a convenience wa to create a RemoteCluster resource. | {
"resource": ""
} | ||
c24331 | train | // SetLastHeartbeat sets last heartbeat of the cluster | {
"resource": ""
} | ||
c24332 | train | // String represents a human readable version of remote cluster settings. | {
"resource": ""
} | ||
c24333 | train | // UnmarshalRemoteCluster unmarshals remote cluster from JSON or YAML. | {
"resource": ""
} | ||
c24334 | train | // MarshalRemoteCluster marshals remote cluster to JSON. | {
"resource": ""
} | ||
c24335 | train | // New returns new CA from PEM encoded certificate and private
// key. Private Key is optional, if omitted CA won't be able to
// issue new certificates, only verify them | {
"resource": ""
} | ||
c24336 | train | // Subject converts identity to X.509 subject name | {
"resource": ""
} | ||
c24337 | train | // FromSubject returns identity from subject name | {
"resource": ""
} | ||
c24338 | train | // GenerateCertificate generates certificate from request | {
"resource": ""
} | ||
c24339 | train | // HandleExec handles requests of type "exec" which can execute with or
// without a TTY. Result of execution is propagated back on the ExecResult
// channel of the context. | {
"resource": ""
} | ||
c24340 | train | // HandlePTYReq handles requests of type "pty-req" which allocate a TTY for
// "exec" or "shell" requests. The "pty-req" includes the size of the TTY as
// well as the terminal type requested. | {
"resource": ""
} | ||
c24341 | train | // HandleShell handles requests of type "shell" which request a interactive
// shell be created within a TTY. | {
"resource": ""
} | ||
c24342 | train | // HandleWinChange handles requests of type "window-change" which update the
// size of the PTY running on the server and update any other members in the
// party. | {
"resource": ""
} | ||
c24343 | train | // NewServer creates and returns a reverse tunnel server which is fully
// initialized but hasn't been started yet | {
"resource": ""
} | ||
c24344 | train | // disconnectClusters disconnects reverse tunnel connections from remote clusters
// that were deleted from the the local cluster side and cleans up in memory objects.
// In this case all local trust has been deleted, so all the tunnel connections have to be dropped. | {
"resource": ""
} | ||
c24345 | train | // isHostAuthority is called during checking the client key, to see if the signing
// key is the real host CA authority key. | {
"resource": ""
} | ||
c24346 | train | // isUserAuthority is called during checking the client key, to see if the signing
// key is the real user CA authority key. | {
"resource": ""
} | ||
c24347 | train | // checkHostCert verifies that host certificate is signed
// by the recognized certificate authority | {
"resource": ""
} | ||
c24348 | train | // GetSite returns a RemoteSite. The first attempt is to find and return a
// remote site and that is what is returned if a remote remote agent has
// connected to this proxy. Next we loop over local sites and try and try and
// return a local site. If that fails, we return a cluster peer. This happens
// when you hit ... | {
"resource": ""
} | ||
c24349 | train | // newRemoteSite helper creates and initializes 'remoteSite' instance | {
"resource": ""
} | ||
c24350 | train | // Return the cartesian extent of a merged cell range from its origin
// cell (the closest merged cell to the to left of the sheet. | {
"resource": ""
} | ||
c24351 | train | // SetType will set the format string of a column based on the type that you want to set it to.
// This function does not really make a lot of sense. | {
"resource": ""
} | ||
c24352 | train | // SetDataValidation set data validation with zero based start and end.
// Set end to -1 for all rows. | {
"resource": ""
} | ||
c24353 | train | // SetDataValidationWithStart set data validation with a zero basd start row.
// This will apply to the rest of the rest of the column. | {
"resource": ""
} | ||
c24354 | train | // NewStreamFileBuilder creates an StreamFileBuilder that will write to the the provided io.writer | {
"resource": ""
} | ||
c24355 | train | // NewStreamFileBuilderForPath takes the name of an XLSX file and returns a builder for it.
// The file will be created if it does not exist, or truncated if it does. | {
"resource": ""
} | ||
c24356 | train | // AddSheet will add sheets with the given name with the provided headers. The headers cannot be edited later, and all
// rows written to the sheet must contain the same number of cells as the header. Sheet names must be unique, or an
// error will be thrown. | {
"resource": ""
} | ||
c24357 | train | // AddValidation will add a validation to a specific column. | {
"resource": ""
} | ||
c24358 | train | // Build begins streaming the XLSX file to the io, by writing all the XLSX metadata. It creates a StreamFile struct
// that can be used to write the rows to the sheets. | {
"resource": ""
} | ||
c24359 | train | // processEmptySheetXML will take in the path and XML data of an empty sheet, and will save the beginning and end of the
// XML file so that these can be written at the right time. | {
"resource": ""
} | ||
c24360 | train | // removeDimensionTag will return the passed in XLSX Spreadsheet XML with the dimension tag removed.
// data is the XML data for the sheet
// sheet is the Sheet struct that the XML was created from.
// Can return an error if the XML's dimension tag does not match was is expected based on the provided Sheet | {
"resource": ""
} | ||
c24361 | train | // splitSheetIntoPrefixAndSuffix will split the provided XML sheet into a prefix and a suffix so that
// more spreadsheet rows can be inserted in between. | {
"resource": ""
} | ||
c24362 | train | // Write will write a row of cells to the current sheet. Every call to Write on the same sheet must contain the
// same number of cells as the header provided when the sheet was created or an error will be returned. This function
// will always trigger a flush on success. Currently the only supported data type is strin... | {
"resource": ""
} | ||
c24363 | train | // NextSheet will switch to the next sheet. Sheets are selected in the same order they were added.
// Once you leave a sheet, you cannot return to it. | {
"resource": ""
} | ||
c24364 | train | // Close closes the Stream File.
// Any sheets that have not yet been written to will have an empty sheet created for them. | {
"resource": ""
} | ||
c24365 | train | // writeSheetStart will write the start of the Sheet's XML | {
"resource": ""
} | ||
c24366 | train | // writeSheetEnd will write the end of the Sheet's XML | {
"resource": ""
} | ||
c24367 | train | // Format strings are a little strange to compare because empty string needs to be taken as general, and general needs
// to be compared case insensitively. | {
"resource": ""
} | ||
c24368 | train | // splitFormatOnSemicolon will split the format string into the format sections
// This logic to split the different formats on semicolon is fully correct, and will skip all literal semicolons,
// and will catch all breaking semicolons. | {
"resource": ""
} | ||
c24369 | train | // SetError set error notice | {
"resource": ""
} | ||
c24370 | train | // SetDropList data validation range | {
"resource": ""
} | ||
c24371 | train | // Return a new Style structure initialised with the default values. | {
"resource": ""
} | ||
c24372 | train | // Generate the underlying XLSX style elements that correspond to the Style. | {
"resource": ""
} | ||
c24373 | train | // ColIndexToLetters is used to convert a zero based, numeric column
// indentifier into a character code. | {
"resource": ""
} | ||
c24374 | train | // GetCellIDStringFromCoords returns the Excel format cell name that
// represents a pair of zero based cartesian coordinates. | {
"resource": ""
} | ||
c24375 | train | // GetCellIDStringFromCoordsWithFixed returns the Excel format cell name that
// represents a pair of zero based cartesian coordinates.
// It can specify either value as fixed. | {
"resource": ""
} | ||
c24376 | train | // calculateMaxMinFromWorkSheet works out the dimensions of a spreadsheet
// that doesn't have a DimensionRef set. The only case currently
// known where this is true is with XLSX exported from Google Docs.
// This is also true for XLSX files created through the streaming APIs. | {
"resource": ""
} | ||
c24377 | train | // makeRowFromRaw returns the Row representation of the xlsxRow. | {
"resource": ""
} | ||
c24378 | train | // fillCellDataFromInlineString attempts to get inline string data and put it into a Cell. | {
"resource": ""
} | ||
c24379 | train | // readSheetsFromZipFile is an internal helper function that loops
// over the Worksheets defined in the XSLXWorkbook and loads them into
// Sheet objects stored in the Sheets slice of a xlsx.File struct. | {
"resource": ""
} | ||
c24380 | train | // truncateSheetXML will take in a reader to an XML sheet file and will return a reader that will read an equivalent
// XML sheet file with only the number of rows specified. This greatly speeds up XML unmarshalling when only
// a few rows need to be read from a large sheet.
// When sheets are truncated, all formatting... | {
"resource": ""
} | ||
c24381 | train | // FileToSliceUnmerged is a wrapper around File.ToSliceUnmerged.
// It returns the raw data contained in an Excel XLSX file as three
// dimensional slice. Merged cells will be unmerged. Covered cells become the
// values of theirs origins. | {
"resource": ""
} | ||
c24382 | train | // Add a new Row to a Sheet at a specific index | {
"resource": ""
} | ||
c24383 | train | // Removes a row at a specific index | {
"resource": ""
} | ||
c24384 | train | // When merging cells, the cell may be the 'original' or the 'covered'.
// First, figure out which cells are merge starting points. Then create
// the necessary cells underlying the merge area.
// Then go through all the underlying cells and apply the appropriate
// border, based on the original cell. | {
"resource": ""
} | ||
c24385 | train | //GetTime returns the value of a Cell as a time.Time | {
"resource": ""
} | ||
c24386 | train | // SetDateWithOptions allows for more granular control when exporting dates and times | {
"resource": ""
} | ||
c24387 | train | // setNumeric sets a cell's value to a number | {
"resource": ""
} | ||
c24388 | train | // getNumberFormat will update the parsedNumFmt struct if it has become out of date, since a cell's NumFmt string is a
// public field that could be edited by clients. | {
"resource": ""
} | ||
c24389 | train | // FormattedValue returns a value, and possibly an error condition
// from a Cell. If it is possible to apply a format to the cell
// value, it will do so, if not then an error will be returned, along
// with the raw value of the Cell. | {
"resource": ""
} | ||
c24390 | train | //Validate performs validation of the fields of a Connect packet | {
"resource": ""
} | ||
c24391 | train | // govern which incoming messages are persisted | {
"resource": ""
} | ||
c24392 | train | // SetClientID will set the client id to be used by this client when
// connecting to the MQTT broker. According to the MQTT v3.1 specification,
// a client id mus be no longer than 23 characters. | {
"resource": ""
} | ||
c24393 | train | // SetCleanSession will set the "clean session" flag in the connect message
// when this client connects to an MQTT broker. By setting this flag, you are
// indicating that no messages saved by the broker for this client should be
// delivered. Any messages that were going to be sent by this client before
// diconnecti... | {
"resource": ""
} | ||
c24394 | train | // SetOrderMatters will set the message routing to guarantee order within
// each QoS level. By default, this value is true. If set to false,
// this flag indicates that messages can be delivered asynchronously
// from the client to the application and possibly arrive out of order. | {
"resource": ""
} | ||
c24395 | train | // SetStore will set the implementation of the Store interface
// used to provide message persistence in cases where QoS levels
// QoS_ONE or QoS_TWO are used. If no store is provided, then the
// client will use MemoryStore by default. | {
"resource": ""
} | ||
c24396 | train | // SetProtocolVersion sets the MQTT version to be used to connect to the
// broker. Legitimate values are currently 3 - MQTT 3.1 or 4 - MQTT 3.1.1 | {
"resource": ""
} | ||
c24397 | train | // SetOnConnectHandler sets the function to be called when the client is connected. Both
// at initial connection time and upon automatic reconnect. | {
"resource": ""
} | ||
c24398 | train | // SetConnectionLostHandler will set the OnConnectionLost callback to be executed
// in the case where the client unexpectedly loses connection with the MQTT broker. | {
"resource": ""
} | ||
c24399 | train | // SetWriteTimeout puts a limit on how long a mqtt publish should block until it unblocks with a
// timeout error. A duration of 0 never times out. Default 30 seconds | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.