Documentation ¶
Index ¶
- Constants
- Variables
- func BLSSign(seed, payload []byte) ([]byte, error)
- func BLSVerify(seed, msg, sig []byte) error
- func CreateAMCLRng() (*crypto.Rand, error)
- func DecodeJSON(r *http.Request, v interface{}) error
- func DecodeRequest(req interface{}, hr *http.Request) error
- func NewLogger(cfg *config.Logging) *zap.SugaredLogger
- func NewTestLogger() *zap.SugaredLogger
- func RandomBytes(size int) ([]byte, error)
- func URLActionApprove(baseURL, actionID string) string
- func URLActionMessages(baseURL, actionID string) string
- func URLActionReject(baseURL, actionID string) string
- func URLClientInit(baseURL string) string
- func URLRegisterConfirm(baseURL string) string
- func ZKPOnePass(zkpID, zkpToken []byte, pin int) ([]byte, error)
- type AWSStore
- type Client
- type FileStore
- type HTTPClient
- type KVStore
- type MockHTTPClient
- type OciStore
Constants ¶
View Source
const (
AMCLRandomSeedSize = 48
)
View Source
const (
SecretNotInitialised string = "initialise me"
)
SecretNotInitialised is used to identify an uninitialised AWS secret.
Variables ¶
Functions ¶
func CreateAMCLRng ¶
CreateAMCLRng creates a new AMCL RNG with a random seed
func DecodeJSON ¶
DecodeJSON decodes request JSON body returns ServerError on failure
func DecodeRequest ¶
func NewTestLogger ¶
func NewTestLogger() *zap.SugaredLogger
func RandomBytes ¶
func URLActionApprove ¶
func URLActionMessages ¶
func URLActionReject ¶
func URLClientInit ¶
func URLRegisterConfirm ¶
Types ¶
type AWSStore ¶
type AWSStore struct {
// contains filtered or unexported fields
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient() *Client
func NewHTTPMockClient ¶
func NewHTTPMockClient() *Client
type HTTPClient ¶
HTTPClient interface
type KVStore ¶
type KVStore interface { // Get returns the data for given key. If key is not found, return nil, defs.KVErrNotFound Get(key string) ([]byte, error) Set(key string, data []byte) error Del(key string) error Init() error }
KVStore is an interface to a simple key-value store used by the core lib
func CreateStore ¶
func NewAWSStore ¶
NewAWSStore creates and return the AWS KVStore.
func NewFileStore ¶
func NewOciStore ¶
type MockHTTPClient ¶
Click to show internal directories.
Click to hide internal directories.