Beispiel #1
0
func delete(args []string) error {
	for _, arg := range args {
		br, ok := blob.Parse(arg)
		if !ok {
			return fmt.Errorf("Error parsing blobref %q", arg)
		}
		bb := schema.NewDeleteClaim(br)
		put, err := getUploader().UploadAndSignBlob(bb)
		if err := handleResult(bb.Type(), put, err); err != nil {
			return err
		}
	}
	return nil
}
Beispiel #2
0
func (id *IndexDeps) Delete(target blob.Ref) blob.Ref {
	m := schema.NewDeleteClaim(target)
	m.SetClaimDate(id.advanceTime())
	return id.uploadAndSign(m)
}