planets

package
v0.0.0-...-dfed0bd Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPlanetHandler

func AddPlanetHandler(w http.ResponseWriter, r *http.Request)

func GetPlanetByNameHandler

func GetPlanetByNameHandler(w http.ResponseWriter, r *http.Request)

func GetPlanetHandler

func GetPlanetHandler(w http.ResponseWriter, r *http.Request)

func ListPlanetHandler

func ListPlanetHandler(w http.ResponseWriter, r *http.Request)

func RemovePlanetHandler

func RemovePlanetHandler(w http.ResponseWriter, r *http.Request)

Types

type HttpService

type HttpService struct {
}

func (HttpService) CountMovies

func (s HttpService) CountMovies(ctx context.Context, planetName string) (int, error)

type MongoRepository

type MongoRepository struct{}

func (MongoRepository) Add

func (r MongoRepository) Add(ctx context.Context, planet planets.Planet) error

func (MongoRepository) Exists

func (r MongoRepository) Exists(ctx context.Context, name string) bool

func (MongoRepository) Get

func (r MongoRepository) Get(ctx context.Context, id interface{}) (planets.Planet, error)

func (MongoRepository) GetAll

func (r MongoRepository) GetAll(ctx context.Context) ([]planets.Planet, error)

func (MongoRepository) GetByName

func (r MongoRepository) GetByName(ctx context.Context, name string) (planets.Planet, error)

func (MongoRepository) Remove

func (r MongoRepository) Remove(ctx context.Context, id interface{}) error

Jump to

Keyboard shortcuts

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