Documentation ¶
Index ¶
- func BuildV2SigningPayload(method string, path string, headers *orderedmap.OrderedMap, body []byte, ...) []byte
- type Signer
- func (s *Signer) AddHeader(name string, value []byte)
- func (s *Signer) Body(body []byte) *Signer
- func (s *Signer) Header(name string, value []byte) *Signer
- func (s *Signer) Headers(headers map[string][]byte) *Signer
- func (s *Signer) Jku(jku string) *Signer
- func (s *Signer) Method(method string) *Signer
- func (s *Signer) Path(path string) *Signer
- func (s *Signer) Sign() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildV2SigningPayload ¶
func BuildV2SigningPayload(method string, path string, headers *orderedmap.OrderedMap, body []byte, addPathTrailingSlash bool) []byte
BuildV2SigningPayload builds a v2 signing payload.
Types ¶
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Builder to generate a "Tl-Signature" header value using a private key.
func (*Signer) AddHeader ¶
AddHeader adds a header name & value. May be called multiple times to add multiple different headers.
Warning: Only a single value per header name is supported.
func (*Signer) Body ¶
Body adds the full request body.
Note: This **must** be identical to what is sent with the request.
func (*Signer) Header ¶
Header adds a header name & value. May be called multiple times to add multiple different headers.
Warning: Only a single value per header name is supported.
func (*Signer) Headers ¶
Headers appends multiple header name & value.
Warning: Only a single value per header name is supported.
Click to show internal directories.
Click to hide internal directories.