message

package
v0.0.0-...-2a0aeb0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Breakpoint

type Breakpoint struct {
	Filename string `xml:"filename,attr"`
	LineNo   int    `xml:"lineno,attr"`
	Type     string `xml:"type,attr"`
	State    string `xml:"state,attr"` // enabled
	HitCount int    `xml:"hit_count,attr"`
	HitValue int    `xml:"hit_value,attr"`
	Id       int    `xml:"id,attr"`
}

type Context

type Context struct {
	Local    []Variable
	Global   []Variable
	Constant []string
}

type Error

type Error struct {
	Code    int    `xml:"code,attr"`
	Message string `xml:"message"`
}

type Init

type Init struct {
	XMLName   xml.Name `xml:"init"`
	FileURI   string   `xml:"fileuri,attr"`
	Language  string   `xml:"language,attr"`
	Protocol  string   `xml:"protocol_version,attr"`
	AppID     string   `xml:"appid,attr"`
	Engine    string   `xml:"engine"`
	Author    string   `xml:"author"`
	URL       string   `xml:"url"`
	Copyright string   `xml:"copyright"`
}

type Message

type Message struct {
	MessageType string
	State       string
	Properties  Properties
	Context     Context
	Content     string
	Breakpoints map[int]Breakpoint
	Stacktrace  []StackLevel
}

func Decode

func Decode(xmlContent string) (message Message, err error)

*

  • Parse dbgp XML message.

type Properties

type Properties struct {
	Command      string
	ErrorCode    int
	ErrorMessage string
	Filename     string
	LineNumber   int
	BreakpointId int
	TxId         int
}

type Response

type Response struct {
	XMLName       xml.Name `xml:"response"`
	Command       string   `xml:"command,attr"`
	ContextId     int      `xml:"context,attr"`
	TransactionId int      `xml:"transaction_id,attr"`
	Status        string   `xml:"status,attr"`
	Reason        string   `xml:"reason,attr"`
	Id            int      `xml:"id,attr"`
	Message       ResponseMessage
	Breakpoints   []Breakpoint      `xml:"breakpoint"`
	Error         Error             `xml:"error"`
	Variables     []VariableDetails `xml:"property"`
	Stacktrace    []StackLevel      `xml:"stack"`
	Content       string            `xml:",chardata"`
}

type ResponseMessage

type ResponseMessage struct {
	XMLName  xml.Name `xml:"https://xdebug.org/dbgp/xdebug message"`
	Filename string   `xml:"filename,attr"`
	LineNo   int      `xml:"lineno,attr"`
}

type StackLevel

type StackLevel struct {
	Level    int    `xml:"level,attr"`
	Type     string `xml:"type,attr"`
	Filename string `xml:"filename,attr"`
	LineNo   int    `xml:"lineno,attr"`
	Where    string `xml:"where,attr"`
	CmdBegin string `xml:"cmdbegin,attr"`
	CmdEnd   string `xml:"cmdend,attr"`
}

type Variable

type Variable struct {
	Fullname          string
	DisplayName       string // Short name is useful for display purposes.
	VarType           string
	Value             string // Only for basic types such as int, float, string, etc.
	AccessModifier    string // private, protected, public, etc.
	IsCompositeType   bool   // Is it an array, object, structure, etc.?
	Children          []Variable
	ChildCount        int
	HasLoadedChildren bool // DBGp servers return children up to a certain depth.
	IsBase64          bool
}

type VariableDetails

type VariableDetails struct {
	Name        string            `xml:"name,attr"`
	Fullname    string            `xml:"fullname,attr"`
	VarType     string            `xml:"type,attr"`
	Facet       string            `xml:"facet,attr"` // public, private, etc.
	Classname   string            `xml:"classname,attr"`
	Constant    int               `xml:"constant,attr"`
	HasChildren bool              `xml:"children,attr"`
	Size        int               `xml:"size,attr"`
	Page        int               `xml:"page,attr"`
	Pagesize    int               `xml:"pagesize,attr"`
	Address     int               `xml:"address,attr"`
	Key         string            `xml:"key,attr"`
	Encoding    string            `xml:"encoding,attr"`
	NumChildren int               `xml:"numchildren,attr"`
	Value       string            `xml:",chardata"`
	Variables   []VariableDetails `xml:"property"`
}

Jump to

Keyboard shortcuts

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