server

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 16 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 Config added in v0.3.2

type Config struct {
	Addr       string
	Controller Controller
	Refresher  Refresher
	Copies     *store.CopyStore
	Events     *store.EventStore
	Auth       Authenticator
	StatusFn   func() StatusResponse
}

Config holds the dependencies and settings for New.

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 Refresher added in v0.3.0

type Refresher interface {
	Refresh(ctx context.Context, targetName string, opts refresh.Options) (*refresh.Result, error)
}

type Server

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

func New

func New(cfg Config) *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