storage

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PatternWalletByChain pattern for wallet
	/*

		PatternWalletByChain = [global|namespace]/wallet/[cryptoType]/[chain]/[address]
		PatternWallet = [global|namespace]/wallet/[cryptoType]/[def_address]
		PatternWalletAdmin = "global/wallet/[cryptoType]"
	*/
	PatternWalletByChain = "%s/wallet/%s/%s/%s"
	PatternWallet        = "%s/wallet/%s/%s"
	PatternWalletAdmin   = "%s/wallet/%s"
)
View Source
const (
	// PatternAlias is the pattern for the alias storage path
	/* PatternAlias = "%s/alias/%s/%s"
	 * [namespace]/alias/[type]/[address]
	 * e.g. type = social/discord global/alias/discord/0x1234567890
	 * e.g. type = wallet/eth global/alias/wallet/eth/0x1234567890
	 */
	PatternAlias = "%s/alias/%s/%s"
)
View Source
const (
	// PatternPolicy policy path pattern
	/*
		e.g. [global|namespace]/policy/[crypto_type]/[chain]
	*/
	PatternPolicy = "%s/policy/%s/%s"
)
View Source
const (
	// PatternSocialID is the pattern for the storage path of a social id
	/*

		[global | namespace]/social/[app]/[user]

		e.g. [global | namespace]/social/discord/123456789
	*/
	PatternSocialID = "%s/social/%s/%s"
)

Variables

View Source
var (
	ErrWalletNotFound  = errors.New("wallet not found")
	ErrCryptoTypeIsNil = errors.New("crypto type is nil")
)

Functions

This section is empty.

Types

type Core

type Core struct {
	Wallet *walletStorage
	Policy *policyStorage
	Alias  *aliasStorage
	Social *socialIDStorage
}

func Standard

func Standard() *Core

Jump to

Keyboard shortcuts

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