actions

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ENV = defaults.String(os.Getenv("GO_ENV"), "development")

ENV is used to help switch settings based on where the application is being run. Default is "development".

Functions

func App

func App() *buffalo.App

App is where all routes and middleware for buffalo should be defined. This is the nerve center of your application.

func HomeHandler

func HomeHandler(c buffalo.Context) error

HomeHandler renders "index.html"

func SocketHandler

func SocketHandler(c buffalo.Context) error

SocketHandler reads messages from the websocket connection buffer and returns the original message, formatted (uppercase) message, and received time in JSON

Types

type Message

type Message struct {
	Original  string    `json:"original"`
	Formatted string    `json:"formatted"`
	Received  time.Time `json:"received"`
}

Message stores incoming data from websocket connection buffer

Jump to

Keyboard shortcuts

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