Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDirtySource = errors.New("source changed since last pack; run agentpaas pack to rebuild")
ErrDirtySource is returned when project source no longer matches the locked digest.
var ErrNoPublisherIdentity = errors.New("publisher identity not initialized; run agentpaas identity init")
ErrNoPublisherIdentity is returned when publisher identity is missing.
var ErrV1Lock = errors.New("agent was packed without publisher identity; run agentpaas pack after agentpaas identity init")
ErrV1Lock is returned when the deployed lock is not schema v2 with publisher.
Functions ¶
func CheckDeniedProjectFiles ¶
CheckDeniedProjectFiles rejects sensitive filenames even when a project ignore rule would otherwise omit them from the bundle. Ignoring a secret file is not proof that it is safe to export the project.
func ExportIgnoreMatcher ¶
func ExportIgnoreMatcher(projectDir string) (*pack.IgnoreMatcher, error)
ExportIgnoreMatcher returns an IgnoreMatcher for export that matches exactly what pack uses (LoadIgnore). The export source digest MUST match the pack build input digest, so we must use the same ignore matcher — not a custom one with extra patterns.
func IsDeniedExportPath ¶
IsDeniedExportPath reports whether relPath (project-relative, slash-separated) must be rejected before export.
Types ¶
type Config ¶
type Config struct {
Home string
ProjectDir string
OutputPath string
WithImage bool
IncludeGlobs []string
SkipConfirm bool
PublisherStore identity.KeyStore
Audit pack.AuditAppender
}
Config controls the export pipeline.
type FileManifestEntry ¶
type FileManifestEntry struct {
Path string `json:"path"`
Digest string `json:"digest"`
Bytes int64 `json:"bytes"`
Extra bool `json:"extra,omitempty"`
}
FileManifestEntry describes one file that would be written into the bundle.
type PreviewResult ¶
type PreviewResult struct {
AgentName string
AgentVersion string
Files []FileManifestEntry
}
PreviewResult is returned by Preview before writing a bundle.