Documentation
¶
Index ¶
- Constants
- func CheckValid(req *http.Request, keeper SecretKeeper) (bool, error)
- func Sign(content, key string) string
- func SignHeader(s bool)
- type Client
- func (c *Client) Delete(uri, body string, headers ...http.Header) (string, error)
- func (c *Client) Get(uri string, headers ...http.Header) (string, error)
- func (c *Client) Post(uri, body string, headers ...http.Header) (string, error)
- func (c *Client) Put(uri, body string, headers ...http.Header) (string, error)
- type DefaultProvider
- type KvPair
- type Pairs
- type SecretKeeper
Constants ¶
View Source
const (
EmptyString = ""
)
Variables ¶
This section is empty.
Functions ¶
func CheckValid ¶
func CheckValid(req *http.Request, keeper SecretKeeper) (bool, error)
CheckValid to check if the request is valid from the signing key can't do the judge for you automatically, cause you may want to return something that is defined by yourself, and the call back form is not quite certain.
Types ¶
type Client ¶
type Client struct { Key string Keeper SecretKeeper }
func DefaultClient ¶
func NewClient ¶
func NewClient(keeper SecretKeeper, key string) *Client
type DefaultProvider ¶
type SecretKeeper ¶
SecretKeeper the interface to get the secret
Click to show internal directories.
Click to hide internal directories.