apiutil

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Peek

func Peek(qArgs, pArgs *fasthttp.Args, key string) string

Types

type Response

type Response struct {
	Ok           bool   `json:"ok"`
	Description  string `json:"error,omitempty"`
	ShortenedUrl string `json:"shortened_url,omitempty"`
	// contains filtered or unexported fields
}

func NewResponse

func NewResponse(ctx *fasthttp.RequestCtx) *Response

func UnmarshalResponse

func UnmarshalResponse(data []byte) *Response

func (*Response) SendBadRequest

func (r *Response) SendBadRequest(err error)

func (*Response) SendError

func (r *Response) SendError(status int, err error)

func (*Response) SendSuccess

func (r *Response) SendSuccess(surl string)

func (*Response) SendUnauthorized

func (r *Response) SendUnauthorized(err error)

Jump to

Keyboard shortcuts

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