http

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SuccessMessage ok response
	SuccessMessage = "ok"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
}

Response response struct

func (*Response) Error

func (r *Response) Error(ctx *gin.Context, err error)

Error response

func (*Response) Ok

func (r *Response) Ok(ctx *gin.Context)

Ok response ok

func (*Response) OkWithJob

func (r *Response) OkWithJob(ctx *gin.Context, j *job.Job)

OkWithJob response ok and with a job object

func (*Response) Pong

func (r *Response) Pong(ctx *gin.Context)

Pong response pong

type Validator

type Validator interface {
	Validate(c *gin.Context, uri, query, body interface{}) error
}

Validator validator interface with validate function

func NewValidator

func NewValidator() Validator

NewValidator create a new validator

Jump to

Keyboard shortcuts

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