http

package
v0.0.0-...-22a6502 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const JSON = "application/json"

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	PostService pbPost.PostServiceClient
}

func NewHandler

func NewHandler(ps pbPost.PostServiceClient) *Handler

func (*Handler) Create

func (h *Handler) Create(w http.ResponseWriter, r *http.Request)

func (*Handler) DeleteById

func (h *Handler) DeleteById(w http.ResponseWriter, r *http.Request)

func (*Handler) GetAll

func (h *Handler) GetAll(w http.ResponseWriter, r *http.Request)

func (*Handler) GetByID

func (h *Handler) GetByID(w http.ResponseWriter, r *http.Request)

func (*Handler) Home

func (h *Handler) Home(w http.ResponseWriter, r *http.Request)

func (*Handler) InitRoutes

func (h *Handler) InitRoutes() *mux.Router

func (*Handler) Update

func (h *Handler) Update(w http.ResponseWriter, r *http.Request)

type Server

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

func (*Server) Run

func (s *Server) Run(cfg config.ServerConfig, handler http.Handler) error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Directories

Path Synopsis
handler

Jump to

Keyboard shortcuts

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