xml

package module
v0.0.0-...-a95e4f9 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: MIT Imports: 6 Imported by: 0

README

Gin Binding and Render xml implement

Sample usage

package main

import (
	"github.com/alimy/gin"
	_ "github.com/alimy/gin/module/xml"
)

func main() {
	// TODO
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type XMLRender

type XMLRender struct {
	Data interface{}
}

XMLRender contains the given interface object.

func (*XMLRender) Render

func (r *XMLRender) Render(w http.ResponseWriter) error

Render (XML) encodes the given interface object and writes data with custom ContentType.

func (*XMLRender) Reset

func (r *XMLRender) Reset()

Reset clean data and opts

func (*XMLRender) Setup

func (r *XMLRender) Setup(data interface{}, opts ...interface{})

Setup set data and opts

func (*XMLRender) WriteContentType

func (*XMLRender) WriteContentType(w http.ResponseWriter)

WriteContentType (XML) writes XML ContentType for response.

type XMLRenderFactory

type XMLRenderFactory struct{}

func (XMLRenderFactory) Instance

Instance a new Render instance

Jump to

Keyboard shortcuts

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