clients

package
v0.0.0-...-6740b9f Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2014 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClientNotFound error = fmt.Errorf("client: Client not found!")
)

Functions

This section is empty.

Types

type Clients

type Clients struct {
	AppEngineContext appengine.Context
	Storage          *Storage
}

func NewClients

func NewClients(appEngineContext appengine.Context) *Clients

func (*Clients) Create

func (self *Clients) Create(client *t.Client) error

func (*Clients) Delete

func (self *Clients) Delete(id t.ClientId) error

func (*Clients) Find

func (self *Clients) Find(id t.ClientId) (t.Client, error)

func (*Clients) FindAll

func (self *Clients) FindAll(status t.ClientStatus) (t.Clients, error)

func (*Clients) FindAllActive

func (self *Clients) FindAllActive() (t.Clients, error)

func (*Clients) FindByClientIdAndToken

func (self *Clients) FindByClientIdAndToken(clientId t.ClientClientId, token string) (t.Client, error)

func (*Clients) FindByUserId

func (self *Clients) FindByUserId(userId t.UserId) (t.Client, error)

func (*Clients) FindMulti

func (self *Clients) FindMulti(ids t.ClientIds) (t.Clients, error)

func (*Clients) Update

func (self *Clients) Update(client t.Client) (t.Client, error)

type Storage

type Storage struct {
	AppEngineContext appengine.Context
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(appEngineContext appengine.Context) *Storage

func (*Storage) Delete

func (self *Storage) Delete(id t.ClientId) error

func (*Storage) Find

func (self *Storage) Find(id t.ClientId) (t.Client, error)

func (*Storage) FindAllActive

func (self *Storage) FindAllActive() (t.Clients, error)

func (*Storage) FindAllByStatus

func (self *Storage) FindAllByStatus(status t.ClientStatus) (t.Clients, error)

func (*Storage) FindByClientIdAndToken

func (self *Storage) FindByClientIdAndToken(clientId t.ClientClientId, token string) (t.Client, error)

func (*Storage) FindByUserId

func (self *Storage) FindByUserId(userId t.UserId) (t.Client, error)

func (*Storage) FindMulti

func (self *Storage) FindMulti(ids t.ClientIds) (t.Clients, error)

func (*Storage) Save

func (self *Storage) Save(client *t.Client) error

func (*Storage) Update

func (self *Storage) Update(client t.Client) (t.Client, error)

Jump to

Keyboard shortcuts

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