api

package
v0.0.0-...-8405ca7 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: MIT Imports: 15 Imported by: 1

Documentation

Overview

Package api provides an HTTP handler that handles the forum 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