web

package
v0.0.0-...-ed93a40 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

Option is used to configure a server.

func WithAddr

func WithAddr(addr string) Option

WithAddr sets a server's address.

func WithAdmins

func WithAdmins(admins map[string]string) Option

WithAdmins sets a server's admins.

func WithDB

func WithDB(db *sql.DB) Option

WithDB sets a server's DB client.

type Server

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

Server is web server responsible for serving turnttable.

func New

func New(opts ...Option) (*Server, error)

New creates a new server from the given options.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run registers routes and runs a server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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