sql

package
v0.0.0-...-73ce370 Latest Latest
Warning

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

Go to latest
Published: May 14, 2017 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	*gp.RootProvider
	provider.Provider
}

Provider implements the methods needed to manage users for every SQL based database

func (*Provider) Create

func (p *Provider) Create(userToAdd *user.User) (u *user.User, err error)

Create a new user

func (*Provider) CreateIndexes

func (p *Provider) CreateIndexes() (err error)

CreateIndexes create constrains and indexes on users tables

func (*Provider) CreateTables

func (p *Provider) CreateTables() (err error)

CreateTables create all the required tables for users

func (*Provider) Delete

func (p *Provider) Delete(u *user.User) (err error)

Delete a existing user

func (*Provider) DropTables

func (p *Provider) DropTables() (err error)

DropTables delete all the users tables

func (*Provider) FindByID

func (p *Provider) FindByID(id int) (u *user.User, err error)

FindByID is used to find a user from his ID

func (*Provider) FindByPublicKey

func (p *Provider) FindByPublicKey(publicKey interface{}) (u *user.User, err error)

FindByPublicKey is used to find a user from his public key

func (*Provider) FindByPublicKeyDER

func (p *Provider) FindByPublicKeyDER(publicKeyDER []byte) (u *user.User, err error)

FindByPublicKeyDER is used to find a user from his public key der formatted

func (*Provider) FindByPublicKeyDERBase64

func (p *Provider) FindByPublicKeyDERBase64(publicKeyDERBase64 string) (u *user.User, err error)

FindByPublicKeyDERBase64 is used to find a user from his public key der base64 formatted

func (*Provider) Login

func (p *Provider) Login(u *user.User) (err error)

Login update field on user login

func (*Provider) Update

func (p *Provider) Update(u *user.User, fields map[string]interface{}) (err error)

Update only fiew fields from user

Jump to

Keyboard shortcuts

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