v1

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package v1 the version 1 api

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RouteRun

func RouteRun(token string) http.Handler

RouteRun the run routes

Types

type HandleFunc

type HandleFunc func(w *Response, r *http.Request) error

HandleFunc handle error

func (HandleFunc) ServeHTTP

func (h HandleFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handler responds to an HTTP request.

type Msg

type Msg struct {
	Msg string `json:"msg"`
}

Msg the message struct

type Response

type Response struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

Response the http.ResponseWriter wrapper

func (*Response) Flush

func (r *Response) Flush()

Flush sends any buffered data to the client.

func (*Response) JSON

func (r *Response) JSON(status int, data any) error

JSON write JSON response

func (*Response) WriteHeader

func (r *Response) WriteHeader(code int)

WriteHeader sends an HTTP response header with the provided status code.

Jump to

Keyboard shortcuts

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