extractor

package
v0.0.0-...-206d60e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Name             string
	Version          string `yaml:"product_version"`
	StemcellCriteria struct {
		OS                   string `yaml:"os"`
		Version              string `yaml:"version"`
		PatchSecurityUpdates bool   `yaml:"enable_patch_security_updates"`
	} `yaml:"stemcell_criteria"`
	Raw []byte
}

type MetadataExtractor

type MetadataExtractor struct {
	// contains filtered or unexported fields
}

func NewMetadataExtractor

func NewMetadataExtractor(options ...Option) *MetadataExtractor

func (*MetadataExtractor) Do

func (me *MetadataExtractor) Do(request *http.Request) (*http.Response, error)

func (*MetadataExtractor) ExtractFromFile

func (me *MetadataExtractor) ExtractFromFile(productPath string) (*Metadata, error)

func (*MetadataExtractor) ExtractFromURL

func (me *MetadataExtractor) ExtractFromURL(productURL string) (*Metadata, error)

func (*MetadataExtractor) Get

func (me *MetadataExtractor) Get(url string) (*http.Response, error)

func (*MetadataExtractor) Head

func (me *MetadataExtractor) Head(url string) (*http.Response, error)

type Option

type Option func(*MetadataExtractor)

func WithHTTPClient

func WithHTTPClient(client httpClient) Option

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL