Documentation ¶
Index ¶
- func ExtractFirmwareFromTarball(ctx context.Context, tarball []byte) (*uefi.UEFI, string, error)
- func ExtractFirmwareImage(ctx context.Context, originalFilename string, data []byte) (*uefi.UEFI, string, error)
- func ParseFirmwareImage(ctx context.Context, data []byte) *uefi.UEFI
- type ErrGetMeta
- type ErrHTTPGet
- type ErrHTTPGetBody
- type ErrHTTPMakeRequest
- type ErrNoFirmwareFoundInTarGZ
- type ErrParseURL
- type ErrUnknownFirmwareImage
- type FirmwareRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractFirmwareFromTarball ¶
ExtractFirmwareFromTarball returns a firmware image extracted from tarball.
Types ¶
type ErrGetMeta ¶
type ErrGetMeta struct {
Err error
}
ErrGetMeta implements "error", for the description see Error.
func (ErrGetMeta) Error ¶
func (err ErrGetMeta) Error() string
func (ErrGetMeta) Unwrap ¶
func (err ErrGetMeta) Unwrap() error
type ErrHTTPGet ¶
ErrHTTPGet implements "error", for the description see Error.
func (ErrHTTPGet) Error ¶
func (err ErrHTTPGet) Error() string
func (ErrHTTPGet) Unwrap ¶
func (err ErrHTTPGet) Unwrap() error
type ErrHTTPGetBody ¶
ErrHTTPGetBody implements "error", for the description see Error.
func (ErrHTTPGetBody) Error ¶
func (err ErrHTTPGetBody) Error() string
func (ErrHTTPGetBody) Unwrap ¶
func (err ErrHTTPGetBody) Unwrap() error
type ErrHTTPMakeRequest ¶
ErrHTTPMakeRequest implements "error", for the description see Error.
func (ErrHTTPMakeRequest) Error ¶
func (err ErrHTTPMakeRequest) Error() string
func (ErrHTTPMakeRequest) Unwrap ¶
func (err ErrHTTPMakeRequest) Unwrap() error
type ErrNoFirmwareFoundInTarGZ ¶
type ErrNoFirmwareFoundInTarGZ struct { }
ErrNoFirmwareFoundInTarGZ implements "error", for the description see Error.
func (ErrNoFirmwareFoundInTarGZ) Error ¶
func (err ErrNoFirmwareFoundInTarGZ) Error() string
type ErrParseURL ¶
ErrParseURL implements "error", for the description see Error.
func (ErrParseURL) Error ¶
func (err ErrParseURL) Error() string
func (ErrParseURL) Unwrap ¶
func (err ErrParseURL) Unwrap() error
type ErrUnknownFirmwareImage ¶
type ErrUnknownFirmwareImage struct { }
ErrUnknownFirmwareImage represents situation when firmware image has unknown format
func (ErrUnknownFirmwareImage) Error ¶
func (err ErrUnknownFirmwareImage) Error() string
type FirmwareRepo ¶
type FirmwareRepo struct {
// contains filtered or unexported fields
}
FirmwareRepo is responsible for providing an original image of a specified firmware version. Currently it is implemented through ugly logic of downloading a tarball and looking for image from it.
TODO: reimplement this logic to download images from Everstore/BlobStorage.
func New ¶
func New( baseURL string, callerName string, ) *FirmwareRepo
New returns an instance of FirmwareRepo.
func (*FirmwareRepo) DownloadByVersion ¶
func (storage *FirmwareRepo) DownloadByVersion(ctx context.Context, filename string) ([]byte, string, error)
DownloadByVersion downloads a raw firmware file by its name
func (*FirmwareRepo) FetchFirmwareByURL ¶
func (fwRepo *FirmwareRepo) FetchFirmwareByURL( ctx context.Context, url string, ) (imageBytes []byte, filename string, err error)
FetchFirmwareByURL returns a firmware image by URL.