Documentation
¶
Index ¶
- Constants
- Variables
- type CatalogPlugin
- type CatalogResponse
- type Compatibility
- type IconAsset
- type InstallPreview
- type LatestPointer
- type LatestRelease
- type LatestReleaseResponse
- type Meta
- type PackageHashes
- type PluginDetail
- type PluginDetailResponse
- type PluginRepository
- type PluginSummary
- type PresentationCatalog
- type PresentationCompact
- type PresentationCompactLocale
- type PresentationFull
- type PresentationFullLocale
- type PresentationIcon
- type PresentationLocale
- type PresentationSetting
- type PresentationSettingOption
- type PresentationSurface
- type PublicKey
- type PublishedFile
- type PublisherReleaseRef
- type ReleaseAsset
- type ReleaseSource
- type ResolvedPresentation
- type ResolvedSettingPresentation
- type ResolvedSurfacePresentation
- type Service
- func (service *Service) CachedSnapshot() (Snapshot, bool)
- func (service *Service) Detail(ctx context.Context, pluginID string) (PluginDetail, int64, error)
- func (service *Service) Icon(ctx context.Context, pluginID string, expected PresentationIcon) (IconAsset, error)
- func (service *Service) LatestRelease(ctx context.Context, pluginID, channel string) (LatestRelease, error)
- func (service *Service) Snapshot(ctx context.Context) (Snapshot, error)
- type ServiceOptions
- type Snapshot
- type TransportAsset
Constants ¶
View Source
const ( SnapshotSchemaVersion = "redeven.plugin_market_snapshot.v2" SnapshotSourceRemote = "remote" SnapshotSourceCache = "cache" )
Variables ¶
View Source
var ( ErrInvalidResponse = errors.New("plugin market response is invalid") ErrReleaseMissing = errors.New("plugin market release is unavailable") )
Functions ¶
This section is empty.
Types ¶
type CatalogPlugin ¶
type CatalogPlugin struct {
PluginID string `json:"plugin_id"`
PublisherID string `json:"publisher_id"`
Presentation PresentationCompact `json:"presentation"`
Categories []string `json:"categories"`
Channels []string `json:"channels"`
Latest LatestPointer `json:"latest"`
Release *LatestRelease `json:"release,omitempty"`
}
type CatalogResponse ¶
type CatalogResponse struct {
Data []PluginSummary `json:"data"`
Meta Meta `json:"meta"`
}
type Compatibility ¶
type InstallPreview ¶
type InstallPreview struct {
Release LatestRelease `json:"release"`
ReleaseRef host.PluginReleaseRef `json:"release_ref"`
TransportAssets []TransportAsset `json:"transport_assets"`
Compatibility Compatibility `json:"compatibility"`
SecuritySummary host.ExternalPackageSecuritySummary `json:"security_summary"`
ReleaseIdentityDigest string `json:"release_identity_digest"`
ManifestSHA256 string `json:"manifest_sha256"`
ContractSetSHA256 string `json:"contract_set_sha256"`
SummarySHA256 string `json:"summary_sha256"`
}
InstallPreview is the market's verified, display-ready projection for the exact release. ReDevPlugin remains the installation authority; Redeven only transports this evidence to the UI and binds the command to its digests.
type LatestPointer ¶
type LatestPointer struct {
Channel string `json:"channel"`
Version string `json:"version"`
AvailabilityStatus string `json:"availability_status"`
InstallPreview *InstallPreview `json:"install_preview,omitempty"`
}
type LatestRelease ¶
type LatestRelease struct {
PluginID string `json:"plugin_id"`
Channel string `json:"channel"`
Version string `json:"version"`
Source ReleaseSource `json:"source"`
Asset ReleaseAsset `json:"asset"`
ReleaseRefAsset ReleaseAsset `json:"release_ref"`
TrustRoot struct {
URL string `json:"url"`
SHA256 string `json:"sha256"`
} `json:"trust_root"`
PublisherReleaseRef PublisherReleaseRef `json:"publisher_release_ref"`
TransportAssets []TransportAsset `json:"transport_assets"`
SignerKeyID string `json:"signer_key_id"`
Compatibility Compatibility `json:"compatibility"`
ReleaseIdentityDigest string `json:"release_identity_digest"`
InstallPreview *InstallPreview `json:"install_preview,omitempty"`
}
func (LatestRelease) RemoteProjection ¶
func (release LatestRelease) RemoteProjection() (host.PluginReleaseRef, []remoterelease.Asset, error)
type LatestReleaseResponse ¶
type LatestReleaseResponse struct {
Data LatestRelease `json:"data"`
Meta Meta `json:"meta"`
}
type PackageHashes ¶
type PluginDetail ¶
type PluginDetail struct {
PluginID string `json:"plugin_id"`
PublisherID string `json:"publisher_id"`
Presentation PresentationFull `json:"presentation"`
Categories []string `json:"categories"`
Channels []string `json:"channels"`
Repository PluginRepository `json:"repository"`
Compatibility Compatibility `json:"compatibility"`
Status string `json:"status"`
Latest []LatestPointer `json:"latest"`
}
type PluginDetailResponse ¶
type PluginDetailResponse struct {
Data PluginDetail `json:"data"`
Meta Meta `json:"meta"`
}
type PluginRepository ¶
type PluginSummary ¶
type PluginSummary struct {
PluginID string `json:"plugin_id"`
PublisherID string `json:"publisher_id"`
Presentation PresentationCompact `json:"presentation"`
Categories []string `json:"categories"`
Channels []string `json:"channels"`
Latest LatestPointer `json:"latest"`
}
type PresentationCatalog ¶
type PresentationCatalog = PresentationFull
PresentationCatalog is the normalized author presentation exchanged by the market and host. Catalog responses may omit detail-only arrays; detail responses populate every field.
type PresentationCompact ¶
type PresentationCompact struct {
DefaultLocale string `json:"default_locale"`
Icon *PresentationIcon `json:"icon,omitempty"`
Locales []PresentationCompactLocale `json:"locales"`
}
type PresentationFull ¶
type PresentationFull struct {
DefaultLocale string `json:"default_locale"`
Icon *PresentationIcon `json:"icon,omitempty"`
Locales []PresentationFullLocale `json:"locales"`
}
type PresentationFullLocale ¶
type PresentationFullLocale struct {
Locale string `json:"locale"`
Name string `json:"name"`
PublisherName string `json:"publisher_name,omitempty"`
Summary string `json:"summary"`
Description []string `json:"description"`
Highlights []string `json:"highlights"`
Keywords []string `json:"keywords"`
Surfaces []PresentationSurface `json:"surfaces"`
Settings []PresentationSetting `json:"settings"`
}
type PresentationIcon ¶
type PresentationLocale ¶
type PresentationLocale = PresentationFullLocale
type PresentationSetting ¶
type PresentationSetting struct {
Key string `json:"key"`
Label string `json:"label"`
Options []PresentationSettingOption `json:"options"`
}
type PresentationSurface ¶
type PublishedFile ¶
type PublisherReleaseRef ¶
type PublisherReleaseRef struct {
SchemaVersion string `json:"schema_version"`
ReleaseRef host.PluginReleaseRef `json:"release_ref"`
Root PublicKey `json:"root"`
Files []PublishedFile `json:"files"`
}
type ReleaseAsset ¶
type ReleaseSource ¶
type ReleaseSource struct {
Provider string `json:"provider"`
RepositoryID int64 `json:"repository_id"`
RepositoryOwner string `json:"repository_owner"`
RepositoryName string `json:"repository_name"`
ReleaseID int64 `json:"release_id"`
Tag string `json:"tag"`
TargetCommit string `json:"target_commit"`
}
type ResolvedPresentation ¶
type ResolvedPresentation = pluginmanifest.ResolvedPresentation
func ResolvePresentation ¶
func ResolvePresentation(presentation PresentationCatalog, requestedLocale string) ResolvedPresentation
type ResolvedSettingPresentation ¶
type ResolvedSettingPresentation = pluginmanifest.ResolvedSettingPresentation
type ResolvedSurfacePresentation ¶
type ResolvedSurfacePresentation = pluginmanifest.ResolvedSurfacePresentation
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(options ServiceOptions) (*Service, error)
func (*Service) CachedSnapshot ¶
CachedSnapshot returns only already-verified local evidence and never starts a network request. It lets the host render its last known catalog and bind a pending release provider before the background market refresh completes.
func (*Service) LatestRelease ¶
type ServiceOptions ¶
type Snapshot ¶
type Snapshot struct {
SchemaVersion string `json:"schema_version"`
Generation int64 `json:"generation"`
ETag string `json:"etag,omitempty"`
CachedAt time.Time `json:"cached_at"`
Stale bool `json:"stale"`
Source string `json:"source"`
Plugins []CatalogPlugin `json:"plugins"`
}
func (Snapshot) LatestRelease ¶
func (snapshot Snapshot) LatestRelease(pluginID, channel string) (LatestRelease, error)
type TransportAsset ¶
type TransportAsset struct {
Locator string `json:"locator"`
ReleaseAsset
}
Click to show internal directories.
Click to hide internal directories.