handler

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(pkg string, spec EventSpec) (string, error)

Generate generates an event handler.

Types

type EventSpec

type EventSpec struct {
	Name    string
	Package PackageSpec
}

EventSpec describes the event struct.

func Parse

func Parse(dir string, eventName string) (EventSpec, error)

Parse parses a given package, looks for a struct and returns it as a normalized structure.

type PackageSpec

type PackageSpec struct {
	Name string
	Path string
}

PackageSpec contains import information.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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