httpapi

package
v0.0.0-...-a9e4ab9 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(ctx context.Context, addr string, handler http.Handler) error

Types

type GitHubOAuthConfig

type GitHubOAuthConfig struct {
	ClientID      string
	ClientSecret  string
	PublicURL     string
	AuthURL       string
	TokenURL      string
	UserURL       string
	EmailsURL     string
	MembershipURL string
	AllowedOrg    string
	ModeratorOrg  string
	HTTPClient    *http.Client
}

type Options

type Options struct {
	UploadDir      string
	UploadStorage  uploadstore.Store
	GitHubOAuth    GitHubOAuthConfig
	DisableDevAuth bool
	PushNotifier   PushNotifier
}

type PushNotification

type PushNotification struct {
	RecipientKey string
	Title        string
	Message      string
}

type PushNotifier

type PushNotifier interface {
	Notify(ctx context.Context, notification PushNotification) error
}

type PushoverNotifier

type PushoverNotifier struct {
	Token  string
	Client *http.Client
}

func NewPushoverNotifier

func NewPushoverNotifier(token string) *PushoverNotifier

func (*PushoverNotifier) Notify

func (p *PushoverNotifier) Notify(ctx context.Context, notification PushNotification) error

type Server

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

func New

func New(st store.Store, hub *realtime.Hub, options Options) *Server

func (*Server) Handler

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

Jump to

Keyboard shortcuts

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