cddadb

package module
v0.0.0-...-d13637e Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2018 License: MIT Imports: 5 Imported by: 0

README

cddadb

Data fun with the Cataclysm: Dark Days Ahead data.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRouter

func CreateRouter(server *HTTPServer) (*mux.Router, error)

Types

type DB

type DB struct {
	*sqlx.DB
}

func (*DB) GetItems

func (db *DB) GetItems() ([]*Item, error)

func (*DB) Open

func (db *DB) Open(connectionString string) error

type HTTPServer

type HTTPServer struct {
	DB *DB
}

func NewHTTPServer

func NewHTTPServer(db *DB) *HTTPServer

func (*HTTPServer) GetItems

func (s *HTTPServer) GetItems(w http.ResponseWriter, r *http.Request, vars map[string]string) error

type HttpApiFunc

type HttpApiFunc func(w http.ResponseWriter, r *http.Request, vars map[string]string) error

type Item

type Item struct {
	ID       string `json:"id" db:"id"`
	Abstract string `json:"abstract" db:"abstract"`
	Type     string `json:"type" db:"type"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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