controller

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessResource added in v1.4.0

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 CreateUserAuth

func CreateUserAuth(c *gin.Context)

CreateUserAuth - POST /register

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 Login

func Login(c *gin.Context)

Login ...

func RedisCreate added in v1.2.7

func RedisCreate(c *gin.Context)

RedisCreate - SET key

func RedisCreateHash added in v1.2.7

func RedisCreateHash(c *gin.Context)

RedisCreateHash - SET hashes

func RedisDelete added in v1.2.7

func RedisDelete(c *gin.Context)

RedisDelete - DEL key

func RedisDeleteHash added in v1.2.7

func RedisDeleteHash(c *gin.Context)

RedisDeleteHash - DEL hashes

func RedisRead added in v1.2.7

func RedisRead(c *gin.Context)

RedisRead - GET key

func RedisReadHash added in v1.2.7

func RedisReadHash(c *gin.Context)

RedisReadHash - GET hashes

func Refresh added in v1.2.5

func Refresh(c *gin.Context)

Refresh ...

func UpdatePost

func UpdatePost(c *gin.Context)

UpdatePost - PUT /posts/:id

func UpdateUser

func UpdateUser(c *gin.Context)

UpdateUser - PUT /users

Types

type LoginPayload

type LoginPayload struct {
	Email    string `json:"Email"`
	Password string `json:"Password"`
}

LoginPayload ...

type RedisData added in v1.2.7

type RedisData struct {
	Key   string `json:"Key"`
	Value string `json:"Value"`
}

RedisData - key:value

type RedisDataHash added in v1.2.7

type RedisDataHash struct {
	Key   string `json:"Key"`
	Value RedisDataHashValue
}

RedisDataHash - key:hashValues

type RedisDataHashValue added in v1.2.7

type RedisDataHashValue struct {
	Value1 string `json:"Value1"`
	Value2 string `json:"Value2"`
	Value3 string `json:"Value3"`
	Value4 string `json:"Value4"`
}

RedisDataHashValue - values

Jump to

Keyboard shortcuts

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