writer

package
v0.0.0-...-417dc14 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

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.6"
)

Variables

This section is empty.

Functions

func AddCommonResponseHeader

func AddCommonResponseHeader(apiContext *types.APIContext) error

Types

type EncodingResponseWriter

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

func (*EncodingResponseWriter) Body

func (j *EncodingResponseWriter) Body(apiContext *types.APIContext, writer io.Writer, obj interface{}) error

func (*EncodingResponseWriter) VersionBody

func (j *EncodingResponseWriter) VersionBody(apiContext *types.APIContext, version *types.APIVersion, writer io.Writer, obj interface{}) error

func (*EncodingResponseWriter) Write

func (j *EncodingResponseWriter) Write(apiContext *types.APIContext, code int, obj interface{})

type HTMLResponseWriter

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

func (*HTMLResponseWriter) Write

func (h *HTMLResponseWriter) Write(apiContext *types.APIContext, code int, obj interface{})

type StringGetter

type StringGetter func() string

Jump to

Keyboard shortcuts

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