responses

package
v0.0.0-...-f6b7f98 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	XMLName xml.Name `xml:"error"`
	Code    int      `xml:"code"`
	Message string   `xml:"message"`
}

Error is a crowdin error message

func ParseAsError

func ParseAsError(body io.Reader) (*Error, error)

ParseAsError parses XML to Error

func (*Error) Error

func (e *Error) Error() string

Error implements the error interface to handle like an error

type File

type File struct {
	XMLName xml.Name `xml:"file"`
	Name    string   `xml:"name,attr"`
	Status  string   `xml:"status,attr"`
}

File represents the status of an uploaded file

type Success

type Success struct {
	XMLName xml.Name `xml:"success"`
	Stats   []File   `xml:"stats>file"`
}

Success is a crowdin success message

func ParseAsSuccess

func ParseAsSuccess(body io.Reader) (*Success, error)

ParseAsSuccess parses XML to Success

Jump to

Keyboard shortcuts

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