biblio

package
v0.0.0-...-bfff70c Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2017 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	ID          string `json:"-"`
	DisplayName string `json:"display_name"`
	ImageURL    string `json:"image_url"`
}

type Shelf

type Shelf struct {
	Key   *datastore.Key `json:"-" datastore:"-"`
	Id    int64          `json:"id" datastore:"-"`
	Title string         `json:"title"`
	Works Works          `json:"works" datastore:"-"`
}

func (*Shelf) MarshalJSON

func (s *Shelf) MarshalJSON() ([]byte, error)

type ShelfDAO

type ShelfDAO struct {
	Ctx context.Context
}

func (*ShelfDAO) AddShelf

func (dao *ShelfDAO) AddShelf(shelf *Shelf) (*Shelf, error)

func (*ShelfDAO) Context

func (dao *ShelfDAO) Context() context.Context

func (*ShelfDAO) DeleteShelf

func (dao *ShelfDAO) DeleteShelf(id int64) error

func (*ShelfDAO) GetShelf

func (dao *ShelfDAO) GetShelf(id int64) (Shelf, error)

func (*ShelfDAO) ListShelves

func (dao *ShelfDAO) ListShelves() (Shelves, error)

type ShelfDB

type ShelfDB interface {
	Context() context.Context

	ListShelves() (Shelves, error)

	AddShelf(shelf *Shelf) (*Shelf, error)

	GetShelf(id int64) (Shelf, error)

	DeleteShelf(id int64) error
}

type Shelves

type Shelves []Shelf

type Work

type Work struct {
	Key      *datastore.Key `json:"-" datastore:"-"`
	Id       int64          `json:"id" datastore:"-"`
	Title    string         `json:"title"`
	Author   string         `json:"author"`
	Position int64          `json:"position"`
	ShelfId  int64          `json:"shelf_id" datastore:"-"`
	ShelfKey *datastore.Key `json:"-"`
}

func (Work) MarshalJSON

func (w Work) MarshalJSON() ([]byte, error)

type WorkDAO

type WorkDAO struct {
	Ctx context.Context
}

func (*WorkDAO) AddWork

func (dao *WorkDAO) AddWork(work Work) (Work, error)

func (*WorkDAO) DeleteWork

func (dao *WorkDAO) DeleteWork(id int64) error

func (*WorkDAO) GetWork

func (dao *WorkDAO) GetWork(id int64) (Work, error)

func (*WorkDAO) ListWorks

func (dao *WorkDAO) ListWorks() (Works, error)

func (*WorkDAO) ListWorksByShelf

func (dao *WorkDAO) ListWorksByShelf(shelfID int64) (Works, error)

func (*WorkDAO) UpdateWork

func (dao *WorkDAO) UpdateWork(work Work) (Work, error)

type WorkDB

type WorkDB interface {
	ListWorks() (Works, error)

	ListWorksByShelf(shelfID int64) (Works, error)

	AddWork(work Work) (Work, error)

	GetWork(id int64) (Work, error)

	UpdateWork(work Work) (Work, error)

	DeleteWork(id int64) error
}

type Works

type Works []Work

Jump to

Keyboard shortcuts

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