_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c10200
train
// Mkdir creates a directory
{ "resource": "" }
c10201
train
// Stat returns the fileinfo of a file
{ "resource": "" }
c10202
train
// MkdirAll creates a directory named path on the given Filesystem, // along with any necessary parents, and returns nil, // or else returns an error. // The permission bits perm are used for all // directories that MkdirAll creates. // If path is already a directory, MkdirAll does nothing // and returns nil.
{ "resource": "" }
c10203
train
// RemoveAll removes path and any children it contains. // It removes everything it can but returns the first error // it encounters. If the path does not exist, RemoveAll // returns nil.
{ "resource": "" }
c10204
train
// GenerateAuthorizeToken generates a base64-encoded UUID code
{ "resource": "" }
c10205
train
// GenerateAccessToken generates base64-encoded UUID access and refresh tokens
{ "resource": "" }
c10206
train
// Parse urls, resolving uri references to base url
{ "resource": "" }
c10207
train
// ValidateUriList validates that redirectUri is contained in baseUriList. // baseUriList may be a string separated by separator. // If separator is blank, validate only 1 URI.
{ "resource": "" }
c10208
train
// ValidateUri validates that redirectUri is contained in baseUri
{ "resource": "" }
c10209
train
// Returns the first uri from an uri list
{ "resource": "" }
c10210
train
// SetError sets an error id and description on the Response // state and uri are left blank
{ "resource": "" }
c10211
train
// SetErrorState sets an error id, description, and state on the Response // uri is left blank
{ "resource": "" }
c10212
train
// SetErrorUri sets an error id, description, state, and uri on the Response
{ "resource": "" }
c10213
train
// SetRedirect changes the response to redirect to the given url
{ "resource": "" }
c10214
train
// GetRedirectUrl returns the redirect url with all query string parameters
{ "resource": "" }
c10215
train
// OutputJSON encodes the Response to JSON and writes to the http.ResponseWriter
{ "resource": "" }
c10216
train
// Exists returns true if the auth type exists in the list
{ "resource": "" }
c10217
train
// Exists returns true if the access type exists in the list
{ "resource": "" }
c10218
train
// NewServerConfig returns a new ServerConfig with default configuration
{ "resource": "" }
c10219
train
// NewServer creates a new server instance
{ "resource": "" }
c10220
train
// NewResponse creates a new response for the server
{ "resource": "" }
c10221
train
// HandleInfoRequest is an http.HandlerFunc for server information // NOT an RFC specification.
{ "resource": "" }
c10222
train
// FinishInfoRequest finalizes the request handled by HandleInfoRequest
{ "resource": "" }
c10223
train
// HandleAccessRequest is the http.HandlerFunc for handling access token requests
{ "resource": "" }
c10224
train
// Helper Functions // getClient looks up and authenticates the basic auth using the given // storage. Sets an error on the response if auth fails or a server error occurs.
{ "resource": "" }
c10225
train
// IsExpired is true if authorization expires at time 't'
{ "resource": "" }
c10226
train
// ExpireAt returns the expiration date
{ "resource": "" }
c10227
train
// handleDiscovery returns the OpenID Connect discovery object, allowing clients // to discover OAuth2 resources.
{ "resource": "" }
c10228
train
// handlePublicKeys publishes the public part of this server's signing keys. // This allows clients to verify the signature of ID Tokens.
{ "resource": "" }
c10229
train
// encodeIDToken serializes and signs an ID Token then adds a field to the token response.
{ "resource": "" }
c10230
train
// CheckClientSecret determines whether the given secret matches a secret held by the client. // Public clients return true for a secret of ""
{ "resource": "" }
c10231
train
// Return authorization header data
{ "resource": "" }
c10232
train
// Return "Bearer" token from request. The header has precedence over query string.
{ "resource": "" }
c10233
train
// getClientAuth checks client basic authentication in params if allowed, // otherwise gets it from the header. // Sets an error on the response if no auth is present or a server error occurs.
{ "resource": "" }
c10234
train
// Build builds URL router from records.
{ "resource": "" }
c10235
train
// Get gets the first value associated with the given name. // If there are no values associated with the key, Get returns "".
{ "resource": "" }
c10236
train
// build builds double-array from records.
{ "resource": "" }
c10237
train
// setBase sets BASE.
{ "resource": "" }
c10238
train
// setCheck sets CHECK.
{ "resource": "" }
c10239
train
// makeNode returns a new node from record.
{ "resource": "" }
c10240
train
// NewRecord returns a new Record.
{ "resource": "" }
c10241
train
// makeRecords returns the records that use to build Double-Arrays.
{ "resource": "" }
c10242
train
// Less implements the sort.Interface.Less.
{ "resource": "" }
c10243
train
// Swap implements the sort.Interface.Swap.
{ "resource": "" }
c10244
train
// BasicAuth provides a basic auth info writer
{ "resource": "" }
c10245
train
// APIKeyAuth provides an API key auth info writer
{ "resource": "" }
c10246
train
// BearerToken provides a header based oauth2 bearer access token auth info writer
{ "resource": "" }
c10247
train
// Read bytes from the file
{ "resource": "" }
c10248
train
// ReadResponse reads the response
{ "resource": "" }
c10249
train
// NewAPIError creates a new API error
{ "resource": "" }
c10250
train
// NewAPI creates the default untyped API
{ "resource": "" }
c10251
train
// WithJSONDefaults loads the json defaults for this api
{ "resource": "" }
c10252
train
// WithoutJSONDefaults clears the json defaults for this api
{ "resource": "" }
c10253
train
// Formats returns the registered string formats
{ "resource": "" }
c10254
train
// RegisterAuth registers an auth handler in this api
{ "resource": "" }
c10255
train
// RegisterConsumer registers a consumer for a media type.
{ "resource": "" }
c10256
train
// RegisterProducer registers a producer for a media type
{ "resource": "" }
c10257
train
// RegisterOperation registers an operation handler for an operation name
{ "resource": "" }
c10258
train
// OperationHandlerFor returns the operation handler for the specified id if it can be found
{ "resource": "" }
c10259
train
// validateWith validates the registrations in this API against the provided spec analyzer
{ "resource": "" }
c10260
train
// Get gets the value for the route param for the specified key
{ "resource": "" }
c10261
train
// NewRouter creates a new context aware router middleware
{ "resource": "" }
c10262
train
// DefaultRouter creates a default implemenation of the router
{ "resource": "" }
c10263
train
// Authenticate Authenticator interface implementation
{ "resource": "" }
c10264
train
// AllowsAnonymous returns true when there is an authenticator that means optional auth
{ "resource": "" }
c10265
train
// Authenticate method implemention so this collection can be used as authenticator
{ "resource": "" }
c10266
train
// MarshalFlag implements go-flags Marshaller interface
{ "resource": "" }
c10267
train
// UnmarshalFlag implements go-flags Unmarshaller interface
{ "resource": "" }
c10268
train
// AuthenticateRequest adds authentication data to the request
{ "resource": "" }
c10269
train
// NewOperationExecutor creates a context aware middleware that handles the operations after routing
{ "resource": "" }
c10270
train
// YAMLConsumer creates a consumer for yaml data
{ "resource": "" }
c10271
train
// YAMLProducer creates a producer for yaml data
{ "resource": "" }
c10272
train
// HttpAuthenticator is a function that authenticates a HTTP request
{ "resource": "" }
c10273
train
// ScopedAuthenticator is a function that authenticates a HTTP request against a list of valid scopes
{ "resource": "" }
c10274
train
// BasicAuthCtx creates a basic auth authenticator with the provided authentication function and realm name with support for context.Context
{ "resource": "" }
c10275
train
// APIKeyAuth creates an authenticator that uses a token for authorization. // This token can be obtained from either a header or a query string
{ "resource": "" }
c10276
train
// BearerAuth for use with oauth2 flows
{ "resource": "" }
c10277
train
// ContentType parses a content type header
{ "resource": "" }
c10278
train
// JSONConsumer creates a new JSON consumer
{ "resource": "" }
c10279
train
// JSONProducer creates a new JSON producer
{ "resource": "" }
c10280
train
// ContentType validates the content type of a request
{ "resource": "" }
c10281
train
// EnsureDefaults in case some options are missing
{ "resource": "" }
c10282
train
// Redoc creates a middleware to serve a documentation site for a swagger spec. // This allows for altering the spec before starting the http listener. //
{ "resource": "" }
c10283
train
// CanHaveBody returns true if this method can have a body
{ "resource": "" }
c10284
train
// IsSafe returns true if this is a request with a safe method
{ "resource": "" }
c10285
train
// HasBody returns true if this method needs a content-type
{ "resource": "" }
c10286
train
// JSONRequest creates a new http request with json headers set
{ "resource": "" }
c10287
train
// ReadSingleValue reads a single value from the source
{ "resource": "" }
c10288
train
// ReadCollectionValue reads a collection value from a string data source
{ "resource": "" }
c10289
train
// GetOK returns the values collection for the given key. // When the key is present in the map it will return true for hasKey. // When the value is not empty it will return true for hasValue.
{ "resource": "" }
c10290
train
// NewRequest creates a new swagger http client request
{ "resource": "" }
c10291
train
// BuildHTTP creates a new http request based on the data from the params
{ "resource": "" }
c10292
train
// GetQueryParams returns a copy of all query params currently set for the request
{ "resource": "" }
c10293
train
// SetPathParam adds a path param to the request
{ "resource": "" }
c10294
train
// SetFileParam adds a file param to the request
{ "resource": "" }
c10295
train
// SetTimeout sets the timeout for a request
{ "resource": "" }
c10296
train
// Consume consumes the reader into the data parameter
{ "resource": "" }
c10297
train
// Produce produces the response for the provided data
{ "resource": "" }
c10298
train
// Authorize authorizes the processing of the request for the principal
{ "resource": "" }
c10299
train
// TLSClientAuth creates a tls.Config for mutual auth
{ "resource": "" }