goteca

package module
v0.0.0-...-8c82e1c Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2019 License: MIT Imports: 0 Imported by: 0

README

Golang

Build Status

Project written in Golang used in lectures.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao interface {
	Find(id string) (*Movie, error)
	FindAll() ([]*Movie, error)
	Save(object *Movie) (*Movie, error)
	Delete(id string) error
}

type Movie

type Movie struct {
	Id       string `json:"id" bson:"_id"`
	Name     string `json:"name"`
	Category string `json:"category"`
}

type Service

type Service interface {
	Get(ID string) (*Movie, error)
	GetAll() ([]*Movie, error)
	Save(movie *Movie) (*Movie, error)
	Delete(ID string) error
}

func NewService

func NewService(dao Dao) Service

Directories

Path Synopsis
cmd
server command

Jump to

Keyboard shortcuts

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