storage

package
v0.0.0-...-b2234b5 Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAlreadyExists ErrAlreadyExists
	ErrAlreadyExists = errors.New("object already exists")

	// ErrDoesNotExist ErrDoesNotExist
	ErrDoesNotExist = errors.New("object does not exist")

	// ErrQueryIsCanceled ErrQueryIsCanceled
	ErrQueryIsCanceled = errors.New("query is canceled")
)

Functions

Types

type GoPg

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

GoPg GoPg

func NewGoPg

func NewGoPg() *GoPg

NewGoPg NewGoPg

func (*GoPg) GetUser

func (s *GoPg) GetUser(ctx context.Context, id string) (User, error)

GetUser GetUser

func (*GoPg) GetUsers

func (s *GoPg) GetUsers() ([]User, error)

GetUsers GetUsers

type GoPq

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

GoPq GoPq

func NewGoPq

func NewGoPq() *GoPq

NewGoPq NewGoPq

func (*GoPq) GetUser

func (s *GoPq) GetUser(ctx context.Context, id string) (User, error)

GetUser GetUser

func (*GoPq) GetUsers

func (s *GoPq) GetUsers() ([]User, error)

GetUsers GetUsers

type User

type User struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	Email    string `json:"email"`
}

User User

Jump to

Keyboard shortcuts

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