Documentation ¶
Index ¶
- type ArtifactUpdate
- type ArtifactUpdateHeaders
- type BootstrapArtifact
- func (b *BootstrapArtifact) ComposeHeader(args *ComposeHeaderArgs) error
- func (b *BootstrapArtifact) GetUpdateAllFiles() [](*DataFile)
- func (b *BootstrapArtifact) GetUpdateAugmentClearsProvides() []string
- func (b *BootstrapArtifact) GetUpdateAugmentDepends() artifact.TypeInfoDepends
- func (b *BootstrapArtifact) GetUpdateAugmentFiles() [](*DataFile)
- func (b *BootstrapArtifact) GetUpdateAugmentMetaData() map[string]interface{}
- func (b *BootstrapArtifact) GetUpdateAugmentProvides() artifact.TypeInfoProvides
- func (b *BootstrapArtifact) GetUpdateAugmentTypeInfoWriter() io.Writer
- func (b *BootstrapArtifact) GetUpdateClearsProvides() []string
- func (b *BootstrapArtifact) GetUpdateDepends() (artifact.TypeInfoDepends, error)
- func (b *BootstrapArtifact) GetUpdateFiles() [](*DataFile)
- func (b *BootstrapArtifact) GetUpdateMetaData() (map[string]interface{}, error)
- func (b *BootstrapArtifact) GetUpdateOriginalClearsProvides() []string
- func (b *BootstrapArtifact) GetUpdateOriginalDepends() artifact.TypeInfoDepends
- func (b *BootstrapArtifact) GetUpdateOriginalMetaData() map[string]interface{}
- func (b *BootstrapArtifact) GetUpdateOriginalProvides() artifact.TypeInfoProvides
- func (b *BootstrapArtifact) GetUpdateOriginalType() *string
- func (b *BootstrapArtifact) GetUpdateOriginalTypeInfoWriter() io.Writer
- func (b *BootstrapArtifact) GetUpdateProvides() (artifact.TypeInfoProvides, error)
- func (b *BootstrapArtifact) GetUpdateType() *string
- func (b *BootstrapArtifact) GetVersion() int
- func (b *BootstrapArtifact) NewAugmentedInstance(orig ArtifactUpdate) (Installer, error)
- func (b *BootstrapArtifact) NewInstance() Installer
- func (b *BootstrapArtifact) NewUpdateStorer(updateType *string, payloadNum int) (UpdateStorer, error)
- func (b *BootstrapArtifact) ReadHeader(r io.Reader, path string, version int, augmented bool) error
- func (b *BootstrapArtifact) SetUpdateAugmentFiles(files [](*DataFile)) error
- func (b *BootstrapArtifact) SetUpdateFiles(files [](*DataFile)) error
- func (b *BootstrapArtifact) SetUpdateStorerProducer(producer UpdateStorerProducer)
- type ComposeHeaderArgs
- type Composer
- type DataFile
- type Installer
- type ModuleImage
- func (img *ModuleImage) ComposeHeader(args *ComposeHeaderArgs) error
- func (img *ModuleImage) GetUpdateAllFiles() [](*DataFile)
- func (img *ModuleImage) GetUpdateAugmentClearsProvides() []string
- func (img *ModuleImage) GetUpdateAugmentDepends() artifact.TypeInfoDepends
- func (img *ModuleImage) GetUpdateAugmentFiles() [](*DataFile)
- func (img *ModuleImage) GetUpdateAugmentMetaData() map[string]interface{}
- func (img *ModuleImage) GetUpdateAugmentProvides() artifact.TypeInfoProvides
- func (img *ModuleImage) GetUpdateAugmentTypeInfoWriter() io.Writer
- func (img *ModuleImage) GetUpdateClearsProvides() []string
- func (img *ModuleImage) GetUpdateDepends() (artifact.TypeInfoDepends, error)
- func (img *ModuleImage) GetUpdateFiles() [](*DataFile)
- func (img *ModuleImage) GetUpdateMetaData() (map[string]interface{}, error)
- func (img *ModuleImage) GetUpdateOriginalClearsProvides() []string
- func (img *ModuleImage) GetUpdateOriginalDepends() artifact.TypeInfoDepends
- func (img *ModuleImage) GetUpdateOriginalMetaData() map[string]interface{}
- func (img *ModuleImage) GetUpdateOriginalProvides() artifact.TypeInfoProvides
- func (img *ModuleImage) GetUpdateOriginalType() *string
- func (img *ModuleImage) GetUpdateOriginalTypeInfoWriter() io.Writer
- func (img *ModuleImage) GetUpdateProvides() (artifact.TypeInfoProvides, error)
- func (img *ModuleImage) GetUpdateType() *string
- func (img *ModuleImage) GetVersion() int
- func (img *ModuleImage) NewAugmentedInstance(orig ArtifactUpdate) (Installer, error)
- func (img *ModuleImage) NewInstance() Installer
- func (i *ModuleImage) NewUpdateStorer(updateType *string, payloadNum int) (UpdateStorer, error)
- func (img *ModuleImage) ReadHeader(r io.Reader, path string, version int, augmented bool) error
- func (img *ModuleImage) SetUpdateAugmentFiles(files [](*DataFile)) error
- func (img *ModuleImage) SetUpdateFiles(files [](*DataFile)) error
- func (i *ModuleImage) SetUpdateStorerProducer(producer UpdateStorerProducer)
- type Rootfs
- func (rfs *Rootfs) ComposeHeader(args *ComposeHeaderArgs) error
- func (rfs *Rootfs) GetUpdateAllFiles() [](*DataFile)
- func (rfs *Rootfs) GetUpdateAugmentClearsProvides() []string
- func (rfs *Rootfs) GetUpdateAugmentDepends() artifact.TypeInfoDepends
- func (rfs *Rootfs) GetUpdateAugmentFiles() [](*DataFile)
- func (rfs *Rootfs) GetUpdateAugmentMetaData() map[string]interface{}
- func (rfs *Rootfs) GetUpdateAugmentProvides() artifact.TypeInfoProvides
- func (rfs *Rootfs) GetUpdateAugmentTypeInfoWriter() io.Writer
- func (rfs *Rootfs) GetUpdateClearsProvides() []string
- func (rfs *Rootfs) GetUpdateDepends() (artifact.TypeInfoDepends, error)
- func (rfs *Rootfs) GetUpdateFiles() [](*DataFile)
- func (rfs *Rootfs) GetUpdateMetaData() (map[string]interface{}, error)
- func (rfs *Rootfs) GetUpdateOriginalClearsProvides() []string
- func (rfs *Rootfs) GetUpdateOriginalDepends() artifact.TypeInfoDepends
- func (rfs *Rootfs) GetUpdateOriginalMetaData() map[string]interface{}
- func (rfs *Rootfs) GetUpdateOriginalProvides() artifact.TypeInfoProvides
- func (rfs *Rootfs) GetUpdateOriginalType() *string
- func (rfs *Rootfs) GetUpdateOriginalTypeInfoWriter() io.Writer
- func (rfs *Rootfs) GetUpdateProvides() (artifact.TypeInfoProvides, error)
- func (rfs *Rootfs) GetUpdateType() *string
- func (rp *Rootfs) GetVersion() int
- func (rp *Rootfs) NewAugmentedInstance(orig ArtifactUpdate) (Installer, error)
- func (rp *Rootfs) NewInstance() Installer
- func (i *Rootfs) NewUpdateStorer(updateType *string, payloadNum int) (UpdateStorer, error)
- func (rp *Rootfs) ReadHeader(r io.Reader, path string, version int, augmented bool) error
- func (rfs *Rootfs) SetUpdateAugmentFiles(files [](*DataFile)) error
- func (rfs *Rootfs) SetUpdateFiles(files [](*DataFile)) error
- func (i *Rootfs) SetUpdateStorerProducer(producer UpdateStorerProducer)
- type UpdateStorer
- type UpdateStorerProducer
- type WriteInfoArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactUpdate ¶
type ArtifactUpdate interface { ArtifactUpdateHeaders // Operates on non-augmented files. GetUpdateFiles() [](*DataFile) SetUpdateFiles(files [](*DataFile)) error // Operates on augmented files. GetUpdateAugmentFiles() [](*DataFile) SetUpdateAugmentFiles(files [](*DataFile)) error // Gets both augmented and non-augmented files. GetUpdateAllFiles() [](*DataFile) }
type ArtifactUpdateHeaders ¶
type ArtifactUpdateHeaders interface { GetVersion() int // Return type of this update, which could be augmented. GetUpdateType() *string // Return type of original (non-augmented) update, if any. GetUpdateOriginalType() *string // Returns merged data of non-augmented and augmented data, where the // latter overrides the former. Returns error if they cannot be merged. GetUpdateDepends() (artifact.TypeInfoDepends, error) GetUpdateProvides() (artifact.TypeInfoProvides, error) GetUpdateMetaData() (map[string]interface{}, error) // Generic JSON GetUpdateClearsProvides() []string // Returns non-augmented (original) data. GetUpdateOriginalDepends() artifact.TypeInfoDepends GetUpdateOriginalProvides() artifact.TypeInfoProvides GetUpdateOriginalMetaData() map[string]interface{} // Generic JSON GetUpdateOriginalClearsProvides() []string // Returns augmented data. GetUpdateAugmentDepends() artifact.TypeInfoDepends GetUpdateAugmentProvides() artifact.TypeInfoProvides GetUpdateAugmentMetaData() map[string]interface{} // Generic JSON GetUpdateAugmentClearsProvides() []string GetUpdateOriginalTypeInfoWriter() io.Writer GetUpdateAugmentTypeInfoWriter() io.Writer }
type BootstrapArtifact ¶
type BootstrapArtifact struct {
// contains filtered or unexported fields
}
func NewBootstrapArtifact ¶
func NewBootstrapArtifact() *BootstrapArtifact
func (*BootstrapArtifact) ComposeHeader ¶
func (b *BootstrapArtifact) ComposeHeader(args *ComposeHeaderArgs) error
func (*BootstrapArtifact) GetUpdateAllFiles ¶
func (b *BootstrapArtifact) GetUpdateAllFiles() [](*DataFile)
func (*BootstrapArtifact) GetUpdateAugmentClearsProvides ¶
func (b *BootstrapArtifact) GetUpdateAugmentClearsProvides() []string
func (*BootstrapArtifact) GetUpdateAugmentDepends ¶
func (b *BootstrapArtifact) GetUpdateAugmentDepends() artifact.TypeInfoDepends
Returns augmented data.
func (*BootstrapArtifact) GetUpdateAugmentFiles ¶
func (b *BootstrapArtifact) GetUpdateAugmentFiles() [](*DataFile)
func (*BootstrapArtifact) GetUpdateAugmentMetaData ¶
func (b *BootstrapArtifact) GetUpdateAugmentMetaData() map[string]interface{}
func (*BootstrapArtifact) GetUpdateAugmentProvides ¶
func (b *BootstrapArtifact) GetUpdateAugmentProvides() artifact.TypeInfoProvides
func (*BootstrapArtifact) GetUpdateAugmentTypeInfoWriter ¶
func (b *BootstrapArtifact) GetUpdateAugmentTypeInfoWriter() io.Writer
func (*BootstrapArtifact) GetUpdateClearsProvides ¶
func (b *BootstrapArtifact) GetUpdateClearsProvides() []string
func (*BootstrapArtifact) GetUpdateDepends ¶
func (b *BootstrapArtifact) GetUpdateDepends() (artifact.TypeInfoDepends, error)
func (*BootstrapArtifact) GetUpdateFiles ¶
func (b *BootstrapArtifact) GetUpdateFiles() [](*DataFile)
func (*BootstrapArtifact) GetUpdateMetaData ¶
func (b *BootstrapArtifact) GetUpdateMetaData() (map[string]interface{}, error)
func (*BootstrapArtifact) GetUpdateOriginalClearsProvides ¶
func (b *BootstrapArtifact) GetUpdateOriginalClearsProvides() []string
func (*BootstrapArtifact) GetUpdateOriginalDepends ¶
func (b *BootstrapArtifact) GetUpdateOriginalDepends() artifact.TypeInfoDepends
Returns non-augmented (original) data.
func (*BootstrapArtifact) GetUpdateOriginalMetaData ¶
func (b *BootstrapArtifact) GetUpdateOriginalMetaData() map[string]interface{}
func (*BootstrapArtifact) GetUpdateOriginalProvides ¶
func (b *BootstrapArtifact) GetUpdateOriginalProvides() artifact.TypeInfoProvides
func (*BootstrapArtifact) GetUpdateOriginalType ¶
func (b *BootstrapArtifact) GetUpdateOriginalType() *string
Return type of original (non-augmented) update, if any.
func (*BootstrapArtifact) GetUpdateOriginalTypeInfoWriter ¶
func (b *BootstrapArtifact) GetUpdateOriginalTypeInfoWriter() io.Writer
func (*BootstrapArtifact) GetUpdateProvides ¶
func (b *BootstrapArtifact) GetUpdateProvides() (artifact.TypeInfoProvides, error)
func (*BootstrapArtifact) GetUpdateType ¶
func (b *BootstrapArtifact) GetUpdateType() *string
Return type of this update, which could be augmented.
func (*BootstrapArtifact) GetVersion ¶
func (b *BootstrapArtifact) GetVersion() int
func (*BootstrapArtifact) NewAugmentedInstance ¶
func (b *BootstrapArtifact) NewAugmentedInstance(orig ArtifactUpdate) (Installer, error)
func (*BootstrapArtifact) NewInstance ¶
func (b *BootstrapArtifact) NewInstance() Installer
func (*BootstrapArtifact) NewUpdateStorer ¶
func (b *BootstrapArtifact) NewUpdateStorer( updateType *string, payloadNum int, ) (UpdateStorer, error)
func (*BootstrapArtifact) ReadHeader ¶
func (*BootstrapArtifact) SetUpdateAugmentFiles ¶
func (b *BootstrapArtifact) SetUpdateAugmentFiles(files [](*DataFile)) error
func (*BootstrapArtifact) SetUpdateFiles ¶
func (b *BootstrapArtifact) SetUpdateFiles(files [](*DataFile)) error
func (*BootstrapArtifact) SetUpdateStorerProducer ¶
func (b *BootstrapArtifact) SetUpdateStorerProducer(producer UpdateStorerProducer)
type ComposeHeaderArgs ¶
type Composer ¶
type Composer interface { ArtifactUpdate ComposeHeader(args *ComposeHeaderArgs) error }
type DataFile ¶
type DataFile struct { // name of the update file Name string // size of the update file Size int64 // last modification time Date time.Time // checksum of the update file Checksum []byte }
DataFile represents the minimum set of attributes each update file must contain. Some of those might be empty though for specific update types.
type Installer ¶
type Installer interface { ArtifactUpdate UpdateStorerProducer ReadHeader(r io.Reader, path string, version int, augmented bool) error SetUpdateStorerProducer(producer UpdateStorerProducer) NewInstance() Installer NewAugmentedInstance(orig ArtifactUpdate) (Installer, error) }
type ModuleImage ¶
type ModuleImage struct {
// contains filtered or unexported fields
}
func NewAugmentedModuleImage ¶
func NewAugmentedModuleImage(orig ArtifactUpdate, updateType string) *ModuleImage
func NewModuleImage ¶
func NewModuleImage(updateType string) *ModuleImage
func (*ModuleImage) ComposeHeader ¶
func (img *ModuleImage) ComposeHeader(args *ComposeHeaderArgs) error
func (*ModuleImage) GetUpdateAllFiles ¶
func (img *ModuleImage) GetUpdateAllFiles() [](*DataFile)
func (*ModuleImage) GetUpdateAugmentClearsProvides ¶
func (img *ModuleImage) GetUpdateAugmentClearsProvides() []string
func (*ModuleImage) GetUpdateAugmentDepends ¶
func (img *ModuleImage) GetUpdateAugmentDepends() artifact.TypeInfoDepends
func (*ModuleImage) GetUpdateAugmentFiles ¶
func (img *ModuleImage) GetUpdateAugmentFiles() [](*DataFile)
func (*ModuleImage) GetUpdateAugmentMetaData ¶
func (img *ModuleImage) GetUpdateAugmentMetaData() map[string]interface{}
func (*ModuleImage) GetUpdateAugmentProvides ¶
func (img *ModuleImage) GetUpdateAugmentProvides() artifact.TypeInfoProvides
func (*ModuleImage) GetUpdateAugmentTypeInfoWriter ¶
func (img *ModuleImage) GetUpdateAugmentTypeInfoWriter() io.Writer
func (*ModuleImage) GetUpdateClearsProvides ¶
func (img *ModuleImage) GetUpdateClearsProvides() []string
func (*ModuleImage) GetUpdateDepends ¶
func (img *ModuleImage) GetUpdateDepends() (artifact.TypeInfoDepends, error)
func (*ModuleImage) GetUpdateFiles ¶
func (img *ModuleImage) GetUpdateFiles() [](*DataFile)
func (*ModuleImage) GetUpdateMetaData ¶
func (img *ModuleImage) GetUpdateMetaData() (map[string]interface{}, error)
func (*ModuleImage) GetUpdateOriginalClearsProvides ¶
func (img *ModuleImage) GetUpdateOriginalClearsProvides() []string
func (*ModuleImage) GetUpdateOriginalDepends ¶
func (img *ModuleImage) GetUpdateOriginalDepends() artifact.TypeInfoDepends
func (*ModuleImage) GetUpdateOriginalMetaData ¶
func (img *ModuleImage) GetUpdateOriginalMetaData() map[string]interface{}
func (*ModuleImage) GetUpdateOriginalProvides ¶
func (img *ModuleImage) GetUpdateOriginalProvides() artifact.TypeInfoProvides
func (*ModuleImage) GetUpdateOriginalType ¶
func (img *ModuleImage) GetUpdateOriginalType() *string
func (*ModuleImage) GetUpdateOriginalTypeInfoWriter ¶
func (img *ModuleImage) GetUpdateOriginalTypeInfoWriter() io.Writer
func (*ModuleImage) GetUpdateProvides ¶
func (img *ModuleImage) GetUpdateProvides() (artifact.TypeInfoProvides, error)
func (*ModuleImage) GetUpdateType ¶
func (img *ModuleImage) GetUpdateType() *string
func (*ModuleImage) GetVersion ¶
func (img *ModuleImage) GetVersion() int
func (*ModuleImage) NewAugmentedInstance ¶
func (img *ModuleImage) NewAugmentedInstance(orig ArtifactUpdate) (Installer, error)
func (*ModuleImage) NewInstance ¶
func (img *ModuleImage) NewInstance() Installer
func (*ModuleImage) NewUpdateStorer ¶
func (i *ModuleImage) NewUpdateStorer(updateType *string, payloadNum int) (UpdateStorer, error)
func (*ModuleImage) ReadHeader ¶
func (*ModuleImage) SetUpdateAugmentFiles ¶
func (img *ModuleImage) SetUpdateAugmentFiles(files [](*DataFile)) error
func (*ModuleImage) SetUpdateFiles ¶
func (img *ModuleImage) SetUpdateFiles(files [](*DataFile)) error
func (*ModuleImage) SetUpdateStorerProducer ¶
func (i *ModuleImage) SetUpdateStorerProducer(producer UpdateStorerProducer)
type Rootfs ¶
type Rootfs struct {
// contains filtered or unexported fields
}
Rootfs handles updates of type 'rootfs-image'.
func NewAugmentedRootfs ¶
func NewAugmentedRootfs(orig ArtifactUpdate, updFile string) *Rootfs
func NewRootfsInstaller ¶
func NewRootfsInstaller() *Rootfs
NewRootfsInstaller is used by the artifact reader to read and install rootfs-image update type.
func NewRootfsV2 ¶
func NewRootfsV3 ¶
func (*Rootfs) ComposeHeader ¶
func (rfs *Rootfs) ComposeHeader(args *ComposeHeaderArgs) error
func (*Rootfs) GetUpdateAllFiles ¶
func (*Rootfs) GetUpdateAugmentClearsProvides ¶
func (*Rootfs) GetUpdateAugmentDepends ¶
func (rfs *Rootfs) GetUpdateAugmentDepends() artifact.TypeInfoDepends
func (*Rootfs) GetUpdateAugmentFiles ¶
func (*Rootfs) GetUpdateAugmentMetaData ¶
func (*Rootfs) GetUpdateAugmentProvides ¶
func (rfs *Rootfs) GetUpdateAugmentProvides() artifact.TypeInfoProvides
func (*Rootfs) GetUpdateAugmentTypeInfoWriter ¶
func (*Rootfs) GetUpdateClearsProvides ¶
func (*Rootfs) GetUpdateDepends ¶
func (rfs *Rootfs) GetUpdateDepends() (artifact.TypeInfoDepends, error)
func (*Rootfs) GetUpdateFiles ¶
func (*Rootfs) GetUpdateMetaData ¶
func (*Rootfs) GetUpdateOriginalClearsProvides ¶
func (*Rootfs) GetUpdateOriginalDepends ¶
func (rfs *Rootfs) GetUpdateOriginalDepends() artifact.TypeInfoDepends
func (*Rootfs) GetUpdateOriginalMetaData ¶
func (*Rootfs) GetUpdateOriginalProvides ¶
func (rfs *Rootfs) GetUpdateOriginalProvides() artifact.TypeInfoProvides
func (*Rootfs) GetUpdateOriginalType ¶
func (*Rootfs) GetUpdateOriginalTypeInfoWriter ¶
func (*Rootfs) GetUpdateProvides ¶
func (rfs *Rootfs) GetUpdateProvides() (artifact.TypeInfoProvides, error)
func (*Rootfs) GetUpdateType ¶
func (*Rootfs) GetVersion ¶
func (*Rootfs) NewAugmentedInstance ¶
func (rp *Rootfs) NewAugmentedInstance(orig ArtifactUpdate) (Installer, error)
func (*Rootfs) NewInstance ¶
Copy creates a new instance of Rootfs handler from the existing one.
func (*Rootfs) NewUpdateStorer ¶
func (i *Rootfs) NewUpdateStorer(updateType *string, payloadNum int) (UpdateStorer, error)
func (*Rootfs) ReadHeader ¶
func (*Rootfs) SetUpdateAugmentFiles ¶
func (*Rootfs) SetUpdateFiles ¶
func (*Rootfs) SetUpdateStorerProducer ¶
func (i *Rootfs) SetUpdateStorerProducer(producer UpdateStorerProducer)
type UpdateStorer ¶
type UpdateStorer interface { // Called as soon as all headers all collected. Initialize(artifactHeaders, artifactAugmentedHeaders artifact.HeaderInfoer, payloadHeaders ArtifactUpdateHeaders) error // Called before storing any file for this UpdateStorer PrepareStoreUpdate() error // Called once for each file to store StoreUpdate(r io.Reader, info os.FileInfo) error // Called after all files have been stored, even if there was an error FinishStoreUpdate() error }
type UpdateStorerProducer ¶
type UpdateStorerProducer interface {
NewUpdateStorer(updateType *string, payloadNum int) (UpdateStorer, error)
}
type WriteInfoArgs ¶
type WriteInfoArgs struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.