locationService

package
v0.0.0-...-8cf13af Latest Latest
Warning

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

Go to latest
Published: May 14, 2015 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCommentOnLocation

func CreateCommentOnLocation(c *gin.Context) (int, error)

CreateCommentOnLocation creates comment on location.

func CreateLikingOnLocation

func CreateLikingOnLocation(c *gin.Context) (int, error)

CreateLikingOnLocation creates a liking on location.

func CreateLocation

func CreateLocation(c *gin.Context) (model.Location, int, error)

CreateLocation creates a location.

func DeleteCommentOnLocation

func DeleteCommentOnLocation(c *gin.Context) (int, error)

DeleteCommentOnLocation deletes a comment from an comment.

func DeleteLikingOnLocation

func DeleteLikingOnLocation(c *gin.Context) (int, error)

DeleteLikingOnLocation deletes liking on location.

func DeleteLocation

func DeleteLocation(c *gin.Context) (int, error)

DeleteLocation deletes a location.

func RetrieveCommentsOnLocation

func RetrieveCommentsOnLocation(c *gin.Context) ([]model.Comment, int, bool, bool, int, int, error)

RetrieveCommentsOnLocations retrieve comments on a location.

func RetrieveLikingsOnLocations

func RetrieveLikingsOnLocations(c *gin.Context) ([]*model.PublicUser, int, bool, bool, int, int, error)

RetrieveLikingsOnLocations retrieves likings on location.

func RetrieveLocation

func RetrieveLocation(c *gin.Context) (model.Location, bool, int64, int, error)

RetrieveLocation retrieves a location.

func RetrieveLocations

func RetrieveLocations(c *gin.Context) ([]model.Location, bool, int, bool, bool, int, error)

RetrieveLocations retrieves locations.

func UpdateCommentOnLocation

func UpdateCommentOnLocation(c *gin.Context) (int, error)

UpdateCommentOnLocation updates a comment of an location.

func UpdateLocation

func UpdateLocation(c *gin.Context) (model.Location, int, error)

UpdateLocation updates a location.

func UpdateLocationCommentCount

func UpdateLocationCommentCount(location *model.Location) (int, error)

UpdateLocationCommentCount updates location's comment count.

func UpdateLocationLikingCount

func UpdateLocationLikingCount(location *model.Location) (int, error)

UpdateLocationLikingCount updates a liking count on article.

Types

type LocationFilter

type LocationFilter struct {
	UserId          int   `json:"userId"`
	Categories      []int `json:"categories"`
	CurrentPage     int   `json:"currentPage"`
	LocationPerPage int   `json:"locationPerPage"`
}

LocationFilter is a filter for retriving locations.

type LocationForm

type LocationForm struct {
	Id        int64   `form:"id"`
	UserId    int64   `form:"userId"`
	Latitude  float64 `form:"latitude" binding:"required"`
	Longitude float64 `form:"longitude" binding:"required"`
	Type      string  `form:"type"`
	Name      string  `form:"name" binding:"required"`
	Url       string  `form:"url" binding:"required"`
	Content   string  `form:"content"`
	Address   string  `form:"address"`
}

LocationForm is used when creating or updating a location.

Jump to

Keyboard shortcuts

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