_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c14700 | // Extensions requests the list of active registered extensions. | |
c14701 | // RegisterExtension registers the extension plugins with the osquery process. | |
c14702 | // Options requests the list of bootstrap or configuration options. | |
c14703 | // Query requests a query to be run and returns the extension response.
// Consider using the QueryRow or QueryRows helpers for a more friendly
// interface. | |
c14704 | // QueryRows is a helper that executes the requested query and returns the
// results. It handles checking both the transport level errors and the osquery
// internal errors by returning a normal Go error type. | |
c14705 | // QueryRow behaves similarly to QueryRows, but it returns an error if the
// query does not return exactly one row. | |
c14706 | // NewPlugin takes the distributed query functions and returns a struct
// implementing the OsqueryPlugin interface. Use this to wrap the appropriate
// functions into an osquery plugin. | |
c14707 | // UnmarshalJSON marshals a json string that is convertable to an int, for
// example "234" -> 234. | |
c14708 | // UnmarshalJSON turns structurally inconsistent osquery json into a ResultsStruct. | |
c14709 | // CreatePersonTable uses db to create a new table for Person models, and returns the result | |
c14710 | // InsertPerson inserts person into db | |
c14711 | // SelectPerson selects a person with the given first & last names and age. On success, writes the result into result and on failure, returns a non-nil error and makes no modifications to result | |
c14712 | // UpdatePerson updates the person with the given first & last names and age with newPerson. Returns a non-nil error if the update failed, and nil if the update succeeded | |
c14713 | // DeletePerson deletes the person with the given first & last names and age. Returns a non-nil error if the delete failed, and nil if the delete succeeded | |
c14714 | // OtherHandler is a default handler to serve up
// a home page. | |
c14715 | // NewRenderRenderer returns a new RenderRenderer, where the underlying render.Render
// serves templates out of dir with the given func map. it's configured in dev mode
// according to the dev boolean | |
c14716 | // Render is the interface implementation | |
c14717 | // NewMem creates a Data implementation that stores config data in memory | |
c14718 | // SetInt is the interface implementation | |
c14719 | // GetInt is the interface implementation | |
c14720 | // Save is the interface implementation. Overwrites existing keys and never returns an error | |
c14721 | // Delete is the interface implementation. Never returns an error, even if the key didn't exist | |
c14722 | // Get is the interface implementation. Returns ErrNotFound if no such key existed. Callers should pass a pointer to a model so that Get can write the fetched model into it | |
c14723 | // randDishIdx returns a random index into the dishes slice, or -1 if the slice
// is empty | |
c14724 | // App is where all routes and middleware for buffalo
// should be defined. This is the nerve center of your
// application. | |
c14725 | // releaseAllServers is the handler to release the lock on all servers. it's an admin-only handler | |
c14726 | // getAllServers is the handler to get the status of all servers. it's admin-only | |
c14727 | // Save is the interface implementation | |
c14728 | // Delete is the interface implementation | |
c14729 | // hdl is a handler that calls t.Execute, passing all of the query string values as data to the template | |
c14730 | // GetConfig uses envconfig to populate and return a Config struct. Returns all envconfig errors if they occurred | |
c14731 | // returns true if elt already exists in s | |
c14732 | // adds elt to s unless it already exists. returns true if it was added successfully | |
c14733 | // removes elt from s unless it doesn't exist. returns true if it was removed, false otherwise | |
c14734 | // removeAll removes all elements from s and returns the total number of elements removed | |
c14735 | // UnmarshalBinary is the encoding.BinaryUnmarshaler interface implementation | |
c14736 | // Set is the Model interface implementation | |
c14737 | // GetKey returns an http.Handler that can get a key registered by Gorilla mux
// as "key" in the path. It gets the value of the key from db | |
c14738 | // Upsert is the interface implementation | |
c14739 | // releaseServer is the handler to release a specific server by name | |
c14740 | // PutKey returns an http.Handler that can set a value for the key registered by Gorilla
// mux as "key" in the path. It expects the value to be in the body of the PUT request | |
c14741 | //Get method of the RedisClientWrapper type | |
c14742 | //Set method of the RedisClientWrapper type | |
c14743 | // looks up key in the cache. if it exists, runs its value through fn, puts the new value
// back into the cache, and returns true. otherwise does nothing and returns false | |
c14744 | // removes key from the cache if it existed and returns true. otherwise returns false | |
c14745 | // convenience function that returns plural if i != 1, singular otherwise | |
c14746 | // SetPeerLinkIp configures peer link's IP address | |
c14747 | // SetPeerLinkNsToDocker sends peer link into Docker | |
c14748 | // SetPeerLinkNsPid sends peer link into container specified by PID | |
c14749 | // SetPeerLinkNsFd sends peer link into container specified by path | |
c14750 | // SetPeerLinkNetInNs configures peer link's IP network in network namespace specified by PID | |
c14751 | // generates new unused network interfaces name with given prefix | |
c14752 | // validates MacAddress LinkOption | |
c14753 | // validates Flags LinkOption | |
c14754 | // NetInterfaceNameValid checks if the network interface name is valid.
// It accepts interface name as a string. It returns error if invalid interface name is supplied. | |
c14755 | // NetNsHandle returns a file descriptor handle for network namespace specified by PID.
// It returns error if network namespace could not be found or if network namespace path could not be opened. | |
c14756 | // SetNetNsToPid sets network namespace to the one specied by PID.
// It returns error if the network namespace could not be set. | |
c14757 | // BridgeFromName returns a tenus network bridge from an existing bridge of given name on the Linux host.
// It returns error if the bridge of the given name cannot be found. | |
c14758 | // NewLinkFrom creates new tenus link on Linux host from an existing interface of given name | |
c14759 | // SetLinkNetNsPid moves the link to Network namespace specified by PID. | |
c14760 | // SetLinkNetInNs configures network settings of the link in network namespace specified by PID. | |
c14761 | // SetLinkNsFd sets the link's Linux namespace to the one specified by filesystem path. | |
c14762 | // SetLinkNsToDocker sets the link's Linux namespace to a running Docker one specified by Docker name. | |
c14763 | // RenameInterfaceByName renames an interface of given name. | |
c14764 | // setLinkOptions validates and sets link's various options passed in as LinkOptions. | |
c14765 | // Client executes the provided request | |
c14766 | // Constructor for different authentication possibilities | |
c14767 | // Sets authentication info from environment variables GREMLIN_USER and GREMLIN_PASS | |
c14768 | // Sets authentication information from username and password | |
c14769 | // Authenticates the connection | |
c14770 | // Implementation of the stringer interface. Useful for exploration | |
c14771 | // StartMockFeedbackServer spins up a simple stand-in for the Apple
// feedback service that can be used for testing purposes. Doesn't
// handle many errors, etc. Just for the sake of having something "live"
// to hit. | |
c14772 | // NewPushNotification creates and returns a PushNotification structure.
// It also initializes the pseudo-random identifier. | |
c14773 | // AddPayload sets the "aps" payload section of the request. It also
// has a hack described within to deal with specific zero values. | |
c14774 | // Set defines the value of a payload key. | |
c14775 | // PayloadString returns the current payload in string format. | |
c14776 | // ToBytes returns a byte array of the complete PushNotification
// struct. This array is what should be transmitted to the APN Service. | |
c14777 | // BareClient can be used to set the contents of your
// certificate and key blocks manually. | |
c14778 | // NewClient assumes you'll be passing in paths that
// point to your certificate and key. | |
c14779 | // Send connects to the APN service and sends your push notification.
// Remember that if the submission is successful, Apple won't reply. | |
c14780 | // ParseTime3339OrZero parses a string in RFC3339 format. If it's invalid,
// the zero time value is returned instead. | |
c14781 | // IsAnyZero returns whether the time is Go zero or Unix zero. | |
c14782 | // ReadFile parses the provided path and returns the config file.
// If path is empty, the c.Open function must be defined. | |
c14783 | // Decodes and evaluates a json config file, watching for include cycles. | |
c14784 | // CheckTypes parses m and returns an error if it encounters a type or value
// that is not supported by this package. | |
c14785 | // evaluateExpressions parses recursively m, populating it with the values
// that are found, unless testOnly is true. | |
c14786 | // ConfigFilePath checks if configFile is found and returns a usable path to it.
// It first checks if configFile is an absolute path, or if it's found in the
// current working directory. If not, it then checks if configFile is in one of
// c.IncludeDirs. It returns an error if configFile is absolute and could not be
... | |
c14787 | // cachedToken returns the token saved in cacheFile. It specifically returns
// errTokenExpired if the token is expired. | |
c14788 | // NewRefreshTokenSource returns a token source that obtains its initial token
// based on the provided config and the refresh token. | |
c14789 | // ReadBox reads the next box.
//
// If the previously read box was not read to completion, ReadBox consumes
// the rest of its data.
//
// At the end, the error is io.EOF. | |
c14790 | // ReadAndParseBox wraps the ReadBox method, ensuring that the read box is of type typ
// and parses successfully. It returns the parsed box. | |
c14791 | // byteTime returns the time required for n bytes. | |
c14792 | // lockPortable is a portable version not using fcntl. Doesn't handle crashes as gracefully,
// since it can leave stale lock files. | |
c14793 | // Makes a simple body-less google storage request | |
c14794 | // GetPartialObject fetches part of a Google Cloud Storage object.
// This function relies on the ctx ctxutil.HTTPClient value being set to an OAuth2
// authorized and authenticated HTTP client.
// If length is negative, the rest of the object is returned.
// It returns ErrInvalidRange if the server replies with http.S... | |
c14795 | // EnumerateObjects lists the objects in a bucket.
// This function relies on the ctx oauth2.HTTPClient value being set to an OAuth2
// authorized and authenticated HTTP client.
// If after is non-empty, listing will begin with lexically greater object names.
// If limit is non-zero, the length of the list will be limi... | |
c14796 | // uploadBinary uploads the currently-running Linux binary.
// It crashes if it fails. | |
c14797 | // findIP finds an IP address to use, or returns the empty string if none is found.
// It tries to find a reserved one in the same region where the name of the reserved IP
// is "NAME-ip" and the IP is not in use. | |
c14798 | // returns nil if instance doesn't exist. | |
c14799 | // Roll adds ch to the rolling sum. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.