Documentation
¶
Index ¶
- Constants
- func ReadMaterialReference(reference string, confidential bool) ([]byte, error)
- func ValidatePublicTrustMaterial(data []byte) error
- type CertificateDiscovery
- type CertificatePair
- type Credentials
- type Document
- type PreparedMaterial
- type Registration
- type Store
- func (s Store) Inspect(id string) (Registration, error)
- func (s Store) List() ([]Registration, error)
- func (s Store) Load() (Document, error)
- func (s Store) Register(registration Registration) error
- func (s Store) Remove(id string) error
- func (s Store) Save(doc Document) error
- func (s Store) Update(fn func(*Document) error) error
- type Trust
- type TrustMode
- type Verification
Constants ¶
View Source
const StoreVersion = 1
Variables ¶
This section is empty.
Functions ¶
func ReadMaterialReference ¶ added in v0.4.25
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
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) List ¶
func (s Store) List() ([]Registration, error)
func (Store) Register ¶
func (s Store) Register(registration Registration) error
type Trust ¶
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)
Click to show internal directories.
Click to hide internal directories.