generators

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentPackageGenerator

func ComponentPackageGenerator(an ast.AnnotationDeclaration, pkg ast.PackageDeclaration) ([]gen.WriteDirective, error)

ComponentPackageGenerator which defines a function for generating a type for receiving a giving

struct type has a notification type which can then be wired as a notification.EventDistributor.

Annotation: @notification:event

func GuPackageGenerator

func GuPackageGenerator(an ast.AnnotationDeclaration, pkg ast.PackageDeclaration) ([]gen.WriteDirective, error)

GuPackageGenerator which defines a function for generating a type for receiving a giving

struct type has a notification type which can then be wired as a notification.EventDistributor.

func JSDriverGenerator

func JSDriverGenerator(an ast.AnnotationDeclaration, pkg ast.PackageDeclaration) ([]gen.WriteDirective, error)

JSDriverGenerator which defines a function for generating a type for receiving a giving

struct type has a notification type which can then be wired as a notification.EventDistributor.

func NotificationTypeGenerator

func NotificationTypeGenerator(an ast.AnnotationDeclaration, str ast.StructDeclaration, pkg ast.PackageDeclaration) ([]gen.WriteDirective, error)

NotificationTypeGenerator which defines a function for generating a type for receiving a giving

struct type has a notification type which can then be wired as a notification.EventDistributor.

Annotation: @notification:event

Usage:
We want users to be able to define a type within their source code where they can use an annotation to mark such
a type has a EventNotification type. More so, users will need a type that will cater to listening for such specific
struct type as an event, so they can register that type to listen specifically for such type.

Reason:
We want to remove the need for reflection but also provide flexibility and customization on the specifics of an event
users can get but also provide the low-risk approach of type assertion but that the user does not need to worry about.
If done this way we can get users to generate any event base type and get a handler to connect and handler type assertions
for that event without need to worry about that themselves.

func RegisterGenerators

func RegisterGenerators(house *ast.AnnotationRegistry)

RegisterGenerators will add all generator functions from this package into the provided registry.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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