protocol

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

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package protocol defines the types necessary for unmarshalling a protocol-specification XML file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	Name    string `xml:"name,attr"`
	Summary string `xml:"summary,attr"`

	Type      string `xml:"type,attr"`
	AllowNull bool   `xml:"allow-null,attr"`
	Interface string `xml:"interface,attr"`
	Version   int    `xml:"version,attr"`
	Enum      string `xml:"enum,attr"`
}

type Description

type Description struct {
	Summary string `xml:"summary,attr"`
	Full    string `xml:",chardata"`
}

type Entry

type Entry struct {
	Name    string `xml:"name,attr"`
	Summary string `xml:"summary,attr"`
	Value   string `xml:"value,attr"`
}

func (Entry) Int

func (e Entry) Int() (int, error)

type Enum

type Enum struct {
	Name        string      `xml:"name,attr"`
	Description Description `xml:"description"`

	Entries []Entry `xml:"entry"`
}

type Interface

type Interface struct {
	Name        string      `xml:"name,attr"`
	Version     int         `xml:"version,attr"`
	Description Description `xml:"description"`

	Requests []Op   `xml:"request"`
	Events   []Op   `xml:"event"`
	Enums    []Enum `xml:"enum"`
}

type Op

type Op struct {
	Name        string      `xml:"name,attr"`
	Description Description `xml:"description"`

	Args []Arg `xml:"arg"`
}

type Protocol

type Protocol struct {
	Name      string `xml:"name,attr"`
	Copyright string `xml:"copyright"`

	Interfaces []Interface `xml:"interface"`
}

Jump to

Keyboard shortcuts

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