lesson

package
v0.0.0-...-af9f937 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2019 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Overview

provides the types and api methods required to serve lesson data throughout the application

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(w http.ResponseWriter, r *http.Request) (interface{}, error)

returns an error. There are no current plans to impliment this function.

func Delete

func Delete(w http.ResponseWriter, r *http.Request) (interface{}, error)

returns an error. There are no current plans to impliment this function.

func List

func List(w http.ResponseWriter, r *http.Request) (interface{}, error)

returns a LessonIndex of all available lessons

func Retrieve

func Retrieve(w http.ResponseWriter, r *http.Request) (interface{}, error)

returns a fully specified Lesson including the deck of Slides

Error: "Missing ID" if the http.Request does not have an "id" Var

Error: "Non-numeric ID" if the ID is not fully numeric

Types

type DatastoreLesson

type DatastoreLesson struct {
	ID     string
	Title  string
	Deck   string
	Active bool
}

the data type stored by Google Datastore

type Lesson

type Lesson struct {
	Id   int64        `json:"id"`
	Name string       `json:"name"`
	Deck slide.Slides `json:"slides"`
}

a fully specified lesson including the slide deck

type LessonIndex

type LessonIndex []LessonListing

type LessonListing

type LessonListing struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

a simple listing of lessons consisting only of an Id and Name

type Lessons

type Lessons []Lesson

Jump to

Keyboard shortcuts

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