Documentation ¶
Index ¶
- Constants
- type ZeroAppSecretFetcher
- type ZeroSignature
- func NewSignatureKeyValueParser(req *http.Request, fetchers ...ZeroAppSecretFetcher) (*ZeroSignature, map[string]string, error)
- func NewSignatureMaker(appname, secret string) *ZeroSignature
- func NewSignatureParser(xhttpreq *http.Request, fetchers ...ZeroAppSecretFetcher) (*ZeroSignature, error)
- func NewSignatureRawParser(req *http.Request, fetchers ...ZeroAppSecretFetcher) (*ZeroSignature, *structs.ZeroRequest, error)
- func NewSignatureStreamParser(req *http.Request, maxmem int64, fetchers ...ZeroAppSecretFetcher) (*ZeroSignature, *server.XhttpFromFile, error)
- func (zox *ZeroSignature) AddParam(k string, v string) *ZeroSignature
- func (zox *ZeroSignature) AddParams(params map[string]string) *ZeroSignature
- func (zox *ZeroSignature) AddRaw(raw []byte) *ZeroSignature
- func (zox *ZeroSignature) AddStream(name string, stream []byte) *ZeroSignature
- func (zox *ZeroSignature) Check() error
- func (zox *ZeroSignature) Complete() error
- func (zox *ZeroSignature) Xhttpreq() *http.Request
Constants ¶
View Source
const ( ZERO_SIGNATURE_NONCE_PREFIX = "ZERO_NONCE_" ZERO_SIGNATURE_NONCE_VALUE = "cooling" HEADER_SIGNATURE_APP = "ZoXappname" HEADER_SIGNATURE_SECRET = "ZoXsecret" HEADER_SIGNATURE_NONCE = "ZoXnonce" HEADER_SIGNATURE_TIMESTAMP = "ZoXtimestamp" HEADER_SIGNATURE_SIGN = "ZoXsignature" SIGNATURE_RAW = "ZoXraw" SIGNATURE_OVERFLOW_TIME = 600 SIGNATURE_VALID_DURATION = 1200 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZeroAppSecretFetcher ¶
type ZeroAppSecretFetcher interface {
FetchSecret(*ZeroSignature) string
}
type ZeroSignature ¶
type ZeroSignature struct { ZoXappname string ZoXsecret string ZoXnonce string ZoXtimestamp int64 ZoXsignature string // contains filtered or unexported fields }
func NewSignatureKeyValueParser ¶
func NewSignatureKeyValueParser(req *http.Request, fetchers ...ZeroAppSecretFetcher) (*ZeroSignature, map[string]string, error)
func NewSignatureMaker ¶
func NewSignatureMaker(appname, secret string) *ZeroSignature
func NewSignatureParser ¶
func NewSignatureParser(xhttpreq *http.Request, fetchers ...ZeroAppSecretFetcher) (*ZeroSignature, error)
func NewSignatureRawParser ¶
func NewSignatureRawParser(req *http.Request, fetchers ...ZeroAppSecretFetcher) (*ZeroSignature, *structs.ZeroRequest, error)
func NewSignatureStreamParser ¶
func NewSignatureStreamParser(req *http.Request, maxmem int64, fetchers ...ZeroAppSecretFetcher) (*ZeroSignature, *server.XhttpFromFile, error)
func (*ZeroSignature) AddParam ¶
func (zox *ZeroSignature) AddParam(k string, v string) *ZeroSignature
func (*ZeroSignature) AddParams ¶
func (zox *ZeroSignature) AddParams(params map[string]string) *ZeroSignature
func (*ZeroSignature) AddRaw ¶
func (zox *ZeroSignature) AddRaw(raw []byte) *ZeroSignature
func (*ZeroSignature) AddStream ¶
func (zox *ZeroSignature) AddStream(name string, stream []byte) *ZeroSignature
func (*ZeroSignature) Check ¶
func (zox *ZeroSignature) Check() error
func (*ZeroSignature) Complete ¶
func (zox *ZeroSignature) Complete() error
func (*ZeroSignature) Xhttpreq ¶ added in v1.12.15
func (zox *ZeroSignature) Xhttpreq() *http.Request
Click to show internal directories.
Click to hide internal directories.