say

package
v0.0.0-...-f05d2e9 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2015 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(db *sqlx.DB) (*Controller, error)

func (*Controller) Close

func (c *Controller) Close() error

func (*Controller) CreateConversation

func (c *Controller) CreateConversation(ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*Controller) CreateLine

func (c *Controller) CreateLine(ctx context.Context, w http.ResponseWriter, r *http.Request)

TODO: use gorilla schema here

func (*Controller) DeleteConversation

func (c *Controller) DeleteConversation(ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*Controller) DeleteLine

func (c *Controller) DeleteLine(ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*Controller) DeleteMood

func (c *Controller) DeleteMood(ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*Controller) GetAnimals

func (c *Controller) GetAnimals(ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*Controller) GetConversation

func (c *Controller) GetConversation(ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*Controller) GetLine

func (c *Controller) GetLine(ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*Controller) GetMood

func (c *Controller) GetMood(ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*Controller) ListConversations

func (c *Controller) ListConversations(ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*Controller) ListMoods

func (c *Controller) ListMoods(ctx context.Context, w http.ResponseWriter, r *http.Request)

func (*Controller) SetMood

func (c *Controller) SetMood(ctx context.Context, w http.ResponseWriter, r *http.Request)

type Conversation

type Conversation struct {
	ID      string `json:"id",url:"-"`
	Heading string `json:"heading" url:"heading"`
	Lines   []Line `json:"lines,omitempty"`
	// contains filtered or unexported fields
}

func (*Conversation) Vars

func (c *Conversation) Vars() map[pattern.Variable]string

type Line

type Line struct {
	ID       string `json:"id" url:"-"`
	Animal   string `json:"animal" url:"animal"`
	Think    bool   `json:"think" url:"think"`
	MoodName string `json:"mood" url:"mood"`
	Text     string `json:"text" url:"text"`
	Output   string `json:"output" url:"-"`
	// contains filtered or unexported fields
}

type Mood

type Mood struct {
	Name        string `json:"name" url:"-"`
	Eyes        string `json:"eyes" url:"eyes"`
	Tongue      string `json:"tongue" url:"tongue"`
	UserDefined bool   `json:"user_defined" url:"-"`
	// contains filtered or unexported fields
}

func (*Mood) Vars

func (m *Mood) Vars() map[pattern.Variable]string

Jump to

Keyboard shortcuts

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