writer

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 8 Imported by: 10 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	JSURL          = "/api-ui/%API_UI_VERSION%/ui.min.js"
	CSSURL         = "/api-ui/%API_UI_VERSION%/ui.min.css"
	DefaultVersion = "1.2.0"
)

Variables

This section is empty.

Functions

func AddCommonResponseHeader

func AddCommonResponseHeader(apiOp *types.APIRequest) error

Types

type EncodingResponseWriter

type EncodingResponseWriter struct {
	ContentType string
	Encoder     func(io.Writer, interface{}) error
}

func (*EncodingResponseWriter) Body

func (j *EncodingResponseWriter) Body(apiOp *types.APIRequest, writer io.Writer, obj types.APIObject) error

func (*EncodingResponseWriter) BodyList

func (j *EncodingResponseWriter) BodyList(apiOp *types.APIRequest, writer io.Writer, list types.APIObjectList) error

func (*EncodingResponseWriter) Write

func (j *EncodingResponseWriter) Write(apiOp *types.APIRequest, code int, obj types.APIObject)

func (*EncodingResponseWriter) WriteList

func (j *EncodingResponseWriter) WriteList(apiOp *types.APIRequest, code int, list types.APIObjectList)

type GzipWriter

type GzipWriter struct {
	types.ResponseWriter
}

func (*GzipWriter) Write

func (g *GzipWriter) Write(apiOp *types.APIRequest, code int, obj types.APIObject)

func (*GzipWriter) WriteList

func (g *GzipWriter) WriteList(apiOp *types.APIRequest, code int, obj types.APIObjectList)

type HTMLResponseWriter

type HTMLResponseWriter struct {
	EncodingResponseWriter
	CSSURL       StringGetter
	JSURL        StringGetter
	APIUIVersion StringGetter
}

func (*HTMLResponseWriter) Write

func (h *HTMLResponseWriter) Write(apiOp *types.APIRequest, code int, obj types.APIObject)

func (*HTMLResponseWriter) WriteList

func (h *HTMLResponseWriter) WriteList(apiOp *types.APIRequest, code int, list types.APIObjectList)

type StringGetter

type StringGetter func() string

Jump to

Keyboard shortcuts

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