api

package
v0.0.0-...-97a8b9d Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: MIT Imports: 15 Imported by: 5

Documentation

Overview

Package api provides an HTTP handler that handles the bebop REST API requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger        *log.Logger
	Store         store.Store
	JWTService    jwt.Service
	AvatarService avatar.Service
}

Config is an API handler configuration.

type Handler

type Handler struct {
	*Config
	// contains filtered or unexported fields
}

Handler handles API requests.

func New

func New(config *Config) *Handler

New creates a new handler based on the given config.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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