Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Profile ¶
type Profile struct {
// ClientAcceptEncoding holds the Client's Accept-Encoding header value, as received
ClientAcceptEncoding string
// Supported is the Client-Accepted Encodings filtered against Trickster supported Encodings
// represented as a bitmap
Supported providers.Provider
// SupportedHeaderVal is the Accept-Encoding value representation of the Supported byte
// that is used when proxying to an origin
SupportedHeaderVal string
// NoTransform is true if the client sent a Cache-Control header with a 'no-transform' value
NoTransform bool
// ContentEncoding holds the Response's Content-Encoding header value, if any
ContentEncoding string
// ContentType holds the Response's Content-Type header value, if any
ContentType string
// CompressTypes is a lookup map of any Content Types that should be compressed
CompressTypes sets.Set[string]
// ContentEncodingNum is the numeric value for the ContentEncoding string
ContentEncodingNum providers.Provider
Level int // todo: set this at some point
}
func FromContext ¶
func (*Profile) ClientAcceptsEncoding ¶
func (*Profile) GetDecoderInitializer ¶
func (p *Profile) GetDecoderInitializer() providers.DecoderInitializer
GetDecoderInitializer returns a decoder based on the profile's Content-Encoding header
func (*Profile) GetEncoderInitializer ¶
func (p *Profile) GetEncoderInitializer() (providers.EncoderInitializer, string)
GetEncoderInitializer returns an encoder based on the profile's Content-Type and Accept-Encoding headers
Click to show internal directories.
Click to hide internal directories.