Documentation ¶
Index ¶
- Constants
- Variables
- func Base64Decode(src string) string
- func Base64Encode(src string) string
- func Base64UrlDecode(src string) string
- func Base64UrlDecodeNoPad(src string) string
- func Base64UrlEncode(src string) string
- func Base64UrlEncodeNoPad(src string) string
- func IsNegativeZero(v float64) bool
- func IsPositiveZero(v float64) bool
- func IsSubnormalFloat64(v float64) bool
- func IsValidHeader(name string) bool
- func UrlDecode(src string) (string, error)
- func UrlEncode(src string) (string, error)
- type CryptoCodec
- type QueryString
- type QueryStrings
- func (q *QueryStrings) Add(name, val string)
- func (q *QueryStrings) Clean()
- func (q *QueryStrings) Filter(filter func(name string) bool)
- func (q *QueryStrings) Get(name string) *string
- func (q *QueryStrings) Set(name, val string)
- func (q *QueryStrings) Sort(mode SortMode)
- func (q *QueryStrings) String() string
- type SortMode
Constants ¶
View Source
const ( NOPAD = "nopad" CBC = "cbc" CTR = "ctr" PKCS7 = "pkcs7" )
Ident values constants
Variables ¶
View Source
var BlockSizeMap = map[string]int{
"aes128": 16,
"aes192": 24,
"aes256": 32,
}
View Source
var ErrInvalidMultiByteSequence = errors.New("Invalid multi-byte sequence")
Functions ¶
func Base64UrlDecodeNoPad ¶ added in v1.11.0
base64-url nopadding decoding
func Base64UrlEncodeNoPad ¶ added in v1.11.0
base64-url nopadding encoding
func IsNegativeZero ¶
func IsPositiveZero ¶
func IsSubnormalFloat64 ¶
func IsValidHeader ¶
Types ¶
type CryptoCodec ¶
type CryptoCodec struct {
// contains filtered or unexported fields
}
CryptoCodec is common cryptographic for Fastly builtin function
func NewCryptoCodec ¶
func NewCryptoCodec( name string, cipherId, mode, padding string, ) (*CryptoCodec, error)
type QueryString ¶
type QueryStrings ¶
type QueryStrings struct { Prefix string // protocol, host, port, path Items []*QueryString }
We implement original querytring struct in order to maname URL queries keeping its order. url.Values are useful in Golang but Encode() result does not care its order because it is managed in map and always sort by query name. On VCL, we need to keep query raw-order as present, this struct solved them.
func ParseQuery ¶
func ParseQuery(qs string) (*QueryStrings, error)
func (*QueryStrings) Add ¶
func (q *QueryStrings) Add(name, val string)
func (*QueryStrings) Clean ¶
func (q *QueryStrings) Clean()
func (*QueryStrings) Filter ¶
func (q *QueryStrings) Filter(filter func(name string) bool)
func (*QueryStrings) Get ¶
func (q *QueryStrings) Get(name string) *string
func (*QueryStrings) Set ¶
func (q *QueryStrings) Set(name, val string)
func (*QueryStrings) Sort ¶
func (q *QueryStrings) Sort(mode SortMode)
func (*QueryStrings) String ¶
func (q *QueryStrings) String() string
Click to show internal directories.
Click to hide internal directories.