models

package
v0.0.0-...-eae05a2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2017 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Movie

type Movie struct {
	Id     bson.ObjectId `json:"id" bson:"_id,omitempty"`
	Name   string        `json:name`
	Rating float32       `json:rating`
	Desc   string        `json:desc`
}

type MovieModel

type MovieModel struct{}

func (*MovieModel) Create

func (m *MovieModel) Create(data forms.CreateMovieCommand) error

func (*MovieModel) Delete

func (m *MovieModel) Delete(id string) (err error)

func (*MovieModel) Find

func (m *MovieModel) Find() (list []Movie, err error)

func (*MovieModel) Get

func (m *MovieModel) Get(id string) (movie Movie, err error)

func (*MovieModel) Update

func (m *MovieModel) Update(id string, data forms.UpdateMovieCommand) (err error)

Jump to

Keyboard shortcuts

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