response

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Pass             = 0
	Deny             = 1
	Error            = 2
	AccountDisabled  = 10000
	IllegalRequest   = 10001
	NamespaceInvalid = 10002
	IllegalParam     = 10003
	LoginExpired     = 10086
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Empty

type Empty struct{}

func (Empty) Write

type File added in v1.4.5

type File struct {
	Filename string
}

func (File) Write added in v1.4.5

func (f File) Write(w http.ResponseWriter, _ *http.Request) error

type JSON

type JSON struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func (JSON) Write

func (j JSON) Write(w http.ResponseWriter, _ *http.Request) error

JSON response

type Redirect added in v1.12.0

type Redirect struct {
	URL  string
	Code int
}

func (Redirect) Write added in v1.12.0

func (rdr Redirect) Write(w http.ResponseWriter, r *http.Request) error

type SftpFile

type SftpFile struct {
	Client      *ssh.Client
	Filename    string
	Disposition string // attachment | inline
}

func (SftpFile) Write

func (sf SftpFile) Write(w http.ResponseWriter, _ *http.Request) error

Jump to

Keyboard shortcuts

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