safebox

package
v0.0.0-...-ea1d8b2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeInfoReply

type CodeInfoReply struct {
	Code string `json:"code"`
}

CodeInfoReply ...

type ISafeboxClient

type ISafeboxClient interface {
	// TrusteeKeyPair is used to trutee keypair.
	//
	// API-Key must set to header.
	TrusteeKeyPair(http.Header, *SaveKeyPairRequetBody) (*SaveKeyPairReply, error)

	// QueryPrivateKey is used to query private key.
	//
	// API-Key must set to header.
	QueryPrivateKey(http.Header, *OperateKeyInfo) (*PrivateKeyReply, error)

	// QueryPublicKey is used to query public key.
	//
	// API-Key must set to header.
	QueryPublicKey(http.Header, *OperateKeyInfo) (*PublicKeyReply, error)

	// DeleteKeyPair is used to delete keypair.
	//
	// API-Key must set to header.
	DeleteKeyPair(http.Header, *OperateKeyInfo) error

	// UpdateAssistCode is used to update assist code.
	//
	// API-Key must set to header.
	UpdateAssistCode(http.Header, *UpdateSecurityCodeRequestBody) error

	// RecoverAssistCode is used to recover assist code when user has forgot.
	//
	// API-Key must set to header.
	RecoverAssistCode(http.Header, commdid.Identifier) (*CodeInfoReply, error)
}

ISafeboxClient defines the behaviors implemented by safebox sdk

type OperateKeyInfo

type OperateKeyInfo struct {
	UserDid string `json:"user_did"`
	Code    string `json:"code"`
}

OperateKeyInfo ...

type PrivateKeyReply

type PrivateKeyReply struct {
	PrivateKey string `json:"private_key"`
}

PrivateKeyReply ...

type PublicKeyReply

type PublicKeyReply struct {
	PublicKey string `json:"public_key"`
}

PublicKeyReply ...

type SaveKeyPairReply

type SaveKeyPairReply struct {
	Code string `json:"code"`
}

SaveKeyPairReply define save KeyPair reply

type SaveKeyPairRequetBody

type SaveKeyPairRequetBody struct {
	UserDid    string `json:"user_did"`
	PrivateKey string `json:"private_key"`
	PublicKey  string `json:"public_key"`
}

SaveKeyPairRequetBody define save KeyPair request body

type UpdateSecurityCodeRequestBody

type UpdateSecurityCodeRequestBody struct {
	UserDid      string `json:"user_did"`
	OriginalCode string `json:"original_code"`
	NewCode      string `json:"new_code"`
}

UpdateSecurityCodeRequestBody ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL