apis

package
v0.0.0-...-a337c98 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSubscriber

func AddSubscriber(c *gin.Context)

curl -X POST https://localhost:8080/api/v1/newsletter/subscribe/ --data '{"email":"xyz@gmail.com"}' -kL | jq . Add subscriber to mailing list at /api/v1/newsletter/subscribe/

func GetBooks

func GetBooks(c *gin.Context)

GetBooks is function for endpoint /api/v1/books to get all books

func GetPost

func GetPost(c *gin.Context)

GetPost is function for endpoint /api/v1/posts/by-id/:id to get Post by ID

func GetPosts

func GetPosts(c *gin.Context)

GetPosts is function for endpoint /api/v1/posts to get all posts

func GetPostsByTag

func GetPostsByTag(c *gin.Context)

GetPostsByTag is function for endpoint /posts/by-tag/:tag_name to get all posts with specified tag

func GetProjects

func GetProjects(c *gin.Context)

GetProjects is function for endpoint /api/v1/projects to get all project

func GetSections

func GetSections(c *gin.Context)

GetSections is function for endpoint /api/v1/tags to get all sections by post_id

func GetTags

func GetTags(c *gin.Context)

GetTags is function for endpoint /api/v1/tags to get all tags by post_id

Types

type EmailRequestBody

type EmailRequestBody struct {
	Email string
}

type Request

type Request struct {
	Email        string   `json:"email"`
	Groups       []string `json:"groups"`
	SubscribedAt string   `json:"subscribed_at"`
	Status       string   `json:"status"`
}

Jump to

Keyboard shortcuts

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