writer

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

View Source
const (
	JSURL          = "https://releases.rancher.com/api-ui/%API_UI_VERSION%/ui.min.js"
	CSSURL         = "https://releases.rancher.com/api-ui/%API_UI_VERSION%/ui.min.css"
	DefaultVersion = "1.1.11"
)

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