api

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 65 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuditDetails

func AuditDetails(m map[string]any) string

AuditDetails flattens the lib's details map into the bounded audit column. Locally derived fields go first so a long remote error cannot displace the useful facts.

Types

type LoginRequest

type LoginRequest struct {
	Username     string `json:"username"`
	Password     string `json:"password"`
	CaptchaToken string `json:"captcha_token,omitempty"`
}

type PinKeyRequest

type PinKeyRequest struct {
	PublicKey   string `json:"public_key"`
	Threshold   int    `json:"threshold"`
	TotalShares int    `json:"total_shares"`
}

type RemotePairRequest

type RemotePairRequest struct {
	RecoveryURL string `json:"recovery_url"`
	PairingCode string `json:"pairing_code"`
}

type ScheduleRequest

type ScheduleRequest struct {
	IntervalSec int64 `json:"interval_sec"`
}

type Server

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

func NewServer

func NewServer(cfg *config.Config, st store.Store) *Server

func (*Server) ApplyInstaller

func (s *Server) ApplyInstaller(ctx context.Context, raw []byte, check bool) (applysetup.Report, error)

ApplyInstaller compares desired configuration with the server's immutable startup snapshot. A committed configuration awaiting restart stays pending.

func (*Server) CloseSearch added in v0.4.3

func (s *Server) CloseSearch() error

CloseSearch closes the index; call it after RunSearchIndex has returned.

func (*Server) EditorConfigurationError

func (s *Server) EditorConfigurationError() error

EditorConfigurationError is checked by the CLI before serving requests.

func (*Server) RunBlobSealing

func (s *Server) RunBlobSealing(ctx context.Context)

RunBlobSealing encrypts blobs written before sealing existed and rewrites KYB1 blobs as KYB2, now and then hourly. Each pass first finishes swaps an earlier run committed but did not clean up.

func (*Server) RunEditorRevocations

func (s *Server) RunEditorRevocations(ctx context.Context)

func (*Server) RunRetention

func (s *Server) RunRetention(ctx context.Context)

RunRetention applies retention, sweeps orphaned blobs, expires upload sessions and prunes the change log now and then hourly. Blobs are removed after their metadata commits; a failed removal leaves an unreferenced file, never a dangling version.

func (*Server) RunSearchIndex added in v0.4.3

func (s *Server) RunSearchIndex(ctx context.Context)

RunSearchIndex keeps the index in step with the drive until ctx ends: it reconciles at start and hourly, and every few seconds queues changed files and indexes those due, throttled to about two thirds of a core.

func (*Server) RunSuiteGroups added in v0.6.1

func (s *Server) RunSuiteGroups(ctx context.Context)

RunSuiteGroups reconciles KyIdentity's suite groups into workspaces every suiteGroupsPoll until ctx ends. cmd/server starts it.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Server) StartKyPost added in v0.6.1

func (s *Server) StartKyPost(ctx context.Context)

StartKyPost pairs KyPost through KyIdentity when the environment names none, then keeps the link fresh until ctx ends. cmd/server calls it before serving.

func (*Server) StopBackupCollection

func (s *Server) StopBackupCollection()

StopBackupCollection cancels detached deposits still collecting their payload, so shutdown waits only for those sealing or uploading.

func (*Server) WaitDetached

func (s *Server) WaitDetached()

WaitDetached blocks until every request that detached from its connection has finished. It is called after http.Server.Shutdown and before the store is closed: pairing, the key pin and a deposit all keep writing after their connection is gone, and a closed store under them leaves a key pinned on disk with no row recording it.

type ThemeUpdateRequest

type ThemeUpdateRequest struct {
	Theme string `json:"theme"`
}

Jump to

Keyboard shortcuts

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