handler

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootRoute                = "/api"
	WordRoute                = "/word"
	AddWordRoute             = WordRoute
	QueryWordRoute           = WordRoute
	QueryWordWithParamsRoute = QueryWordRoute + "/:" + PatternParam
)
View Source
const (
	PatternParam = "pattern"
)

Variables

This section is empty.

Functions

func New

func NewTest

func NewTest(t *testing.T) (*httpexpect.Expect, func())

Types

type Handler

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

func (*Handler) AddWord

func (h *Handler) AddWord(ctx *gin.Context)

func (*Handler) QueryWord

func (h *Handler) QueryWord(ctx *gin.Context)

type Status

type Status struct {
	Succeed bool   `json:"succeed"`
	Error   string `json:"error"`
}

Jump to

Keyboard shortcuts

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