api

package module
Version: v0.0.0-...-5a2d038 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2014 License: MIT Imports: 5 Imported by: 0

README

Go webservice

Just a place for me to hack away and learn some Go.

Analytics

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexHandler

func IndexHandler(w http.ResponseWriter, r *http.Request)

func SaveHandler

func SaveHandler(w http.ResponseWriter, r *http.Request)

func UpdateHandler

func UpdateHandler(w http.ResponseWriter, r *http.Request)

func ViewHandler

func ViewHandler(w http.ResponseWriter, r *http.Request, title string)

Types

type Page

type Page struct {
	Title string `json:"title"`
	Body  []byte `json:"body,omitempty"`
}

func (*Page) MarshalJSON

func (p *Page) MarshalJSON() ([]byte, error)

func (*Page) Save

func (p *Page) Save() error

type PageJSON

type PageJSON struct {
	Title string `json:"title"`
	Body  string `json:"body,omitempty"`
}

Source Files

Directories

Path Synopsis
Originally from https://github.com/ant0ine/go-json-rest/master/test/util.go Utility functions to help writing tests for a Go-Json-Rest app Go comes with net/http/httptest to help writing test for an http server.
Originally from https://github.com/ant0ine/go-json-rest/master/test/util.go Utility functions to help writing tests for a Go-Json-Rest app Go comes with net/http/httptest to help writing test for an http server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL