server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package server implements the ditto shared-host HTTP API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator added in v0.2.0

type Authenticator interface {
	Authenticate(ctx context.Context, authHeader string) (*oidc.Principal, error)
}

type Controller added in v0.2.0

type Controller interface {
	Create(ctx context.Context, opts copypkg.CreateOptions) (*store.Copy, error)
	Destroy(ctx context.Context, id string) error
}

type Server

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

func New

func New(
	addr string,
	controller Controller,
	copies *store.CopyStore,
	events *store.EventStore,
	auth Authenticator,
	statusFn func() StatusResponse,
) *Server

func (*Server) Handler added in v0.2.0

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

func (*Server) Start

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

type StatusResponse

type StatusResponse = apiv2.StatusResponse

Jump to

Keyboard shortcuts

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