Documentation
¶
Index ¶
- type DataHandlerFunc
- type GenericParser
- func (rp *GenericParser) ArchiveData(tw *tar.Writer, src, dst string) error
- func (rp *GenericParser) ArchiveHeader(tw *tar.Writer, src, dst string, updFiles []string) error
- func (rp *GenericParser) Copy() Parser
- func (rp *GenericParser) GetDeviceType() string
- func (rp *GenericParser) GetMetadata() *metadata.AllMetadata
- func (rp *GenericParser) GetUpdateFiles() map[string]UpdateFile
- func (rp *GenericParser) GetUpdateType() *metadata.UpdateType
- func (rp *GenericParser) ParseData(r io.Reader) error
- func (rp *GenericParser) ParseHeader(tr *tar.Reader, hdr *tar.Header, hPath string) error
- type ParseManager
- func (p *ParseManager) GetGeneric() Parser
- func (p *ParseManager) GetRegistered(parsingType string) (Parser, error)
- func (p *ParseManager) GetWorker(update string) (Parser, error)
- func (p *ParseManager) GetWorkers() Workers
- func (p *ParseManager) PushWorker(parser Parser, update string) error
- func (p *ParseManager) Register(parser Parser) error
- func (p *ParseManager) SetGeneric(parser Parser)
- type Parser
- type Reader
- type RootfsParser
- func (rp *RootfsParser) ArchiveData(tw *tar.Writer, src, dst string) error
- func (rp *RootfsParser) ArchiveHeader(tw *tar.Writer, src, dst string, updFiles []string) error
- func (rp *RootfsParser) Copy() Parser
- func (rp *RootfsParser) GetDeviceType() string
- func (rp *RootfsParser) GetImageID() string
- func (rp *RootfsParser) GetMetadata() *metadata.AllMetadata
- func (rp *RootfsParser) GetUpdateFiles() map[string]UpdateFile
- func (rp *RootfsParser) GetUpdateType() *metadata.UpdateType
- func (rp *RootfsParser) ParseData(r io.Reader) error
- func (rp *RootfsParser) ParseHeader(tr *tar.Reader, hdr *tar.Header, hPath string) error
- type UpdateFile
- type Workers
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataHandlerFunc ¶
type DataHandlerFunc func(r io.Reader, dt string, uf UpdateFile) error
DataHandlerFunc is a user provided update data stream handler. Parameter `r` is a decompressed data stream, `dt` holds current device type, `uf` contains basic information about update. The handler shall return nil if no errors occur.
type GenericParser ¶
type GenericParser struct {
// contains filtered or unexported fields
}
func (*GenericParser) ArchiveData ¶
func (rp *GenericParser) ArchiveData(tw *tar.Writer, src, dst string) error
func (*GenericParser) ArchiveHeader ¶
func (*GenericParser) Copy ¶
func (rp *GenericParser) Copy() Parser
func (*GenericParser) GetDeviceType ¶
func (rp *GenericParser) GetDeviceType() string
func (*GenericParser) GetMetadata ¶
func (rp *GenericParser) GetMetadata() *metadata.AllMetadata
func (*GenericParser) GetUpdateFiles ¶
func (rp *GenericParser) GetUpdateFiles() map[string]UpdateFile
func (*GenericParser) GetUpdateType ¶
func (rp *GenericParser) GetUpdateType() *metadata.UpdateType
func (*GenericParser) ParseData ¶
func (rp *GenericParser) ParseData(r io.Reader) error
data files are stored in tar.gz format
func (*GenericParser) ParseHeader ¶
type ParseManager ¶
type ParseManager struct {
// contains filtered or unexported fields
}
func NewParseManager ¶
func NewParseManager() *ParseManager
func (*ParseManager) GetGeneric ¶
func (p *ParseManager) GetGeneric() Parser
func (*ParseManager) GetRegistered ¶
func (p *ParseManager) GetRegistered(parsingType string) (Parser, error)
func (*ParseManager) GetWorkers ¶
func (p *ParseManager) GetWorkers() Workers
func (*ParseManager) PushWorker ¶
func (p *ParseManager) PushWorker(parser Parser, update string) error
func (*ParseManager) Register ¶
func (p *ParseManager) Register(parser Parser) error
func (*ParseManager) SetGeneric ¶
func (p *ParseManager) SetGeneric(parser Parser)
type RootfsParser ¶
type RootfsParser struct { W io.Writer // output stream the update gets written to ScriptDir string // output directory for scripts DataFunc DataHandlerFunc // custom update data handler // contains filtered or unexported fields }
RootfsParser handles updates of type 'image-rootfs'. The parser can be initialized setting `W` (io.Writer the update data gets written to), or `DataFunc` (user provided callback that handlers the update data stream).
func (*RootfsParser) ArchiveData ¶
func (rp *RootfsParser) ArchiveData(tw *tar.Writer, src, dst string) error
func (*RootfsParser) ArchiveHeader ¶
func (*RootfsParser) Copy ¶
func (rp *RootfsParser) Copy() Parser
func (*RootfsParser) GetDeviceType ¶
func (rp *RootfsParser) GetDeviceType() string
func (*RootfsParser) GetImageID ¶
func (rp *RootfsParser) GetImageID() string
func (*RootfsParser) GetMetadata ¶
func (rp *RootfsParser) GetMetadata() *metadata.AllMetadata
func (*RootfsParser) GetUpdateFiles ¶
func (rp *RootfsParser) GetUpdateFiles() map[string]UpdateFile
func (*RootfsParser) GetUpdateType ¶
func (rp *RootfsParser) GetUpdateType() *metadata.UpdateType
func (*RootfsParser) ParseData ¶
func (rp *RootfsParser) ParseData(r io.Reader) error
data files are stored in tar.gz format
func (*RootfsParser) ParseHeader ¶
type UpdateFile ¶
Click to show internal directories.
Click to hide internal directories.