rethinkstore

package
v0.0.0-...-e4b16ce Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// UsersTableName name of the table used for storing users
	UsersTableName = "users"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	Users *Users
	// contains filtered or unexported fields
}

Store rethink DB store

func Load

func Load(address string) *Store

Load datastore settings based on enviroment

type Users

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

Users struct containing a rethink db session

func (*Users) Create

func (u *Users) Create(user *model.User) (string, error)

Create a user in the database

func (*Users) Get

func (u *Users) Get(name string) (*model.User, error)

Get Return a User structure

func (*Users) GetAll

func (u *Users) GetAll() (*[]model.User, error)

GetAll Return a User structure

func (*Users) Save

func (u *Users) Save(user *model.User) error

Save a user in the database

Jump to

Keyboard shortcuts

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