Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNonceNotInRange = errors.New("Nonce submit is not in aceptable range")
ErrNonceNotInRange error when nonce not in aceptable range
Functions ¶
func NewAuthenticator ¶
func NewAuthenticator(readKeyID, readKeySecret, writeKeyID, writeKeySecret string) (*httpsign.Authenticator, error)
NewAuthenticator create a httpsign.Authenticator to check the message signing is valid or not
func NewPermissioner ¶
func NewPermissioner(readKeyID, writeKeyID string) (gin.HandlerFunc, error)
NewPermissioner creates a gin Handle Func to controll permission currently there is only 2 permission for POST/GET requests
Types ¶
type NonceValidator ¶
type NonceValidator struct { // TimeGap is max time different between client submit timestamp // and server time that considered valid. The time precision is millisecond. TimeGap uint64 }
NonceValidator checking validate by time range
func NewNonceValidator ¶
func NewNonceValidator() *NonceValidator
NewNonceValidator return NonceValidator with default value (30 second)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is HTTP server of gateway service.
Click to show internal directories.
Click to hide internal directories.