controller

package
v1.6.34 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package controller contains all the controllers of the application

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIStatus added in v1.6.2

func APIStatus(c *gin.Context)

APIStatus - check status of the API

func AccessResource

func AccessResource(c *gin.Context)

AccessResource - can be accessed by basic auth

func AddHobby

func AddHobby(c *gin.Context)

AddHobby - PUT /users/hobbies

func CreatePost

func CreatePost(c *gin.Context)

CreatePost - POST /posts

func CreateUser

func CreateUser(c *gin.Context)

CreateUser - POST /users

func DeletePost

func DeletePost(c *gin.Context)

DeletePost - DELETE /posts/:id

func GetHobbies

func GetHobbies(c *gin.Context)

GetHobbies - GET /hobbies

func GetPost

func GetPost(c *gin.Context)

GetPost - GET /posts/:id

func GetPosts

func GetPosts(c *gin.Context)

GetPosts - GET /posts

func GetUser

func GetUser(c *gin.Context)

GetUser - GET /users/:id

func GetUsers

func GetUsers(c *gin.Context)

GetUsers - GET /users

func MongoCreateOne

func MongoCreateOne(c *gin.Context)

MongoCreateOne - create one document

func MongoDeleteByID

func MongoDeleteByID(c *gin.Context)

MongoDeleteByID - delete one document by ID

func MongoDeleteFieldByID

func MongoDeleteFieldByID(c *gin.Context)

MongoDeleteFieldByID - delete existing field(s) from a document

func MongoGetAll

func MongoGetAll(c *gin.Context)

MongoGetAll - get all documents

func MongoGetByFilter

func MongoGetByFilter(c *gin.Context)

MongoGetByFilter - find documents using filter

func MongoGetByID

func MongoGetByID(c *gin.Context)

MongoGetByID - find one document by ID

func MongoUpdateByID

func MongoUpdateByID(c *gin.Context)

MongoUpdateByID - update a document

- edit existing fields - add new fields - do not remove any existing field

func QueryString added in v1.6.9

func QueryString(c *gin.Context)

QueryString - basic implementation

func RedisCreate

func RedisCreate(c *gin.Context)

RedisCreate - SET key

func RedisCreateHash

func RedisCreateHash(c *gin.Context)

RedisCreateHash - SET hashes

func RedisDelete

func RedisDelete(c *gin.Context)

RedisDelete - DEL key

func RedisDeleteHash

func RedisDeleteHash(c *gin.Context)

RedisDeleteHash - DEL hashes

func RedisRead

func RedisRead(c *gin.Context)

RedisRead - GET key

func RedisReadHash

func RedisReadHash(c *gin.Context)

RedisReadHash - GET hashes

func UpdatePost

func UpdatePost(c *gin.Context)

UpdatePost - PUT /posts/:id

func UpdateUser

func UpdateUser(c *gin.Context)

UpdateUser - PUT /users

Types

This section is empty.

Jump to

Keyboard shortcuts

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