services

package
v0.0.0-...-1b62c67 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventService

type EventService struct {
	DB *mgo.Database
}

EventService exposes the Event model's endpoints

func (EventService) Create

func (s EventService) Create(c *gin.Context)

Create an Event

func (EventService) Delete

func (s EventService) Delete(c *gin.Context)

Delete an Event

func (EventService) Fetch

func (s EventService) Fetch(c *gin.Context)

Fetch Events

func (EventService) Get

func (s EventService) Get(c *gin.Context)

Get a single Event

func (EventService) Mount

func (s EventService) Mount(r gin.IRouter)

Mount registers all Event endpoints to the specified router.

func (EventService) Update

func (s EventService) Update(c *gin.Context)

Update an Event

type Service

type Service interface {
	// Mount the service (and all of its endpoints) to a router
	Mount(r gin.IRouter)
}

Service is a publicly exposed endpoint for resources.

type UserService

type UserService struct {
	DB *mgo.Database
}

UserService exposes the User model's endpoints.

func (UserService) Create

func (s UserService) Create(c *gin.Context)

Create a user

func (UserService) Delete

func (s UserService) Delete(c *gin.Context)

Delete a user

func (UserService) Fetch

func (s UserService) Fetch(c *gin.Context)

Fetch users

func (UserService) Get

func (s UserService) Get(c *gin.Context)

Get a single user

func (UserService) Mount

func (s UserService) Mount(r gin.IRouter)

Mount registers all User endpoints to the specified router.

func (UserService) Update

func (s UserService) Update(c *gin.Context)

Update a user

type VenueService

type VenueService struct {
	DB *mgo.Database
}

VenueService exposes Venue's endpoints

func (VenueService) Create

func (s VenueService) Create(c *gin.Context)

Create a Venue

func (VenueService) Delete

func (s VenueService) Delete(c *gin.Context)

Delete a Venue

func (VenueService) Fetch

func (s VenueService) Fetch(c *gin.Context)

Fetch Venues

func (VenueService) Get

func (s VenueService) Get(c *gin.Context)

Get a single Venue

func (VenueService) Mount

func (s VenueService) Mount(r gin.IRouter)

Mount registers all Venue endpoints to the specified router.

func (VenueService) Update

func (s VenueService) Update(c *gin.Context)

Update a Venue

Jump to

Keyboard shortcuts

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