web

package
v0.0.0-...-80e6bb0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 12 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 configures a server.

func WithAddr

func WithAddr(addr string) Option

WithAddr sets a server's address.

func WithDebug

func WithDebug() Option

WithDebug enables debug mode on a server.

func WithWebhook

func WithWebhook(hook *webhook.Client) Option

WithWebhook sets a server's webhook URL.

type Server

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

Server is an HTTP server responsible for serving slapshit.net's API.

func New

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

New creates a new server.

func (*Server) Run

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

Run registers routes and starts a server.

Jump to

Keyboard shortcuts

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