api

package
v0.1.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package api implements the pushq REST API (see api/openapi.yaml).

Index

Constants

View Source
const (
	CodeAlreadyExists      = "already_exists"
	CodeNotFound           = "not_found"
	CodeFailedPrecondition = "failed_precondition"
	CodeInvalidArgument    = "invalid_argument"
	CodeUnauthenticated    = "unauthenticated"
	CodePermissionDenied   = "permission_denied"
	CodePayloadTooLarge    = "payload_too_large"
	CodeInternal           = "internal"
)

Stable machine-readable error codes (RFC 9457 problem+json `code` extension).

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Store          store.Store
	Auth           *auth.Auth
	Log            *slog.Logger
	Limits         config.Limits
	MetricsPublic  bool
	MetricsHandler http.Handler
	Now            func() time.Time
	Role           func() string // "leader" | "follower" for readyz
}

func (*Server) Router

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

Directories

Path Synopsis
Package types holds the JSON DTOs mirroring api/openapi.yaml.
Package types holds the JSON DTOs mirroring api/openapi.yaml.

Jump to

Keyboard shortcuts

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