client

package
v0.0.0-...-553ec8c Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePrivateData

func DecodePrivateData(private_data string) string

func NewWallet

func NewWallet(wallet_id uuid.UUID, public_key string, private_key string) wallet

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(client_id uuid.UUID,
	client_first_name string,
	client_last_name string,
	email string, password string, wallets []wallet,
) (client Client)

func (*Client) GetAuthToken

func (client *Client) GetAuthToken(password string) (string, error)

func (*Client) GetClientId

func (client *Client) GetClientId() uuid.UUID

func (*Client) GetEmail

func (client *Client) GetEmail() string

func (*Client) GetFirstName

func (client *Client) GetFirstName() string

func (*Client) GetLastName

func (client *Client) GetLastName() string

func (*Client) GetWallets

func (client *Client) GetWallets() []wallet

type ClientRepository

type ClientRepository struct {
	// contains filtered or unexported fields
}

func NewClientRepository

func NewClientRepository(url string, ctx context.Context) (ClientRepository, error)

func (*ClientRepository) GetClientByEmail

func (repository *ClientRepository) GetClientByEmail(email string) (Client, error)

func (*ClientRepository) GetClientById

func (repository *ClientRepository) GetClientById(id uuid.UUID) (Client, error)

func (*ClientRepository) GetWalletsByUserId

func (repository *ClientRepository) GetWalletsByUserId(id uuid.UUID) ([]wallet, error)

type UserColumns

type UserColumns struct {
	UserId    uuid.UUID `db:"user_id"`
	FirstName string    `db:"first_name"`
	LastName  string    `db:"last_name"`
	Email     string    `db:"email"`
	Password  string    `db:"user_password"`
}

type UserNotFoundError

type UserNotFoundError struct {
	// contains filtered or unexported fields
}

func (*UserNotFoundError) Error

func (e *UserNotFoundError) Error() string

type WalletColumn

type WalletColumn struct {
	WalletId   uuid.UUID `db:"wallet_id"`
	UserId     uuid.UUID `db:"user_id"`
	PublicKey  string    `db:"public_key"`
	PrivateKey string    `db:"private_key"`
}

type WrongPasswordError

type WrongPasswordError struct {
	// contains filtered or unexported fields
}

func (*WrongPasswordError) Error

func (e *WrongPasswordError) Error() string

Jump to

Keyboard shortcuts

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