Help us shape the future of Go! Take the 2026 Go Developer Survey

server

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0, Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package server serves built-in directory and inventory facts and their private management APIs. It authenticates service keys; public user authentication and administrative authorization belong to the control plane. Stores retain ownership of mutation invariants, transactions, and audit records.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirectoryHandler

func DirectoryHandler(users directory.Directory, caKey, controlKey sshcert.RawPublicKey, options ...DirectoryOption) (http.Handler, error)

DirectoryHandler serves directory facts and the read-only actor operation. Management is opt-in, even when users also implements Store. An empty control key disables all private control routes.

func InventoryHandler

func InventoryHandler(hosts inventory.Hosts, caKey, controlKey sshcert.RawPublicKey, options ...InventoryOption) (http.Handler, error)

InventoryHandler serves inventory facts. Management is opt-in, even when hosts also implements Store. An empty control key disables management; the CA reader key never confers mutation authority. The caller owns the source's lifetime.

Types

type DirectoryOption added in v0.43.0

type DirectoryOption func(*directoryOptions)

DirectoryOption configures optional directory management.

func WithDirectoryManagement added in v0.43.0

func WithDirectoryManagement(managed directory.Store) DirectoryOption

WithDirectoryManagement adds SCIM and managed directory operations. The data source and management implementation must describe the same logical directory; they may be separate instances. The caller owns both lifetimes.

func WithSCIMUserIDAttribute added in v0.43.0

func WithSCIMUserIDAttribute(attribute string) DirectoryOption

WithSCIMUserIDAttribute selects the SCIM string attribute used to assign a user's ID on creation. The default is externalId. This configures the SCIM adapter, not the store, and requires directory management to be enabled.

type InventoryOption added in v0.43.0

type InventoryOption func(*inventoryOptions)

InventoryOption configures optional inventory management.

func WithInventoryManagement added in v0.43.0

func WithInventoryManagement(managed inventory.Store) InventoryOption

WithInventoryManagement adds the inventory management API. The data source and management implementation must describe the same logical inventory; they may be separate instances. The caller owns both lifetimes.

Jump to

Keyboard shortcuts

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