http

package
v0.0.0-...-5f18729 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Articles

func Articles(mux chi.Router, log *log.Logger, db articleGetter)

func Home

func Home(mux chi.Router, log *log.Logger, db articlesGetter)

func Migrate

func Migrate(mux chi.Router, db migrator)

func NewArticle

func NewArticle(mux chi.Router, log *log.Logger, db articleCreator)

Types

type NewServerOptions

type NewServerOptions struct {
	Database *sql.Database
	Host     string
	Log      *log.Logger
	Port     int
}

type Server

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

func NewServer

func NewServer(opts NewServerOptions) *Server

NewServer returns an initialized, but unstarted Server. If no logger is provided, logs are discarded.

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

Jump to

Keyboard shortcuts

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