Documentation
¶
Overview ¶
Package luarocks indexes root-level rockspecs and rocks and derives the LuaRocks manifest consumed by the native client.
Index ¶
- Constants
- func Serves(t repo.PackageType) bool
- func ValidateContent(ctx context.Context, rc io.ReadSeeker, size int64, id Identity) error
- func VersionID(ctx context.Context, st store.Store, c repo.Config, id Identity) (int64, error)
- 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, path string) format.Class
- func (Handler) Deleted(ctx context.Context, env format.Env, c repo.Config, removed []types.Item) error
- func (Handler) Deleting(ctx context.Context, env format.Env, c repo.Config, it types.Item) error
- 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) Owed(c repo.Config, cached bool, path string) []format.WorkRef
- func (Handler) Reindex(ctx context.Context, env format.Env, c repo.Config) error
- func (Handler) Resolve(ctx context.Context, env format.Env, c repo.Config, d format.Download) (string, error)
- func (Handler) Sidecars(_ repo.Config, p string) []string
- func (Handler) Work(ctx context.Context, env format.Env, work types.WorkItem) error
- func (Handler) WorkKinds() []string
- type Identity
Constants ¶
const ( KindManifest = "luarocks.manifest" ManifestPath = "manifest" PropName = "luarocks.name" // [I] exact 7.161.32 property spelling: #216 PropVersion = "luarocks.version" PropRevision = "luarocks.revision" PropArch = "luarocks.arch" )
Variables ¶
This section is empty.
Functions ¶
func Serves ¶
func Serves(t repo.PackageType) bool
func ValidateContent ¶
ValidateContent checks complete rock bytes before a remote cache publishes them. The same admission rules protect local uploads and remote downloads.
Types ¶
type Handler ¶
type Identity ¶
type Identity struct{ Name, Version, Revision, Arch string }
Identity is the package coordinate read from a flat LuaRocks filename.
func Parse ¶
Parse accepts only the root layout the native client searches. The final -revision is part of LuaRocks' version, not a separate indexed version.
func VersionFile ¶
func VersionFile( ctx context.Context, st store.Store, c repo.Config, wanted int64, ) (Identity, error)
VersionFile resolves the numeric version id returned to the native upload client. It returns the rockspec's flat filename and refuses a version that has since been deleted. Scanning packages avoids ephemeral server state.