provclient

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchMetadata added in v0.2.0

func FetchMetadata(addr string) (map[string][]byte, error)

FetchMetadata fetches the metadata (manifests and descriptions) from a remote server

func LoadMetadata added in v0.5.0

func LoadMetadata(dir string) (metadata [][]byte, err error)

LoadMetadata loads the metadata (manifests and descriptions) from the file system

func ProvisionMetadata added in v0.5.0

func ProvisionMetadata(c *Config) ([][]byte, error)

ProvisionMetadata either loads the metadata from the file system or fetches it from a remote HTTP server. Optionally, it can store the fetched metadata on the filesystem

func StoreMetadata added in v0.5.0

func StoreMetadata(data map[string][]byte, localPath string) error

StoreMetadata stores the metadata locally into the specified file system folder

Types

type Config added in v0.5.0

type Config struct {
	FetchMetadata bool
	StoreMetadata bool
	LocalPath     string
	RemoteAddr    string
}

type Content

type Content struct {
	XMLName xml.Name `xml:"a"`
	Type    string   `xml:"href,attr"`
	Name    string   `xml:",chardata"`
}

Content is a struct for parsing HTML content

type Pre

type Pre struct {
	XMLName xml.Name  `xml:"pre"`
	Content []Content `xml:"a"`
}

Pre is a struct for parsing HTML content

Jump to

Keyboard shortcuts

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