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

externalprovider

package
v0.4.25 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const StoreVersion = 1

Variables

This section is empty.

Functions

func ReadMaterialReference added in v0.4.25

func ReadMaterialReference(reference string, confidential bool) ([]byte, error)

ReadMaterialReference resolves the supported local adapter without mutating the source. Public trust may be readable; private credentials need one owner.

func ValidatePublicTrustMaterial added in v0.4.25

func ValidatePublicTrustMaterial(data []byte) error

Public trust is a certificate-only delivery surface. Never copy a private key or arbitrary accompanying text through a CA/workload projection.

Types

type CertificateDiscovery

type CertificateDiscovery struct {
	Directory       string            `json:"directory"`
	CAReferences    []string          `json:"ca_references,omitempty"`
	Pairs           []CertificatePair `json:"pairs,omitempty"`
	HostnameMatches []CertificatePair `json:"hostname_matches,omitempty"`
	ClientPairs     []CertificatePair `json:"client_pairs,omitempty"`
}

func DiscoverCertificateDirectory

func DiscoverCertificateDirectory(dir, hostname string) (CertificateDiscovery, error)

type CertificatePair

type CertificatePair struct {
	Certificate string   `json:"certificate"`
	PrivateKey  string   `json:"private_key"`
	DNSNames    []string `json:"dns_names,omitempty"`
	ClientAuth  bool     `json:"client_auth,omitempty"`
	ServerAuth  bool     `json:"server_auth,omitempty"`
	NotBefore   string   `json:"not_before,omitempty"`
	NotAfter    string   `json:"not_after,omitempty"`
}

type Credentials

type Credentials struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Token    string `json:"token,omitempty"`
}

func DecodeCredentialMaterial added in v0.4.25

func DecodeCredentialMaterial(data []byte) (Credentials, error)

Decode captured protected input without a second read of mutable source files.

func ResolveCredentialReference

func ResolveCredentialReference(reference string) (Credentials, error)

type Document

type Document struct {
	Version       int            `json:"version"`
	Registrations []Registration `json:"registrations,omitempty"`
}

type PreparedMaterial added in v0.4.25

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

Private snapshots stay inside adapters; no material digest enters a public registration, result or manifest. The existing local reader remains authority.

func PrepareMaterialReference added in v0.4.25

func PrepareMaterialReference(reference string, confidential bool) (*PreparedMaterial, error)

func (*PreparedMaterial) Bytes added in v0.4.25

func (p *PreparedMaterial) Bytes() []byte

func (*PreparedMaterial) Revalidate added in v0.4.25

func (p *PreparedMaterial) Revalidate() error

type Registration

type Registration struct {
	ID               string              `json:"id"`
	ProviderID       string              `json:"provider_id"`
	ProviderVersion  string              `json:"provider_version,omitempty"`
	ProviderProtocol string              `json:"provider_protocol,omitempty"`
	Provider         capability.Provider `json:"provider"`
	Endpoint         string              `json:"endpoint"`
	CredentialRef    string              `json:"credential_ref,omitempty"`
	Trust            Trust               `json:"trust"`
	Metadata         map[string]string   `json:"metadata,omitempty"`
}

func (Registration) Public

func (r Registration) Public() Registration

func (Registration) Validate

func (r Registration) Validate() error

type Store

type Store struct {
	Path string
}

func (Store) Inspect

func (s Store) Inspect(id string) (Registration, error)

func (Store) List

func (s Store) List() ([]Registration, error)

func (Store) Load

func (s Store) Load() (Document, error)

func (Store) Register

func (s Store) Register(registration Registration) error

func (Store) Remove

func (s Store) Remove(id string) error

func (Store) Save

func (s Store) Save(doc Document) error

func (Store) Update

func (s Store) Update(fn func(*Document) error) error

type Trust

type Trust struct {
	Mode              TrustMode `json:"mode"`
	CAReference       string    `json:"ca_reference,omitempty"`
	ClientCertificate string    `json:"client_certificate_reference,omitempty"`
	ClientKey         string    `json:"client_key_reference,omitempty"`
	Directory         string    `json:"directory,omitempty"`
}

func (Trust) Validate

func (t Trust) Validate() error

type TrustMode

type TrustMode string
const (
	TrustAuto     TrustMode = "auto"
	TrustSystem   TrustMode = "system"
	TrustCustomCA TrustMode = "custom-ca"
	TrustMTLS     TrustMode = "mtls"
)

type Verification

type Verification struct {
	ID           string `json:"id"`
	Endpoint     string `json:"endpoint"`
	Capability   string `json:"capability,omitempty"`
	Reachability string `json:"reachability"`
	TLS          string `json:"tls"`
	Semantic     string `json:"semantic,omitempty"`
	Detail       string `json:"detail,omitempty"`
}

func Verify

func Verify(ctx context.Context, registration Registration) (Verification, error)

Jump to

Keyboard shortcuts

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