server

package
v0.0.0-...-1317d33 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the main server struct.

func New

func New(cfg *config.Config, userService domain.UserService) *Server

New created a new (web) server instance.

func (*Server) FirebaseAuth

func (s *Server) FirebaseAuth(ctx *fiber.Ctx) (uid string, err error)

FirebaseAuth is a middleware that validates Firebase ID Tokens passed in the Authorization HTTP header.

func (*Server) HandleCreateUserMe

func (s *Server) HandleCreateUserMe(ctx *fiber.Ctx) error

HandleCreateUserMe handles POST /users/@me

func (*Server) HandleDeleteUserMe

func (s *Server) HandleDeleteUserMe(ctx *fiber.Ctx) error

HandleDeleteUserMe handles DELETE /users/@me

func (*Server) HandleGetUserMe

func (s *Server) HandleGetUserMe(ctx *fiber.Ctx) error

HandleGetUserMe handles GET /users/@me

func (*Server) HandleUpdateUserMe

func (s *Server) HandleUpdateUserMe(ctx *fiber.Ctx) error

HandleUpdateUserMe handles PATCH /users/@me

func (*Server) Start

func (s *Server) Start(bindAddress string)

Start starts the (web) server.

Jump to

Keyboard shortcuts

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