httpenc

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: MIT Imports: 10 Imported by: 0

README

= httpenc

image::https://pkg.go.dev/badge/github.com/kechako/httpenc.svg[link="https://pkg.go.dev/github.com/kechako/httpenc",alt="Go Reference"]

Package httpenc provides a handler to encode a response content.

== Install

[source, console]
----
go get github.com/kechako/httpenc
----

== License

MIT - See link:LICENSE[LICENSE] file

Documentation

Overview

Package httpenc provides a handler to encode a response content.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(next http.Handler, opts ...Option) http.Handler

Handler returns a handler that encodes a response content.

Types

type EncodingType

type EncodingType string
const (
	Gzip    EncodingType = "gzip"
	Deflate EncodingType = "deflate"
	Brotli  EncodingType = "br"
)

func (EncodingType) IsValid

func (typ EncodingType) IsValid() bool

type Option

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

func BrotliLevel

func BrotliLevel(level int) Option

func DeflateLevel

func DeflateLevel(level int) Option

func GzipLevel

func GzipLevel(level int) Option

Jump to

Keyboard shortcuts

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