Documentation ¶
Overview ¶
Package appleopensource implements an opensource.apple.com resource management.
Index ¶
- Constants
- Variables
- func Fetch(ctx context.Context, dst string, uris ...string) (err error)
- func IndexProject(typ ResourceType) ([]byte, error)
- func IndexRelease(platform Platform, version string) ([]byte, error)
- func IndexVersion(project string, typ ResourceType) ([]byte, error)
- func ListVersions(buf []byte) ([]string, error)
- type Platform
- type Product
- type ResourceType
Constants ¶
const ComingSoon = "(coming soon!)"
ComingSoon is a Apple's comming soon message.
Variables ¶
var KnownRelease = [...][]string{ MacOS: releaseMacOS, Xcode: releaseXcode, IOS: releaseIOS, Server: releaseServer, }
KnownRelease known release versions.
Functions ¶
func IndexProject ¶
func IndexProject(typ ResourceType) ([]byte, error)
IndexProject return the index of opensource.apple.com/<typ> HTML DOM tree.
func IndexRelease ¶
IndexRelease return the index of projects of the specified platforms release version.
func IndexVersion ¶
func IndexVersion(project string, typ ResourceType) ([]byte, error)
IndexVersion return the index of all versions of the project HTML DOM tree.
func ListVersions ¶
ListVersions parses the project version index page HTML DOM, and return the available versions of the project.
Types ¶
type Product ¶
type Product struct { Name string Version string Updated bool // for release only ComingSoon bool // for release only }
Product represents a Apple open source project.
func ListProject ¶
ListProject parses the project list HTML DOM, and return the project list.
func ListRelease ¶
ListRelease parses the release page HTML DOM, and return the Project slice.
type ResourceType ¶
type ResourceType int
ResourceType represents a resource type.
const ( // TarballsResource is a tarballs resource type. TarballsResource ResourceType = 1 << iota // SourceResource is a source resource type. SourceResource )
func (ResourceType) String ¶
func (r ResourceType) String() string
String implements a fmt.Stringer interface.