resolver

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAccountHasNoActiveGuardian = errors.New("no active guardian for the account")

ErrAccountHasNoActiveGuardian signals that there is no active guardian for the user

View Source
var ErrEmptyUrl = errors.New("empty url")

ErrEmptyUrl signals that an empty url was provided

View Source
var ErrGuardianMismatch = errors.New("guardian mismatch")

ErrGuardianMismatch signals that a guardian mismatch was detected on transactions

View Source
var ErrGuardianNotUsable = errors.New("guardian not yet usable")

ErrGuardianNotUsable signals that the given guardian is not yet usable

View Source
var ErrInvalidGuardian = errors.New("invalid guardian")

ErrInvalidGuardian signals that the given guardian is not valid

View Source
var ErrInvalidSender = errors.New("invalid sender")

ErrInvalidSender signals that the given sender is not valid

View Source
var ErrInvalidValue = errors.New("invalid value")

ErrInvalidValue signals that an invalid value was provided

View Source
var ErrNilCryptoComponentsHolderFactory = errors.New("nil crypto components holder factory")

ErrNilCryptoComponentsHolderFactory signals that a nil crypto components holder factory was provided

View Source
var ErrNilDB = errors.New("nil db")

ErrNilDB signals that a nil db was provided

View Source
var ErrNilEncryptor = errors.New("nil encryptor")

ErrNilEncryptor signals that a nil encryptor was provided

View Source
var ErrNilGuardedTxBuilder = errors.New("nil guarded tx builder")

ErrNilGuardedTxBuilder signals that a nil guarded tx builder was provided

View Source
var ErrNilHTTPClientWrapper = errors.New("nil http client wrapper")

ErrNilHTTPClientWrapper signals that a nil http client wrapper was provided

View Source
var ErrNilHasher = errors.New("nil hasher")

ErrNilHasher signals that a nil hasher was provided

View Source
var ErrNilKeyGenerator = errors.New("nil key generator")

ErrNilKeyGenerator signals that a nil key generator was provided

View Source
var ErrNilKeysGenerator = errors.New("nil keys generator")

ErrNilKeysGenerator signals that a nil keys generator was provided

View Source
var ErrNilMarshaller = errors.New("nil marshaller")

ErrNilMarshaller signals that a nil marshaller was provided

View Source
var ErrNilPubKeyConverter = errors.New("nil pub key converter")

ErrNilPubKeyConverter signals that a nil pub key converter was provided

View Source
var ErrNilSecureOtpHandler = errors.New("nil secure TOTP handler")

ErrNilSecureOtpHandler signals that a nil secure TOTP handler was provided

View Source
var ErrNilSignatureVerifier = errors.New("nil signature verifier")

ErrNilSignatureVerifier signals that a nil signature verifier was provided

View Source
var ErrNilTOTPHandler = errors.New("nil TOTP handler")

ErrNilTOTPHandler signals that a nil TOTP handler was provided

View Source
var ErrNilUserEncryptor = errors.New("nil user encryptor")

ErrNilUserEncryptor signals that a nil user encryptor was provided

View Source
var ErrNilUserInfo = errors.New("nil user info")

ErrNilUserInfo signals that a nil user info was provided

View Source
var ErrNoBalance = errors.New("no balance")

ErrNoBalance signals that the provided account has no balance

View Source
var ErrNoTransactionToSign = errors.New("no transaction to sign")

ErrNoTransactionToSign signals that no transaction was provided to sign

View Source
var ErrSameCode = errors.New("same code")

ErrSameCode signals that same code was provided

View Source
var ErrSecondCodeInvalidInSecurityMode = errors.New("second code is invalid in security mode")

ErrSecondCodeInvalidInSecurityMode signals that the second code is invalid in security mode

View Source
var ErrTooManyTransactionsToSign = errors.New("too many transactions to sign")

ErrTooManyTransactionsToSign signals that too many transactions were provided to sign

Functions

func NewServiceResolver

func NewServiceResolver(args ArgServiceResolver) (*serviceResolver, error)

NewServiceResolver returns a new instance of service resolver

func NewUserEncryptor

func NewUserEncryptor(encryptor Encryptor) (*userEncryptor, error)

NewUserEncryptor creates a new instance of userEncryptor

Types

type ArgServiceResolver

type ArgServiceResolver struct {
	UserEncryptor                 UserEncryptor
	TOTPHandler                   handlers.TOTPHandler
	SecureOtpHandler              handlers.SecureOtpHandler
	HttpClientWrapper             core.HttpClientWrapper
	KeysGenerator                 core.KeysGenerator
	PubKeyConverter               core.PubkeyConverter
	UserDataMarshaller            core.Marshaller
	TxMarshaller                  core.Marshaller
	TxHasher                      data.Hasher
	SignatureVerifier             builders.Signer
	GuardedTxBuilder              core.GuardedTxBuilder
	RegisteredUsersDB             core.StorageWithIndex
	KeyGen                        crypto.KeyGenerator
	CryptoComponentsHolderFactory CryptoComponentsHolderFactory
	Config                        config.ServiceResolverConfig
}

ArgServiceResolver is the DTO used to create a new instance of service resolver

type CryptoComponentsHolderFactory

type CryptoComponentsHolderFactory interface {
	Create(privateKeyBytes []byte) (sdkCore.CryptoComponentsHolder, error)
	IsInterfaceNil() bool
}

CryptoComponentsHolderFactory is the interface that defines the methods that can be used to create a new instance of CryptoComponentsHolder

type Encryptor

type Encryptor interface {
	EncryptData(data []byte) ([]byte, error)
	DecryptData(data []byte) ([]byte, error)
	IsInterfaceNil() bool
}

Encryptor is the interface that defines the methods that can be used to encrypt and decrypt data

type UserEncryptor

type UserEncryptor interface {
	EncryptUserInfo(userInfo *core.UserInfo) (*core.UserInfo, error)
	DecryptUserInfo(userInfo *core.UserInfo) (*core.UserInfo, error)
	IsInterfaceNil() bool
}

UserEncryptor is the interface that defines the methods that can be used to encrypt and decrypt user info

Jump to

Keyboard shortcuts

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