Documentation
¶
Overview ¶
Package pub validates Dart pub archives and maintains their native index.
Index ¶
- Constants
- Variables
- func ParsePath(p string) (name, version string, ok bool)
- func Path(name, version string) string
- func Serves(t repo.PackageType) bool
- func ValidName(name string) bool
- func ValidVersion(version string) bool
- type Handler
- func (Handler) Admit(ctx context.Context, env format.Env, c repo.Config, w format.Write) (format.Write, error)
- func (Handler) Deleted(context.Context, format.Env, repo.Config, []types.Item) error
- func (Handler) Deleting(context.Context, format.Env, repo.Config, types.Item) error
- func (Handler) Deployed(ctx context.Context, env format.Env, c repo.Config, it types.Item) error
- func (Handler) GuardWrite(ctx context.Context, env format.Env, c repo.Config, w format.Write) 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 Metadata
Constants ¶
View Source
const ( MaxArchiveBytes = 64 << 20 MaxUnpackedBytes = 128 << 20 MaxManifestBytes = 1 << 20 MaxFiles = 4096 )
View Source
const ( PropName = "pub.name" PropVersion = "pub.version" PropSHA256 = "pub.sha256" )
Variables ¶
View Source
var (
ErrArchive = errors.New("pub: invalid dart pub archive")
)
Functions ¶
func Serves ¶
func Serves(t repo.PackageType) bool
func ValidVersion ¶
Types ¶
type Handler ¶
func (Handler) GuardWrite ¶
func (Handler) GuardWrite( ctx context.Context, env format.Env, c repo.Config, w format.Write, ) error
A published version is immutable through both pub publish and the generic item route. Deletes and restores still use their normal lifecycle paths.
Click to show internal directories.
Click to hide internal directories.