server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package server is messenger's small HTTP surface for `serve`: it mounts the runtime's channel webhooks (telegram/webhook inbound arrive on the same port) and exposes the consumer API — POST /send, GET /inbox?since=N, GET /media/<basename>, GET /health. POST /send is bearer-auth'd when a token is configured; the inbound webhooks carry their own per-channel HMAC/secret.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server wires the consumer API + the channel webhooks into one mux.

func New

func New(rt *channel.Runtime, box *inbox.Inbox, token string) *Server

New builds the server over an Up'd runtime. token is the resolved bearer value for the consumer API ("" disables auth for loopback dev).

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the composed mux.

Jump to

Keyboard shortcuts

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