address

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateHandle

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

func Create

func Create(db *sql.DB, domain string) CreateHandle

Create returns a handle to create and persist a Address.

func (CreateHandle) WithRandom

func (c CreateHandle) WithRandom() (*session.Address, error)

WithRandom persists an address with the randomized username by uuid.

func (CreateHandle) WithUser

func (c CreateHandle) WithUser(user string) (*session.Address, error)

WithUser persists an address with the specified username.

type FindHandle

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

func Find

func Find(db *sql.DB) FindHandle

Find returns a handle to get Addresses.

func (FindHandle) All

func (f FindHandle) All() (*[]session.Address, error)

All returns an array of Address.

func (FindHandle) Exists

func (f FindHandle) Exists(addr session.Address) bool

Exists returns the addr exists in the DB or not.

func (FindHandle) Validate

func (f FindHandle) Validate(t session.Transaction) error

Jump to

Keyboard shortcuts

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