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