account

package
v0.0.0-...-8e6870d Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEthAccount

func CreateEthAccount() (privKey, pubKey, ethAddress string)

func CreateSecret

func CreateSecret(key, payload string) error

func DeleteSecret

func DeleteSecret(key string) error

func GetSecretValue

func GetSecretValue(key string) (string, error)

Types

type AccountInfo

type AccountInfo struct {
	ID      string `firestore:"id"`
	Pubkey  string `firestore:"pubkey"`
	Address string `firestore:"ethAddress"`
}

type AccountRepository

type AccountRepository struct {
	CollectionName string
	Client         *firestore.Client
}

func (*AccountRepository) CreateUser

func (ar *AccountRepository) CreateUser(data *AccountInfo) error

func (*AccountRepository) DeleteRespository

func (ar *AccountRepository) DeleteRespository() error

func (*AccountRepository) DeleteUser

func (ar *AccountRepository) DeleteUser(id string) error

func (*AccountRepository) Exists

func (ar *AccountRepository) Exists() bool

func (*AccountRepository) GetOrCreateRepository

func (ar *AccountRepository) GetOrCreateRepository() *firestore.CollectionRef

func (*AccountRepository) GetUser

func (ar *AccountRepository) GetUser(id string) (*AccountInfo, error)

func (*AccountRepository) UpdateUser

func (ar *AccountRepository) UpdateUser(data *AccountInfo) error

Jump to

Keyboard shortcuts

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