storage

package
v0.0.0-...-0bfac37 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	// Create a new user, pass the model and return an error on failure
	Create(user *server.User) error

	// GetUser gets a user model from the database based on the user id
	GetUser(uid int) (*server.User, error)

	// Update a user based on the changed model
	Update(user *server.User) error

	// Delete soft delete the user id
	Delete(uid int) error

	// List all users with the optional field ctry
	List(ctry string, off int, limit int) (*[]server.User, error)

	// Pings the database for a readiness check
	Ping() error
}

Storage is the default generic interface for the API

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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