changeset 698: | 96958d3eb5b0 |
parent: | ea4f008ad13f |
author: | Richard Westhaver <ellis@rwest.io> |
date: | Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: | -rw-r--r-- |
description: | fixes |
240
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
1 | (in-package :packy/core) |
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
2 | |
439
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
3 | (defclass package-id (id) |
240
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
4 | ((id :initform (make-array 16 :element-type 'octet) :initarg :id :type (octet-vector 16) :accessor id))) |
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
5 | |
439
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
6 | (defmethod make-id ((kind (eql :package))) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
7 | (make-instance 'package-id)) |
240
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
8 | |
439
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
9 | (defmethod make-random-id ((kind (eql :package))) |
240
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
10 | (let ((l)) |
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
11 | (dotimes (i 16) (push (random 255) l)) |
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
12 | (let ((v (make-array 16 :element-type 'octet |
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
13 | :initial-contents l))) |
439
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
14 | (make-instance 'package-id :id v)))) |
240
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
15 | |
439
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
16 | (defmethod print-object ((self package-id) stream) |
240
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
17 | (print-unreadable-object (self stream) |
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
18 | (format stream "~A" (octet-vector-to-hex-string (id self))))) |
a3b65a8138ac
html,http init, uuid, db stuff
Richard Westhaver <ellis@rwest.io>
parents:
162
diff
changeset
|
19 | |
439
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
20 | (defclass abstract-package () ()) |
162 | 21 | |
439
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
22 | (defgeneric pack (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
23 | (defgeneric unpack (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
24 | (defgeneric install-package (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
25 | (defgeneric uninstall-package (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
26 | (defgeneric update-package (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
27 | (defgeneric push-package (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
28 | (defgeneric pull-package (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
29 | (defgeneric query-package (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
30 | (defgeneric sync-package (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
31 | (defgeneric build-package (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
32 | (defgeneric prepare-package (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
33 | (defgeneric check-package (self &key &allow-other-keys)) |
ea4f008ad13f
packy work, added json-trailing-whitespace-p variable for json readers
Richard Westhaver <ellis@rwest.io>
parents:
240
diff
changeset
|
34 | (defgeneric package-version (self &key &allow-other-keys)) |