Documentation ¶
Index ¶
- Constants
- func CheckValid(req *http.Request, keeper SecretKeeper) (bool, error)
- func New(keeper SecretKeeper, sucFunc, failFunc func()) *openApi
- 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 PgSqlSecretKeeper
- type SecretKeeper
- type SqlSecretKeeper
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
func New ¶ added in v0.0.8
func New(keeper SecretKeeper, sucFunc, failFunc func()) *openApi
Types ¶
type Client ¶ added in v0.0.3
type Client struct { Key string Keeper SecretKeeper }
func DefaultClient ¶ added in v0.0.3
func NewClient ¶ added in v0.0.3
func NewClient(keeper SecretKeeper, key string) *Client
type DefaultProvider ¶ added in v0.0.3
type PgSqlSecretKeeper ¶ added in v0.0.3
type PgSqlSecretKeeper struct { Db *sql.DB // the client to access database TableName string // the table where the secret stores KeyCol string // the column name of the key SecretCol string // the column name of the secret }
default provided sql
func (PgSqlSecretKeeper) GeneratePair ¶ added in v0.0.3
func (s PgSqlSecretKeeper) GeneratePair() *KvPair
type SecretKeeper ¶
the interface to get the secret
type SqlSecretKeeper ¶
type SqlSecretKeeper struct { Db *sql.DB // the client to access database TableName string // the table where the secret stores KeyCol string // the column name of the key SecretCol string // the column name of the secret }
default provided sql
func (SqlSecretKeeper) GeneratePair ¶
func (s SqlSecretKeeper) GeneratePair() *KvPair
Click to show internal directories.
Click to hide internal directories.