Documentation
¶
Index ¶
- Constants
- func DefaultHTTPServerSettings(in *goHttp.Server, _ context.Context) error
- func Download(ctx context.Context, client *goHttp.Client, format string, args ...interface{}) ([]byte, error)
- func InitConfiguration(cmd *cobra.Command) error
- func Insecure(in *tls.Config)
- func NewError(code int, format string, args ...any) error
- func NewSimpleJSONResponse(obj interface{}) (goHttp.Handler, error)
- func NewWriter(w goHttp.ResponseWriter, stream io.Writer) goHttp.ResponseWriter
- func RoundTripper(mods ...util.Mod[goHttp.Transport]) goHttp.RoundTripper
- func RoundTripperWithShortTransport(mods ...util.Mod[goHttp.Transport]) goHttp.RoundTripper
- func Transport(mods ...util.Mod[goHttp.Transport]) goHttp.RoundTripper
- func WithBuffer(maxSize int, in goHttp.HandlerFunc) goHttp.HandlerFunc
- func WithContentType(content string, in goHttp.HandlerFunc) goHttp.HandlerFunc
- func WithEncoding(in goHttp.HandlerFunc) goHttp.HandlerFunc
- func WithGZipEncoding(in goHttp.HandlerFunc) goHttp.HandlerFunc
- func WithIdentityEncoding(in goHttp.HandlerFunc) goHttp.HandlerFunc
- func WithNoContent(in goHttp.HandlerFunc) goHttp.HandlerFunc
- func WithRootCA(ca *x509.CertPool) util.Mod[tls.Config]
- func WithServeMux(mods ...util.Mod[goHttp.ServeMux]) util.ModEP1[goHttp.Server, context.Context]
- func WithTLSConfigFetcher(fetcher util.TLSConfigFetcher) util.ModEP1[goHttp.Server, context.Context]
- func WithTLSConfigFetcherGen(gen func() util.TLSConfigFetcher) util.ModEP1[goHttp.Server, context.Context]
- func WithTextContentType(in goHttp.HandlerFunc) goHttp.HandlerFunc
- func WithTransportTLS(mods ...util.Mod[tls.Config]) util.Mod[goHttp.Transport]
- func WrapError(code int, err error) error
- type Buffer
- type Client
- type Error
- type HTTPClient
- type Headers
- type Server
Constants ¶
View Source
const ( EncodingAcceptHeader = "Accept-Encoding" EncodingResponseHeader = "Content-Encoding" )
View Source
const (
ContentLengthHeader = "Content-Length"
)
View Source
const ContentTypeHeader = "Content-Type"
Variables ¶
This section is empty.
Functions ¶
func InitConfiguration ¶
func NewSimpleJSONResponse ¶
NewSimpleJSONResponse returns handler which server static json on GET request
func NewWriter ¶
func NewWriter(w goHttp.ResponseWriter, stream io.Writer) goHttp.ResponseWriter
func RoundTripper ¶
func WithBuffer ¶
func WithBuffer(maxSize int, in goHttp.HandlerFunc) goHttp.HandlerFunc
func WithContentType ¶
func WithContentType(content string, in goHttp.HandlerFunc) goHttp.HandlerFunc
func WithEncoding ¶
func WithEncoding(in goHttp.HandlerFunc) goHttp.HandlerFunc
func WithGZipEncoding ¶
func WithGZipEncoding(in goHttp.HandlerFunc) goHttp.HandlerFunc
func WithIdentityEncoding ¶
func WithIdentityEncoding(in goHttp.HandlerFunc) goHttp.HandlerFunc
func WithNoContent ¶
func WithNoContent(in goHttp.HandlerFunc) goHttp.HandlerFunc
func WithServeMux ¶
func WithTLSConfigFetcher ¶
func WithTLSConfigFetcherGen ¶
func WithTextContentType ¶
func WithTextContentType(in goHttp.HandlerFunc) goHttp.HandlerFunc
func WithTransportTLS ¶
Types ¶
type HTTPClient ¶
func NewHTTPClient ¶
func NewHTTPClient(mods ...util.Mod[goHttp.Client]) HTTPClient
type Headers ¶
func ParseHeaders ¶
Click to show internal directories.
Click to hide internal directories.