http

package
v0.0.131 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2023, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2023, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2023, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2023, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2023, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2023, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

*Copyright (c) 2022, kaydxh * *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal *in the Software without restriction, including without limitation the rights *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *copies of the Software, and to permit persons to whom the Software is *furnished to do so, subject to the following conditions: * *The above copyright notice and this permission notice shall be included in all *copies or substantial portions of the Software. * *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE.

Index

Constants

View Source
const (
	DefaultHTTPRequestIDKey = "X-Request-ID"
)

RequestIdKey is metadata key name for request ID

Variables

View Source
var DefaultTransportInsecure = &http.Transport{
	Proxy: http.ProxyFromEnvironment,
	DialContext: (&net.Dialer{
		Timeout:   30 * time.Second,
		KeepAlive: 30 * time.Second,
	}).DialContext,
	ForceAttemptHTTP2:     true,
	MaxIdleConns:          100,
	IdleConnTimeout:       90 * time.Second,
	TLSHandshakeTimeout:   10 * time.Second,
	ExpectContinueTimeout: 1 * time.Second,

	TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
View Source
var DefaultTransportInsecureWithHost = RoundTripperWithTarget(DefaultTransportInsecure)
View Source
var DefaultTransportInsecureWithHostAndProxy = RoundTripperWithTarget(DefaultTransportInsecureWithProxy)
View Source
var DefaultTransportInsecureWithProxy http.RoundTripper = &http.Transport{
	Proxy: ProxyFuncFromContextOrEnvironment,
	DialContext: (&net.Dialer{
		Timeout:   30 * time.Second,
		KeepAlive: 30 * time.Second,
	}).DialContext,
	ForceAttemptHTTP2:     true,
	MaxIdleConns:          100,
	IdleConnTimeout:       90 * time.Second,
	TLSHandshakeTimeout:   10 * time.Second,
	ExpectContinueTimeout: 1 * time.Second,

	TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}

Functions

func CloneMultipartFileHeader added in v0.0.61

func CloneMultipartFileHeader(fh *multipart.FileHeader) *multipart.FileHeader

func CloneMultipartForm added in v0.0.61

func CloneMultipartForm(f *multipart.Form) *multipart.Form

func CloneOrMakeHeader added in v0.0.61

func CloneOrMakeHeader(hdr http.Header) http.Header

CloneOrMakeHeader invokes Header.Clone but if the result is nil, it'll instead make and return a non-nil Header.

func CloneURL added in v0.0.61

func CloneURL(u *url.URL) *url.URL

func CloneURLValues added in v0.0.61

func CloneURLValues(v url.Values) url.Values

func ErrorFromHttp added in v0.0.93

func ErrorFromHttp(code int) error

func ExtractFromHTTP added in v0.0.95

func ExtractFromHTTP(r *http.Request, key string) string

func ExtractHTTPAndContext added in v0.0.95

func ExtractHTTPAndContext(r *http.Request, key string) string

func ExtractRequestIdHTTPAndContext added in v0.0.95

func ExtractRequestIdHTTPAndContext(r *http.Request) string

func GetIPFromRequest added in v0.0.29

func GetIPFromRequest(r *http.Request) (net.IP, error)

returns IP address from request. It will lookup IP in X-Forwarded-For and X-Real-IP headers.

func ParseProxyUrl added in v0.0.117

func ParseProxyUrl(proxy string) (*url.URL, error)

func ParseTargetUrl added in v0.0.117

func ParseTargetUrl(host string) (*url.URL, error)

func ProxyFuncFromContextOrEnvironment added in v0.0.117

func ProxyFuncFromContextOrEnvironment(req *http.Request) (*url.URL, error)

func RequestWithContextProxy added in v0.0.117

func RequestWithContextProxy(req *http.Request, proxy *Proxy) *http.Request

func RequestWithContextTargetHost added in v0.0.117

func RequestWithContextTargetHost(req *http.Request, target *Host) *http.Request

func RequestWithTargetHost added in v0.0.117

func RequestWithTargetHost(req *http.Request, target string) error

func RoundTripperWithTarget added in v0.0.117

func RoundTripperWithTarget(rt http.RoundTripper) http.RoundTripper

func SetPairContext added in v0.0.95

func SetPairContext(r *http.Request, key, value string) *http.Request

func SetRequestIdContext added in v0.0.95

func SetRequestIdContext(r *http.Request, requestID string) *http.Request

func TargetHostFuncFromContext added in v0.0.117

func TargetHostFuncFromContext(req *http.Request) error

func WithContextHost added in v0.0.117

func WithContextHost(ctx context.Context, host *Host) context.Context

func WithContextProxy added in v0.0.117

func WithContextProxy(ctx context.Context, proxy *Proxy) context.Context

Types

type Client

type Client struct {
	http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(options ...ClientOption) (*Client, error)

func NewClientWithTargetHost added in v0.0.117

func NewClientWithTargetHost(target string, opts ...ClientOption) *Client

func (*Client) ApplyOptions

func (o *Client) ApplyOptions(options ...ClientOption) *Client

func (*Client) Do added in v0.0.93

func (c *Client) Do(ctx context.Context, req *http.Request) (*http.Response, error)

func (*Client) Get

func (c *Client) Get(ctx context.Context, url string) ([]byte, error)

func (*Client) HttpDo added in v0.0.103

func (c *Client) HttpDo(ctx context.Context, method string, url string, contentType string, headers map[string]string,
	auth func(r *http.Request) error,
	body io.Reader,
) (*http.Response, error)

func (*Client) HttpReader added in v0.0.103

func (c *Client) HttpReader(
	ctx context.Context,
	method, url, contentType string,
	headers map[string]string,
	auth func(r *http.Request) error,
	body io.Reader,
) ([]byte, error)

func (*Client) Post

func (c *Client) Post(
	ctx context.Context,
	url, contentType string,
	headers map[string]string,
	body []byte,
) ([]byte, error)

func (*Client) PostJson added in v0.0.6

func (c *Client) PostJson(
	ctx context.Context,
	url string,
	headers map[string]string,
	body []byte,
) ([]byte, error)

func (*Client) PostJsonWithAuthorize added in v0.0.14

func (c *Client) PostJsonWithAuthorize(
	ctx context.Context,
	url string,
	headers map[string]string,
	auth func(r *http.Request) error,
	body []byte,
) ([]byte, error)

func (*Client) PostPb added in v0.0.80

func (c *Client) PostPb(
	ctx context.Context,
	url string,
	headers map[string]string,
	body []byte,
) ([]byte, error)

func (*Client) PostReader

func (c *Client) PostReader(
	ctx context.Context,
	url, contentType string,
	headers map[string]string,
	auth func(r *http.Request) error,
	body io.Reader,
) ([]byte, error)

func (*Client) Put added in v0.0.103

func (c *Client) Put(
	ctx context.Context,
	url, contentType string,
	headers map[string]string,
	body []byte,
) ([]byte, error)

func (*Client) PutReader added in v0.0.103

func (c *Client) PutReader(
	ctx context.Context,
	url, contentType string,
	headers map[string]string,
	auth func(r *http.Request) error,
	body io.Reader,
) ([]byte, error)

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

A ClientOption sets options.

func WithDisableKeepAlives

func WithDisableKeepAlives(disableKeepAlives bool) ClientOption

func WithIdleConnTimeout

func WithIdleConnTimeout(idleConnTimeout time.Duration) ClientOption

func WithLogger

func WithLogger(l *log.Logger) ClientOption

WithLogger

func WithMaxIdleConns

func WithMaxIdleConns(maxIdleConns int) ClientOption

func WithProxyHost added in v0.0.117

func WithProxyHost(target string) ClientOption

replace host in proxy url

func WithProxyURL added in v0.0.117

func WithProxyURL(proxyURL string) ClientOption

http://xxx:yyy@goproxy.com

func WithResonseHeaderTimeout

func WithResonseHeaderTimeout(responseHeaderTimeout time.Duration) ClientOption

func WithTargetHost added in v0.0.117

func WithTargetHost(target string) ClientOption

dns:///ai-media-1256936300.cos.ap-guangzhou.myqcloud.com redirect

func WithTimeout

func WithTimeout(timeout time.Duration) ClientOption

type ClientOptionFunc

type ClientOptionFunc func(*Client)

ClientOptionFunc wraps a function that modifies Client into an implementation of the ClientOption interface.

type EmptyClientOption

type EmptyClientOption struct{}

EmptyClientOption does not alter the configuration. It can be embedded in another structure to build custom options.

This API is EXPERIMENTAL.

type EmptyHandlerChainOption added in v0.0.74

type EmptyHandlerChainOption struct{}

EmptyHandlerChainOption does not alter the configuration. It can be embedded in another structure to build custom options.

This API is EXPERIMENTAL.

type EmptyHandlerInterceptorOption added in v0.0.74

type EmptyHandlerInterceptorOption struct{}

EmptyHandlerInterceptorOption does not alter the configuration. It can be embedded in another structure to build custom options.

This API is EXPERIMENTAL.

type Factory added in v0.0.109

type Factory[REQ any, RESP any] struct {
	// contains filtered or unexported fields
}

func NewFactory added in v0.0.109

func NewFactory[REQ any, RESP any](fc FactoryConfig, configFuncs ...FactoryConfigFunc) (Factory[REQ, RESP], error)

func (Factory[REQ, RESP]) NewClient added in v0.0.109

func (f Factory[REQ, RESP]) NewClient(ctx context.Context) (*Repository[REQ, RESP], error)

type FactoryConfig added in v0.0.109

type FactoryConfig struct {
	Validator *validator.Validate
	Url       string
	Timeout   time.Duration //接口处理超时时间
	*Client
	RetryTimes    int
	RetryInterval time.Duration
}

func (*FactoryConfig) ApplyOptions added in v0.0.109

func (fc *FactoryConfig) ApplyOptions(configFuncs ...FactoryConfigFunc) error

func (FactoryConfig) Validate added in v0.0.109

func (fc FactoryConfig) Validate() error

type FactoryConfigFunc added in v0.0.109

type FactoryConfigFunc func(c *FactoryConfig) error

type HandlerChain added in v0.0.74

type HandlerChain struct {
	//invoke before http handler
	PreHandlers []func(w http.ResponseWriter, r *http.Request) error
	Handlers    []HandlerInterceptor
	//invoke after http handler
	PostHandlers []func(w http.ResponseWriter, r *http.Request)
}

func NewHandlerChain added in v0.0.74

func NewHandlerChain(opts ...HandlerChainOption) *HandlerChain

func (*HandlerChain) ApplyOptions added in v0.0.74

func (o *HandlerChain) ApplyOptions(options ...HandlerChainOption) *HandlerChain

func (*HandlerChain) WrapH added in v0.0.74

func (c *HandlerChain) WrapH(next http.Handler) http.Handler

type HandlerChainOption added in v0.0.74

type HandlerChainOption interface {
	// contains filtered or unexported methods
}

A HandlerChainOption sets options.

type HandlerChainOptionFunc added in v0.0.74

type HandlerChainOptionFunc func(*HandlerChain)

HandlerChainOptionFunc wraps a function that modifies HandlerChain into an implementation of the HandlerChainOption interface.

type HandlerInterceptor added in v0.0.74

type HandlerInterceptor struct {
	//http middleware
	Interceptor func(h http.Handler) http.Handler
}

func NewHandlerInterceptor added in v0.0.74

func NewHandlerInterceptor(opts ...HandlerInterceptorOption) *HandlerInterceptor

func (*HandlerInterceptor) ApplyOptions added in v0.0.74

func (o *HandlerInterceptor) ApplyOptions(options ...HandlerInterceptorOption) *HandlerInterceptor

type HandlerInterceptorOption added in v0.0.74

type HandlerInterceptorOption interface {
	// contains filtered or unexported methods
}

A HandlerInterceptorOption sets options.

type HandlerInterceptorOptionFunc added in v0.0.74

type HandlerInterceptorOptionFunc func(*HandlerInterceptor)

HandlerInterceptorOptionFunc wraps a function that modifies HandlerInterceptor into an implementation of the HandlerInterceptorOption interface.

type Host added in v0.0.117

type Host struct {
	HostTarget           string
	ReplaceHostInRequest bool

	HostTargetAddrResolved resolver.Address
}

func FromContextHost added in v0.0.117

func FromContextHost(ctx context.Context) *Host

type ProtoMessage added in v0.0.109

type ProtoMessage interface {
	proto.Message
}

type Proxy added in v0.0.117

type Proxy struct {
	ProxyUrl    string
	ProxyTarget string

	ProxyAddrResolved resolver.Address
}

func FromContextProxy added in v0.0.117

func FromContextProxy(ctx context.Context) *Proxy

type Repository added in v0.0.109

type Repository[REQ any, RESP any] struct {
	Url     string
	Timeout time.Duration

	*Client

	// not include the first call
	RetryTimes    int
	RetryInterval time.Duration
}

func (*Repository[REQ, RESP]) PostPb added in v0.0.109

func (r *Repository[REQ, RESP]) PostPb(ctx context.Context, req *REQ) (resp *RESP, err error)

func (*Repository[REQ, RESP]) PostPbJson added in v0.0.109

func (r *Repository[REQ, RESP]) PostPbJson(ctx context.Context, req *REQ) (resp *RESP, err error)

func (*Repository[REQ, RESP]) PostPbJsonWithUrl added in v0.0.109

func (r *Repository[REQ, RESP]) PostPbJsonWithUrl(ctx context.Context, url string, req *REQ) (resp *RESP, err error)

type ResponseWriterWrapper added in v0.0.74

type ResponseWriterWrapper struct {
	// contains filtered or unexported fields
}

ResponseWriterWrapper

func NewResponseWriterWrapper added in v0.0.74

func NewResponseWriterWrapper(w http.ResponseWriter) *ResponseWriterWrapper

func (*ResponseWriterWrapper) Header added in v0.0.74

func (rww *ResponseWriterWrapper) Header() http.Header

Header function overwrites the http.ResponseWriter Header() function

func (*ResponseWriterWrapper) String added in v0.0.74

func (rww *ResponseWriterWrapper) String() string

String function pack respose header, http status code and body

func (*ResponseWriterWrapper) Write added in v0.0.74

func (rww *ResponseWriterWrapper) Write(buf []byte) (int, error)

func (*ResponseWriterWrapper) WriteHeader added in v0.0.74

func (rww *ResponseWriterWrapper) WriteHeader(statusCode int)

WriteHeader function overwrites the http.ResponseWriter WriteHeader() function

type RoundTripFunc added in v0.0.117

type RoundTripFunc func(req *http.Request) (resp *http.Response, err error)

func (RoundTripFunc) RoundTrip added in v0.0.117

func (f RoundTripFunc) RoundTrip(req *http.Request) (resp *http.Response, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL