v2

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2019 License: Apache-2.0 Imports: 16 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthGzip = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGzip   = fmt.Errorf("proto: integer overflow")
)
View Source
var Gzip_CompressionLevel_Enum_name = map[int32]string{
	0: "DEFAULT",
	1: "BEST",
	2: "SPEED",
}
View Source
var Gzip_CompressionLevel_Enum_value = map[string]int32{
	"DEFAULT": 0,
	"BEST":    1,
	"SPEED":   2,
}
View Source
var Gzip_CompressionStrategy_name = map[int32]string{
	0: "DEFAULT",
	1: "FILTERED",
	2: "HUFFMAN",
	3: "RLE",
}
View Source
var Gzip_CompressionStrategy_value = map[string]int32{
	"DEFAULT":  0,
	"FILTERED": 1,
	"HUFFMAN":  2,
	"RLE":      3,
}

Functions

This section is empty.

Types

type Gzip

type Gzip struct {
	// Value from 1 to 9 that controls the amount of internal memory used by zlib. Higher values
	// use more memory, but are faster and produce better compression results. The default value is 5.
	MemoryLevel *types.UInt32Value `protobuf:"bytes,1,opt,name=memory_level,json=memoryLevel,proto3" json:"memory_level,omitempty"`
	// Minimum response length, in bytes, which will trigger compression. The default value is 30.
	ContentLength *types.UInt32Value `protobuf:"bytes,2,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"`
	// A value used for selecting the zlib compression level. This setting will affect speed and
	// amount of compression applied to the content. "BEST" provides higher compression at the cost of
	// higher latency, "SPEED" provides lower compression with minimum impact on response time.
	// "DEFAULT" provides an optimal result between speed and compression. This field will be set to
	// "DEFAULT" if not specified.
	CompressionLevel Gzip_CompressionLevel_Enum `` /* 175-byte string literal not displayed */
	// A value used for selecting the zlib compression strategy which is directly related to the
	// characteristics of the content. Most of the time "DEFAULT" will be the best choice, though
	// there are situations which changing this parameter might produce better results. For example,
	// run-length encoding (RLE) is typically used when the content is known for having sequences
	// which same data occurs many consecutive times. For more information about each strategy, please
	// refer to zlib manual.
	CompressionStrategy Gzip_CompressionStrategy `` /* 182-byte string literal not displayed */
	// Set of strings that allows specifying which mime-types yield compression; e.g.,
	// application/json, text/html, etc. When this field is not defined, compression will be applied
	// to the following mime-types: "application/javascript", "application/json",
	// "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml".
	ContentType []string `protobuf:"bytes,6,rep,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
	// If true, disables compression when the response contains an etag header. When it is false, the
	// filter will preserve weak etags and remove the ones that require strong validation.
	DisableOnEtagHeader bool `protobuf:"varint,7,opt,name=disable_on_etag_header,json=disableOnEtagHeader,proto3" json:"disable_on_etag_header,omitempty"`
	// If true, removes accept-encoding from the request headers before dispatching it to the upstream
	// so that responses do not get compressed before reaching the filter.
	RemoveAcceptEncodingHeader bool `` /* 144-byte string literal not displayed */
	// Value from 9 to 15 that represents the base two logarithmic of the compressor's window size.
	// Larger window results in better compression at the expense of memory usage. The default is 12
	// which will produce a 4096 bytes window. For more details about this parameter, please refer to
	// zlib manual > deflateInit2.
	WindowBits           *types.UInt32Value `protobuf:"bytes,9,opt,name=window_bits,json=windowBits,proto3" json:"window_bits,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*Gzip) Descriptor

func (*Gzip) Descriptor() ([]byte, []int)

func (*Gzip) GetCompressionLevel

func (m *Gzip) GetCompressionLevel() Gzip_CompressionLevel_Enum

func (*Gzip) GetCompressionStrategy

func (m *Gzip) GetCompressionStrategy() Gzip_CompressionStrategy

func (*Gzip) GetContentLength

func (m *Gzip) GetContentLength() *types.UInt32Value

func (*Gzip) GetContentType

func (m *Gzip) GetContentType() []string

func (*Gzip) GetDisableOnEtagHeader

func (m *Gzip) GetDisableOnEtagHeader() bool

func (*Gzip) GetMemoryLevel

func (m *Gzip) GetMemoryLevel() *types.UInt32Value

func (*Gzip) GetRemoveAcceptEncodingHeader

func (m *Gzip) GetRemoveAcceptEncodingHeader() bool

func (*Gzip) GetWindowBits

func (m *Gzip) GetWindowBits() *types.UInt32Value

func (*Gzip) Marshal

func (m *Gzip) Marshal() (dAtA []byte, err error)

func (*Gzip) MarshalTo

func (m *Gzip) MarshalTo(dAtA []byte) (int, error)

func (*Gzip) ProtoMessage

func (*Gzip) ProtoMessage()

func (*Gzip) Reset

func (m *Gzip) Reset()

func (*Gzip) Size

func (m *Gzip) Size() (n int)

func (*Gzip) String

func (m *Gzip) String() string

func (*Gzip) Unmarshal

func (m *Gzip) Unmarshal(dAtA []byte) error

func (*Gzip) Validate

func (m *Gzip) Validate() error

Validate checks the field values on Gzip with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Gzip) XXX_DiscardUnknown

func (m *Gzip) XXX_DiscardUnknown()

func (*Gzip) XXX_Marshal

func (m *Gzip) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Gzip) XXX_Merge

func (m *Gzip) XXX_Merge(src proto.Message)

func (*Gzip) XXX_Size

func (m *Gzip) XXX_Size() int

func (*Gzip) XXX_Unmarshal

func (m *Gzip) XXX_Unmarshal(b []byte) error

type GzipValidationError

type GzipValidationError struct {
	Field  string
	Reason string
	Cause  error
	Key    bool
}

GzipValidationError is the validation error returned by Gzip.Validate if the designated constraints aren't met.

func (GzipValidationError) Error

func (e GzipValidationError) Error() string

Error satisfies the builtin error interface

type Gzip_CompressionLevel

type Gzip_CompressionLevel struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Gzip_CompressionLevel) Descriptor

func (*Gzip_CompressionLevel) Descriptor() ([]byte, []int)

func (*Gzip_CompressionLevel) Marshal

func (m *Gzip_CompressionLevel) Marshal() (dAtA []byte, err error)

func (*Gzip_CompressionLevel) MarshalTo

func (m *Gzip_CompressionLevel) MarshalTo(dAtA []byte) (int, error)

func (*Gzip_CompressionLevel) ProtoMessage

func (*Gzip_CompressionLevel) ProtoMessage()

func (*Gzip_CompressionLevel) Reset

func (m *Gzip_CompressionLevel) Reset()

func (*Gzip_CompressionLevel) Size

func (m *Gzip_CompressionLevel) Size() (n int)

func (*Gzip_CompressionLevel) String

func (m *Gzip_CompressionLevel) String() string

func (*Gzip_CompressionLevel) Unmarshal

func (m *Gzip_CompressionLevel) Unmarshal(dAtA []byte) error

func (*Gzip_CompressionLevel) Validate

func (m *Gzip_CompressionLevel) Validate() error

Validate checks the field values on Gzip_CompressionLevel with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Gzip_CompressionLevel) XXX_DiscardUnknown

func (m *Gzip_CompressionLevel) XXX_DiscardUnknown()

func (*Gzip_CompressionLevel) XXX_Marshal

func (m *Gzip_CompressionLevel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Gzip_CompressionLevel) XXX_Merge

func (m *Gzip_CompressionLevel) XXX_Merge(src proto.Message)

func (*Gzip_CompressionLevel) XXX_Size

func (m *Gzip_CompressionLevel) XXX_Size() int

func (*Gzip_CompressionLevel) XXX_Unmarshal

func (m *Gzip_CompressionLevel) XXX_Unmarshal(b []byte) error

type Gzip_CompressionLevelValidationError

type Gzip_CompressionLevelValidationError struct {
	Field  string
	Reason string
	Cause  error
	Key    bool
}

Gzip_CompressionLevelValidationError is the validation error returned by Gzip_CompressionLevel.Validate if the designated constraints aren't met.

func (Gzip_CompressionLevelValidationError) Error

Error satisfies the builtin error interface

type Gzip_CompressionLevel_Enum

type Gzip_CompressionLevel_Enum int32
const (
	Gzip_CompressionLevel_DEFAULT Gzip_CompressionLevel_Enum = 0
	Gzip_CompressionLevel_BEST    Gzip_CompressionLevel_Enum = 1
	Gzip_CompressionLevel_SPEED   Gzip_CompressionLevel_Enum = 2
)

func (Gzip_CompressionLevel_Enum) EnumDescriptor

func (Gzip_CompressionLevel_Enum) EnumDescriptor() ([]byte, []int)

func (Gzip_CompressionLevel_Enum) String

type Gzip_CompressionStrategy

type Gzip_CompressionStrategy int32
const (
	Gzip_DEFAULT  Gzip_CompressionStrategy = 0
	Gzip_FILTERED Gzip_CompressionStrategy = 1
	Gzip_HUFFMAN  Gzip_CompressionStrategy = 2
	Gzip_RLE      Gzip_CompressionStrategy = 3
)

func (Gzip_CompressionStrategy) EnumDescriptor

func (Gzip_CompressionStrategy) EnumDescriptor() ([]byte, []int)

func (Gzip_CompressionStrategy) String

func (x Gzip_CompressionStrategy) String() string

Jump to

Keyboard shortcuts

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