api

package
v0.0.0-...-3bba280 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package api contains the HTTP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Foobar

type Foobar interface {
	Foobar(ctx context.Context, msg string) (string, error)
}

Foobar represents the foobar application.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server serves HTTP requests.

func NewServer

func NewServer(app Foobar, log *logger.Logger) *Server

NewServer returns a new HTTP server.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(rw http.ResponseWriter, r *http.Request)

ServeHTTP serves http requests.

Jump to

Keyboard shortcuts

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