examples

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package examples provides embedded PIDL example protocols.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJSON

func GetJSON(name string) ([]byte, error)

GetJSON returns the raw JSON for an example.

func GetProtocol

func GetProtocol(name string) (*pidl.Protocol, error)

GetProtocol returns a parsed protocol by example name.

func List

func List() []string

List returns all available example names.

Types

type Example

type Example struct {
	// Name is the example name (filename without extension).
	Name string

	// Filename is the full filename.
	Filename string
	// contains filtered or unexported fields
}

Example represents an embedded example protocol.

func All

func All() ([]*Example, error)

All returns all examples.

func Get

func Get(name string) (*Example, error)

Get returns an Example by name.

func (*Example) Protocol

func (e *Example) Protocol() (*pidl.Protocol, error)

Protocol returns the parsed protocol, loading it if necessary.

Jump to

Keyboard shortcuts

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