api

package
v0.0.0-...-4e54643 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Return

func Return(ctx *fiber.Ctx, user *models.User)

Types

type ArticleResponse

type ArticleResponse struct {
	models.Article

	*models.User `json:"author,omitempty"`
}

type Server

type Server struct {
	DB     *gorm.DB
	Router *fiber.App
}

func (*Server) CreateArticle

func (s *Server) CreateArticle(ctx *fiber.Ctx)

func (*Server) CreateUser

func (s *Server) CreateUser(ctx *fiber.Ctx)

func (*Server) DeleteArticle

func (s *Server) DeleteArticle(ctx *fiber.Ctx)

func (*Server) DeleteUser

func (s *Server) DeleteUser(ctx *fiber.Ctx)

func (*Server) GetAllUsers

func (s *Server) GetAllUsers(ctx *fiber.Ctx)

func (*Server) GetArticleByID

func (s *Server) GetArticleByID(ctx *fiber.Ctx)

func (*Server) GetArticleBySlug

func (s *Server) GetArticleBySlug(ctx *fiber.Ctx)

func (*Server) GetArticles

func (s *Server) GetArticles(ctx *fiber.Ctx)

func (*Server) GetMe

func (s *Server) GetMe(ctx *fiber.Ctx)

func (*Server) GetUser

func (s *Server) GetUser(ctx *fiber.Ctx)

func (*Server) Initialize

func (s *Server) Initialize()

func (*Server) Login

func (s *Server) Login(ctx *fiber.Ctx)

func (*Server) NewArticleResponse

func (s *Server) NewArticleResponse(article models.Article) ArticleResponse

func (*Server) SignIn

func (s *Server) SignIn(email, password string) (string, error)

func (*Server) UpdateArticle

func (s *Server) UpdateArticle(ctx *fiber.Ctx)

func (*Server) UpdateUser

func (s *Server) UpdateUser(ctx *fiber.Ctx)

Jump to

Keyboard shortcuts

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