httpapi

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 38 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 AccessConfig added in v0.2.1

type AccessConfig struct {
	TeamDomain string
	Audience   string
	HTTPClient *http.Client
	Now        func() time.Time
}

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
	Access              AccessConfig
	FrontendURL         string
	PublicAPIURL        string
	EmbedFrameAncestors []string
	CookieNames         authpolicy.CookieNames
	DisableDevAuth      bool
	PushNotifier        PushNotifier
	MetricsEnabled      bool
	Environment         string
	Version             string
	Commit              string
}

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) CleanupPendingUploadObjects added in v0.2.0

func (s *Server) CleanupPendingUploadObjects(ctx context.Context, limit int) error

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