_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c8600
// SetHeaders sets a map of header fields in the mock response.
c8601
// Body sets the HTTP response body to be used.
c8602
// BodyString defines the response body as string.
c8603
// JSON defines the response body based on a JSON based input.
c8604
// SetError defines the response simulated error.
c8605
// Delay defines the response simulated delay. // This feature is still experimental and will be improved in the future.
c8606
// Map adds a new response mapper function to map http.Response before the matching process.
c8607
// New creates and registers a new HTTP mock with // default settings and returns the Request DSL for HTTP mock // definition and set up.
c8608
// RestoreClient allows the developer to disable and restore the // original transport in the given http.Client.
c8609
// Observe provides a hook to support inspection of the request and matched mock
c8610
// NetworkingFilter determines if an http.Request should be triggered or not.
c8611
// NewMock creates a new HTTP mock based on the given request and response instances. // It's mostly used internally.
c8612
// Done returns true in case that the current mock // instance is disabled and therefore must be removed.
c8613
// Match matches the given http.Request with the current Request // mock expectation, returning true if matches.
c8614
// decrement decrements the current mock Request counter.
c8615
// PredictFilesSet predict according to file rules to a given set of file names
c8616
// File returns true if prefix can match the file
c8617
// Directory gives the directory of the current written // last argument if it represents a file name being written. // in case that it is not, we fall back to the current directory.
c8618
// predictPackages completes packages in the directory pointed by a.Last // and packages that are one level below that package.
c8619
// listPackages looks in current pointed dir and in all it's direct sub-packages // and return a list of paths to go packages.
c8620
// Run runs the completion and add installation flags beforehand. // The flags are added to the main flag CommandLine variable.
c8621
// Predict returns all possible predictions for args according to the command struct
c8622
// Predict completion of sub command names names according to command line arguments
c8623
// Predict completion of flags names according to command line arguments
c8624
// predict options // only is set to true if no more options are allowed to be returned // those are in cases of special flag that has specific completion arguments, // and other flags or sub commands can't come after it.
c8625
// fixPathForm changes a file name to a relative name
c8626
// Run is used when running complete in command line mode. // this is used when the complete is not completing words, but to // install it or uninstall it.
c8627
// prompt use for approval // exit if approval was not given
c8628
// AddFlags adds the CLI flags to the flag set. // If flags is nil, the default command line flags will be taken. // Pass non-empty strings as installName and uninstallName to override the default // flag names.
c8629
// validate the CLI
c8630
// PredictOr unions two predicate functions, so that the result predicate // returns the union of their predication
c8631
// Predict invokes the predict function and implements the Predictor interface
c8632
// New returns a new Sling with an http DefaultClient.
c8633
// Http Client // Client sets the http Client used to do requests. If a nil client is given, // the http.DefaultClient will be used.
c8634
// Doer sets the custom Doer implementation used to do requests. // If a nil client is given, the http.DefaultClient will be used.
c8635
// Method // Head sets the Sling method to HEAD and sets the given pathURL.
c8636
// Get sets the Sling method to GET and sets the given pathURL.
c8637
// Post sets the Sling method to POST and sets the given pathURL.
c8638
// Put sets the Sling method to PUT and sets the given pathURL.
c8639
// Patch sets the Sling method to PATCH and sets the given pathURL.
c8640
// Delete sets the Sling method to DELETE and sets the given pathURL.
c8641
// Options sets the Sling method to OPTIONS and sets the given pathURL.
c8642
// Trace sets the Sling method to TRACE and sets the given pathURL.
c8643
// Connect sets the Sling method to CONNECT and sets the given pathURL.
c8644
// Header // Add adds the key, value pair in Headers, appending values for existing keys // to the key's values. Header keys are canonicalized.
c8645
// Set sets the key, value pair in Headers, replacing existing values // associated with key. Header keys are canonicalized.
c8646
// SetBasicAuth sets the Authorization header to use HTTP Basic Authentication // with the provided username and password. With HTTP Basic Authentication // the provided username and password are not encrypted.
c8647
// Url // Base sets the rawURL. If you intend to extend the url with Path, // baseUrl should be specified with a trailing slash.
c8648
// Path extends the rawURL with the given path by resolving the reference to // an absolute URL. If parsing errors occur, the rawURL is left unmodified.
c8649
// BodyProvider sets the Sling's body provider.
c8650
// Requests // Request returns a new http.Request created with the Sling properties. // Returns any errors parsing the rawURL, encoding query structs, encoding // the body, or creating the http.Request.
c8651
// addQueryStructs parses url tagged query structs using go-querystring to // encode them to url.Values and format them onto the url.RawQuery. Any // query parsing or encoding errors are returned.
c8652
// addHeaders adds the key, value pairs from the given http.Header to the // request. Values for existing keys are appended to the keys values.
c8653
// Sending // ResponseDecoder sets the Sling's response decoder.
c8654
// Decode decodes the Response Body into the value pointed to by v. // Caller must provide a non-nil v and close the resp.Body.
c8655
// NewIssueService returns a new IssueService.
c8656
// List returns the authenticated user's issues across repos and orgs.
c8657
// ListByRepo returns a repository's issues.
c8658
// Create creates a new issue on the specified repository.
c8659
// Sum64 computes the 64-bit xxHash digest of b.
c8660
// Reset clears the Digest's state so that it can be reused.
c8661
// Sum appends the current hash to b and returns the resulting slice.
c8662
// Sum64 returns the current hash.
c8663
// DEPRECATED. RateLimit creates a Throttler that conforms to the given // rate limits
c8664
// Select the specified database index.
c8665
// RateLimit checks whether a particular key has exceeded a rate // limit. It also returns a RateLimitResult to provide additional // information about the state of the RateLimiter. // // If the rate limit has not been exceeded, the underlying storage is // updated by the supplied quantity. For example, a quantity of 1...
c8666
// RateLimit wraps an http.Handler to limit incoming requests. // Requests that are not limited will be passed to the handler // unchanged. Limited requests will be passed to the DeniedHandler. // X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and // Retry-After headers will be written to the response bas...
c8667
// GetWithTime returns the value of the key if it is in the store or // -1 if it does not exist. It also returns the current local time on // the machine.
c8668
// SetIfNotExistsWithTTL sets the value of key only if it is not // already set in the store it returns whether a new value was set. It // ignores the ttl.
c8669
// CompareAndSwapWithTTL atomically compares the value at key to the // old value. If it matches, it sets it to the new value and returns // true. Otherwise, it returns false. If the key does not exist in the // store, it returns false with no error. It ignores the ttl.
c8670
// Key returns the key for this request based on the criteria defined by the VaryBy struct.
c8671
// DEPRECATED. NewMemStore is a compatible alias for mem.New
c8672
// DEPRECATED. NewMemStore is a compatible alias for redis.New
c8673
// NewException constructs an Exception using provided Error and Stacktrace
c8674
// Culprit tries to read top-most error message from Exception's stacktrace
c8675
// WrapWithExtra adds extra data to an error before reporting to Sentry
c8676
// Iteratively fetches all the Extra data added to an error, // and it's underlying errors. Extra data defined first is // respected, and is not overridden when extracting.
c8677
// Culprit iterates through stacktrace frames and returns first in-app frame's information
c8678
// NewStacktrace intializes and populates a new stacktrace, skipping skip frames. // // context is the number of surrounding lines that should be included for context. // Setting context to 3 would try to get seven lines. Setting context to -1 returns // one line with no surrounding context, and 0 returns no context. /...
c8679
// NewStacktraceFrame builds a single frame using data returned from runtime.Caller. // // context is the number of surrounding lines that should be included for context. // Setting context to 3 would try to get seven lines. Setting context to -1 returns // one line with no surrounding context, and 0 returns no context...
c8680
// Determines whether frame should be marked as InApp
c8681
// Retrieve the name of the package and function containing the PC.
c8682
// Try to trim the GOROOT or GOPATH prefix off of a filename
c8683
// MarshalJSON returns the JSON encoding of a timestamp
c8684
// UnmarshalJSON sets timestamp to parsed JSON data
c8685
// Format return timestamp in configured timestampFormat
c8686
// MarshalJSON returns the JSON encoding of a tag
c8687
// UnmarshalJSON sets tag to parsed JSON data
c8688
// UnmarshalJSON sets tags to parsed JSON data
c8689
// NewPacket constructs a packet with the specified message and interfaces.
c8690
// NewPacketWithExtra constructs a packet with the specified message, extra information, and interfaces.
c8691
// AddTags appends new tags to the existing ones
c8692
// JSON encodes packet into JSON format that will be sent to the server
c8693
// Return a list of interfaces to be used in appending with the rest
c8694
// New constructs a new Sentry client instance
c8695
// NewWithTags constructs a new Sentry client instance with default tags.
c8696
// SetIgnoreErrors updates ignoreErrors config on given client
c8697
// SetDSN updates a client with a new DSN. It safe to call after and // concurrently with calls to Report and Send.
c8698
// SetRelease sets the "release" tag.
c8699
// SetEnvironment sets the "environment" tag.