handlers

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentHandler

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

CommentHandler is the handler implementation of comments related resource.

func NewCommentHandler

func NewCommentHandler(logger *zap.SugaredLogger, natsClient *nc.Conn) *CommentHandler

NewCommentHandler returns back a newly created and ready to use CommentHandler.

func (*CommentHandler) Create

func (h *CommentHandler) Create() http.HandlerFunc

Create creates a new comment with specified information.

type EchoHandler

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

EchoHandler is the handler implementation for health checking.

func NewEchoHandler

func NewEchoHandler(logger *zap.SugaredLogger) *EchoHandler

NewEchoHandler returns back a newly created and ready to use EchoHandler.

func (*EchoHandler) Echo

func (h *EchoHandler) Echo() http.HandlerFunc

Echo returns back the same message that receives.

type Meddlers

type Meddlers struct{}

Meddlers holds different middleware implementations and provide some components for use in implementations.

func NewMeddlers

func NewMeddlers() *Meddlers

NewMeddlers returns a newly created and ready to use Meddlers.

func (*Meddlers) JSONContentTypeHeaderMiddleware

func (ms *Meddlers) JSONContentTypeHeaderMiddleware(handler http.Handler) http.Handler

JSONContentTypeHeaderMiddleware adds application/json content type header to responses.

type TicketHandler

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

TicketHandler is the handler implementation of tickets related resource.

func NewTicketHandler

func NewTicketHandler(logger *zap.SugaredLogger, natsClient *nc.Conn) *TicketHandler

NewTicketHandler returns back a newly created and ready to use TicketHandler.

func (*TicketHandler) Create

func (h *TicketHandler) Create() http.HandlerFunc

Create creates a new ticket with specified information.

func (*TicketHandler) Filter

func (h *TicketHandler) Filter() http.HandlerFunc

Filter filters tickets based on provided criteria values.

Jump to

Keyboard shortcuts

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