Documentation
¶
Index ¶
- Constants
- func CompactInfo(name string, packages []Package) []byte
- func CompactNames(packages []Package) []byte
- func CompactVersions(packages []Package) []byte
- func CompareVersions(a, b string) int
- func DerivedPath(p string) bool
- func Filename(p Package) string
- func Files(ctx context.Context, st store.Store, c repo.Config) ([]types.Item, error)
- func GzipMarshal(v any) ([]byte, error)
- func InfoMD5(body []byte) string
- func Marshal(v any) []byte
- func ParseCompactVersions(b []byte) (map[string]CompactVersionEntry, error)
- func QuickSpec(p Package, at time.Time) ([]byte, error)
- func Serves(t repo.PackageType) bool
- func Specs(packages []Package, latest, prerelease bool) ([]byte, error)
- func ValidName(name string) bool
- func ValidPath(path string) bool
- func ValidVersion(version string) bool
- func VersionToken(p Package) string
- type CompactVersionEntry
- type Dependency
- type Handler
- func (Handler) Admit(ctx context.Context, env format.Env, c repo.Config, w format.Write) (format.Write, error)
- func (Handler) Classify(_ repo.Config, p string) format.Class
- func (Handler) Deployed(ctx context.Context, env format.Env, c repo.Config, it types.Item) error
- func (Handler) Inspect(ctx context.Context, env format.Env, _ repo.Config, w format.Write) (any, error)
- func (Handler) Reindex(ctx context.Context, env format.Env, c repo.Config) error
- type Package
Constants ¶
View Source
const (
MaxGemBytes = 256 << 20
)
View Source
const MaxIndexBytes = 32 << 20
Variables ¶
This section is empty.
Functions ¶
func CompactInfo ¶
func CompactNames ¶
func CompactVersions ¶
func CompareVersions ¶
CompareVersions compares the numeric and prerelease parts used by RubyGems. A release ranks above a prerelease at the same numeric version.
func DerivedPath ¶
func GzipMarshal ¶
func ParseCompactVersions ¶
func ParseCompactVersions(b []byte) (map[string]CompactVersionEntry, error)
ParseCompactVersions accepts only bounded, complete index rows. The MD5 is checked against each info file before virtual metadata can disclose it.
func Serves ¶
func Serves(t repo.PackageType) bool
func ValidVersion ¶
func VersionToken ¶
Types ¶
type CompactVersionEntry ¶
CompactVersionEntry binds the listed versions to their compact info body.
type Dependency ¶
type Package ¶
type Package struct {
Name string `json:"name"`
Version string `json:"version"`
Platform string `json:"platform"`
Summary string `json:"summary"`
Description string `json:"description"`
Homepage string `json:"homepage"`
Authors []string `json:"authors"`
Licenses []string `json:"licenses"`
Ruby string `json:"ruby"`
RubyGems string `json:"rubygems"`
Dependencies []Dependency `json:"dependencies"`
Path string `json:"path"`
SHA256 string `json:"sha256"`
}
Click to show internal directories.
Click to hide internal directories.