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

inventoryapi

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package inventoryapi defines the v2 resolver protocol independently of Writ and storage implementations. CA projects policy inputs from validated results.

Index

Constants

View Source
const Version = 2

Version is the inventory resolution wire version.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectorySnapshot

type DirectorySnapshot struct {
	Revision string      `json:"revision"`
	User     *facts.User `json:"user"`
}

func (*DirectorySnapshot) UnmarshalJSON

func (d *DirectorySnapshot) UnmarshalJSON(data []byte) error

type Host

type Host struct {
	facts.HostResource
	Principal Principal `json:"principal"`
}

type HostSnapshot

type HostSnapshot struct {
	Revision string `json:"revision"`
	Host     *Host  `json:"host"`
}

func (*HostSnapshot) UnmarshalJSON

func (h *HostSnapshot) UnmarshalJSON(data []byte) error

type Principal

type Principal struct {
	Mode   string `json:"mode"`
	Domain string `json:"domain,omitempty"`
}

type Resolution

type Resolution struct {
	Version        int                  `json:"version"`
	Authentication facts.Authentication `json:"authentication"`
	Target         string               `json:"target"`
	Directory      DirectorySnapshot    `json:"directory"`
	Inventory      HostSnapshot         `json:"inventory"`
}

func (*Resolution) Validate

func (r *Resolution) Validate(host string) error

Validate checks both request binding and all fields whose omission could broaden authorization. Absence of an entity is represented only by null.

type ResolveRequest

type ResolveRequest struct {
	Token string `json:"token"`
	Host  string `json:"host"`
}

Jump to

Keyboard shortcuts

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