_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c167700 | validation | // DoDeadline calls DoDeadline on the least loaded client | {
"resource": ""
} | ||
c167701 | validation | // DoTimeout calculates deadline and calls DoDeadline on the least loaded client | {
"resource": ""
} | ||
c167702 | validation | // Do calls calculates deadline using LBClient.Timeout and calls DoDeadline
// on the least loaded client. | {
"resource": ""
} | ||
c167703 | validation | // Serve serves incoming connections from the given listener
// using the given handler.
//
// Serve blocks until the given listener returns permanent error. | {
"resource": ""
} | ||
c167704 | validation | // ServeTLS serves HTTPS requests from the given net.Listener
// using the given handler.
//
// certFile and keyFile are paths to TLS certificate and key files. | {
"resource": ""
} | ||
c167705 | validation | // ServeTLSEmbed serves HTTPS requests from the given net.Listener
// using the given handler.
//
// certData and keyData must contain valid TLS certificate and key data. | {
"resource": ""
} | ||
c167706 | validation | // ListenAndServe serves HTTP requests from the given TCP addr
// using the given handler. | {
"resource": ""
} | ||
c167707 | validation | // ListenAndServeUNIX serves HTTP requests from the given UNIX addr
// using the given handler.
//
// The function deletes existing file at addr before starting serving.
//
// The server sets the given file mode for the UNIX addr. | {
"resource": ""
} | ||
c167708 | validation | // ListenAndServeTLS serves HTTPS requests from the given TCP addr
// using the given handler.
//
// certFile and keyFile are paths to TLS certificate and key files. | {
"resource": ""
} | ||
c167709 | validation | // ListenAndServeTLSEmbed serves HTTPS requests from the given TCP addr
// using the given handler.
//
// certData and keyData must contain valid TLS certificate and key data. | {
"resource": ""
} | ||
c167710 | validation | // TimeoutHandler creates RequestHandler, which returns StatusRequestTimeout
// error with the given msg to the client if h didn't return during
// the given duration.
//
// The returned handler may return StatusTooManyRequests error with the given
// msg to the client if there are more than Server.Concurrency concurre... | {
"resource": ""
} | ||
c167711 | validation | // TLSConnectionState returns TLS connection state.
//
// The function returns nil if the underlying connection isn't tls.Conn.
//
// The returned state may be used for verifying TLS version, client certificates,
// etc. | {
"resource": ""
} | ||
c167712 | validation | // String returns unique string representation of the ctx.
//
// The returned value may be useful for logging. | {
"resource": ""
} | ||
c167713 | validation | // SetContentType sets response Content-Type. | {
"resource": ""
} | ||
c167714 | validation | // SetContentTypeBytes sets response Content-Type.
//
// It is safe modifying contentType buffer after function return. | {
"resource": ""
} | ||
c167715 | validation | // FormFile returns uploaded file associated with the given multipart form key.
//
// The file is automatically deleted after returning from RequestHandler,
// so either move or copy uploaded file into new place if you want retaining it.
//
// Use SaveMultipartFile function for permanently saving uploaded file.
//
// T... | {
"resource": ""
} | ||
c167716 | validation | // SaveMultipartFile saves multipart file fh under the given filename path. | {
"resource": ""
} | ||
c167717 | validation | // RemoteAddr returns client address for the given request.
//
// Always returns non-nil result. | {
"resource": ""
} | ||
c167718 | validation | // Error sets response status code to the given value and sets response body
// to the given message. | {
"resource": ""
} | ||
c167719 | validation | // Success sets response Content-Type and body to the given values. | {
"resource": ""
} | ||
c167720 | validation | // SuccessString sets response Content-Type and body to the given values. | {
"resource": ""
} | ||
c167721 | validation | // IfModifiedSince returns true if lastModified exceeds 'If-Modified-Since'
// value from the request header.
//
// The function returns true also 'If-Modified-Since' request header is missing. | {
"resource": ""
} | ||
c167722 | validation | // NotFound resets response and sets '404 Not Found' response status code. | {
"resource": ""
} | ||
c167723 | validation | // Write writes p into response body. | {
"resource": ""
} | ||
c167724 | validation | // WriteString appends s to response body. | {
"resource": ""
} | ||
c167725 | validation | // Logger returns logger, which may be used for logging arbitrary
// request-specific messages inside RequestHandler.
//
// Each message logged via returned logger contains request-specific information
// such as request id, request duration, local address, remote address,
// request method and request url.
//
// It is... | {
"resource": ""
} | ||
c167726 | validation | // NextProto adds nph to be processed when key is negotiated when TLS
// connection is established.
//
// This function can only be called before the server is started. | {
"resource": ""
} | ||
c167727 | validation | // ListenAndServe serves HTTP requests from the given TCP4 addr.
//
// Pass custom listener to Serve if you need listening on non-TCP4 media
// such as IPv6.
//
// Accepted connections are configured to enable TCP keep-alives. | {
"resource": ""
} | ||
c167728 | validation | // ListenAndServeUNIX serves HTTP requests from the given UNIX addr.
//
// The function deletes existing file at addr before starting serving.
//
// The server sets the given file mode for the UNIX addr. | {
"resource": ""
} | ||
c167729 | validation | // ListenAndServeTLS serves HTTPS requests from the given TCP4 addr.
//
// certFile and keyFile are paths to TLS certificate and key files.
//
// Pass custom listener to Serve if you need listening on non-TCP4 media
// such as IPv6.
//
// If the certFile or keyFile has not been provided to the server structure,
// the ... | {
"resource": ""
} | ||
c167730 | validation | // ListenAndServeTLSEmbed serves HTTPS requests from the given TCP4 addr.
//
// certData and keyData must contain valid TLS certificate and key data.
//
// Pass custom listener to Serve if you need listening on arbitrary media
// such as IPv6.
//
// If the certFile or keyFile has not been provided the server structure,... | {
"resource": ""
} | ||
c167731 | validation | // ServeTLS serves HTTPS requests from the given listener.
//
// certFile and keyFile are paths to TLS certificate and key files.
//
// If the certFile or keyFile has not been provided the server structure,
// the function will use previously added TLS configuration. | {
"resource": ""
} | ||
c167732 | validation | // ServeTLSEmbed serves HTTPS requests from the given listener.
//
// certData and keyData must contain valid TLS certificate and key data.
//
// If the certFile or keyFile has not been provided the server structure,
// the function will use previously added TLS configuration. | {
"resource": ""
} | ||
c167733 | validation | // AppendCertEmbed does the same as AppendCert but using in-memory data. | {
"resource": ""
} | ||
c167734 | validation | // Serve serves incoming connections from the given listener.
//
// Serve blocks until the given listener returns permanent error. | {
"resource": ""
} | ||
c167735 | validation | // Shutdown gracefully shuts down the server without interrupting any active connections.
// Shutdown works by first closing all open listeners and then waiting indefinitely for all connections to return to idle and then shut down.
//
// When Shutdown is called, Serve, ListenAndServe, and ListenAndServeTLS immediately ... | {
"resource": ""
} | ||
c167736 | validation | // WriteGzip writes gzipped p to w and returns the number of compressed
// bytes written to w. | {
"resource": ""
} | ||
c167737 | validation | // WriteGunzip writes ungzipped p to w and returns the number of uncompressed
// bytes written to w. | {
"resource": ""
} | ||
c167738 | validation | // AppendGunzipBytes appends gunzipped src to dst and returns the resulting dst. | {
"resource": ""
} | ||
c167739 | validation | // WriteDeflate writes deflated p to w and returns the number of compressed
// bytes written to w. | {
"resource": ""
} | ||
c167740 | validation | // WriteInflate writes inflated p to w and returns the number of uncompressed
// bytes written to w. | {
"resource": ""
} | ||
c167741 | validation | // AppendInflateBytes appends inflated src to dst and returns the resulting dst. | {
"resource": ""
} | ||
c167742 | validation | // SetRequestURI sets RequestURI. | {
"resource": ""
} | ||
c167743 | validation | // SetRequestURIBytes sets RequestURI. | {
"resource": ""
} | ||
c167744 | validation | // RequestURI returns request's URI. | {
"resource": ""
} | ||
c167745 | validation | // SendFile registers file on the given path to be used as response body
// when Write is called.
//
// Note that SendFile doesn't set Content-Type, so set it yourself
// with Header.SetContentType. | {
"resource": ""
} | ||
c167746 | validation | // BodyWriter returns writer for populating response body.
//
// If used inside RequestHandler, the returned writer must not be used
// after returning from RequestHandler. Use RequestCtx.Write
// or SetBodyStreamWriter in this case. | {
"resource": ""
} | ||
c167747 | validation | // BodyWriter returns writer for populating request body. | {
"resource": ""
} | ||
c167748 | validation | // Body returns response body.
//
// The returned body is valid until the response modification. | {
"resource": ""
} | ||
c167749 | validation | // BodyWriteTo writes request body to w. | {
"resource": ""
} | ||
c167750 | validation | // BodyWriteTo writes response body to w. | {
"resource": ""
} | ||
c167751 | validation | // AppendBodyString appends s to response body. | {
"resource": ""
} | ||
c167752 | validation | // SetBodyString sets response body. | {
"resource": ""
} | ||
c167753 | validation | // ResetBody resets response body. | {
"resource": ""
} | ||
c167754 | validation | // SetBodyRaw sets response body, but without copying it.
//
// From this point onward the body argument must not be changed. | {
"resource": ""
} | ||
c167755 | validation | // ReleaseBody retires the response body if it is greater than "size" bytes.
//
// This permits GC to reclaim the large buffer. If used, must be before
// ReleaseResponse.
//
// Use this method only if you really understand how it works.
// The majority of workloads don't need this method. | {
"resource": ""
} | ||
c167756 | validation | // ReleaseBody retires the request body if it is greater than "size" bytes.
//
// This permits GC to reclaim the large buffer. If used, must be before
// ReleaseRequest.
//
// Use this method only if you really understand how it works.
// The majority of workloads don't need this method. | {
"resource": ""
} | ||
c167757 | validation | // SwapBody swaps response body with the given body and returns
// the previous response body.
//
// It is forbidden to use the body passed to SwapBody after
// the function returns. | {
"resource": ""
} | ||
c167758 | validation | // SwapBody swaps request body with the given body and returns
// the previous request body.
//
// It is forbidden to use the body passed to SwapBody after
// the function returns. | {
"resource": ""
} | ||
c167759 | validation | // Body returns request body.
//
// The returned body is valid until the request modification. | {
"resource": ""
} | ||
c167760 | validation | // AppendBodyString appends s to request body. | {
"resource": ""
} | ||
c167761 | validation | // SetBodyString sets request body. | {
"resource": ""
} | ||
c167762 | validation | // ResetBody resets request body. | {
"resource": ""
} | ||
c167763 | validation | // CopyTo copies req contents to dst except of body stream. | {
"resource": ""
} | ||
c167764 | validation | // CopyTo copies resp contents to dst except of body stream. | {
"resource": ""
} | ||
c167765 | validation | // WriteMultipartForm writes the given multipart form f with the given
// boundary to w. | {
"resource": ""
} | ||
c167766 | validation | // Reset clears response contents. | {
"resource": ""
} | ||
c167767 | validation | // ReadLimitBody reads response from the given r, limiting the body size.
//
// If maxBodySize > 0 and the body size exceeds maxBodySize,
// then ErrBodyTooLarge is returned.
//
// io.EOF is returned if r is closed before reading the first header byte. | {
"resource": ""
} | ||
c167768 | validation | // WriteTo writes request to w. It implements io.WriterTo. | {
"resource": ""
} | ||
c167769 | validation | // WriteTo writes response to w. It implements io.WriterTo. | {
"resource": ""
} | ||
c167770 | validation | // Write writes request to w.
//
// Write doesn't flush request to w for performance reasons.
//
// See also WriteTo. | {
"resource": ""
} | ||
c167771 | validation | // Write writes response to w.
//
// Write doesn't flush response to w for performance reasons.
//
// See also WriteTo. | {
"resource": ""
} | ||
c167772 | validation | // SetLastModified sets 'Last-Modified' header to the given value. | {
"resource": ""
} | ||
c167773 | validation | // PeekCookie is able to returns cookie by a given key from response. | {
"resource": ""
} | ||
c167774 | validation | // ContentType returns Content-Type header value. | {
"resource": ""
} | ||
c167775 | validation | // SetServer sets Server header value. | {
"resource": ""
} | ||
c167776 | validation | // SetServerBytes sets Server header value. | {
"resource": ""
} | ||
c167777 | validation | // Host returns Host header value. | {
"resource": ""
} | ||
c167778 | validation | // SetHost sets Host header value. | {
"resource": ""
} | ||
c167779 | validation | // SetHostBytes sets Host header value. | {
"resource": ""
} | ||
c167780 | validation | // SetUserAgent sets User-Agent header value. | {
"resource": ""
} | ||
c167781 | validation | // SetUserAgentBytes sets User-Agent header value. | {
"resource": ""
} | ||
c167782 | validation | // Method returns HTTP request method. | {
"resource": ""
} | ||
c167783 | validation | // SetMethod sets HTTP request method. | {
"resource": ""
} | ||
c167784 | validation | // SetMethodBytes sets HTTP request method. | {
"resource": ""
} | ||
c167785 | validation | // RequestURI returns RequestURI from the first HTTP request line. | {
"resource": ""
} | ||
c167786 | validation | // SetRequestURI sets RequestURI for the first HTTP request line.
// RequestURI must be properly encoded.
// Use URI.RequestURI for constructing proper RequestURI if unsure. | {
"resource": ""
} | ||
c167787 | validation | // SetRequestURIBytes sets RequestURI for the first HTTP request line.
// RequestURI must be properly encoded.
// Use URI.RequestURI for constructing proper RequestURI if unsure. | {
"resource": ""
} | ||
c167788 | validation | // HasAcceptEncoding returns true if the header contains
// the given Accept-Encoding value. | {
"resource": ""
} | ||
c167789 | validation | // HasAcceptEncodingBytes returns true if the header contains
// the given Accept-Encoding value. | {
"resource": ""
} | ||
c167790 | validation | // Len returns the number of headers set,
// i.e. the number of times f is called in VisitAll. | {
"resource": ""
} | ||
c167791 | validation | // Reset clears response header. | {
"resource": ""
} | ||
c167792 | validation | // SetCookie sets the given response cookie.
//
// It is save re-using the cookie after the function returns. | {
"resource": ""
} | ||
c167793 | validation | // DelClientCookie instructs the client to remove the given cookie.
//
// Use DelCookie if you want just removing the cookie from response header. | {
"resource": ""
} | ||
c167794 | validation | // DelCookie removes cookie under the given key from response header.
//
// Note that DelCookie doesn't remove the cookie from the client.
// Use DelClientCookie instead. | {
"resource": ""
} | ||
c167795 | validation | // DelCookie removes cookie under the given key. | {
"resource": ""
} | ||
c167796 | validation | // DelAllCookies removes all the cookies from request headers. | {
"resource": ""
} | ||
c167797 | validation | // Peek returns header value for the given key.
//
// Returned value is valid until the next call to ResponseHeader.
// Do not store references to returned value. Make copies instead. | {
"resource": ""
} | ||
c167798 | validation | // PeekBytes returns header value for the given key.
//
// Returned value is valid until the next call to ResponseHeader.
// Do not store references to returned value. Make copies instead. | {
"resource": ""
} | ||
c167799 | validation | // Cookie returns cookie for the given key. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.