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

externalprovider

package
v0.4.22 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const StoreVersion = 1

Variables

This section is empty.

Functions

This section is empty.

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 ResolveCredentialReference

func ResolveCredentialReference(reference string) (Credentials, error)

type Document

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

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