Differences From
Artifact [54fed43947]:
226 226 rtdby: uint64 -- 0 if not rt
227 227 rtact: uint64 -- 0 if not rt, id of rt action otherwise
228 228 isreply: bool
229 229 source: &m.source
230 230
231 231 -- save :: bool -> {} (defined in acl.t due to dep. hell)
232 232 }
233 +
234 +struct m.artifact {
235 + rid: uint64
236 + owner: uint64
237 + desc: str
238 + folder: str
239 + mime: str
240 + url: str
241 +}
233 242
234 243 m.user_conf_funcs = function(be,n,ty,rty,rty2)
235 244 rty = rty or ty
236 245 local gt
237 246 if not rty2 -- what the fuck?
238 247 then gt = {&m.source, uint64, rawstring} -> rty;
239 248 else gt = {&m.source, uint64, rawstring} -> {rty, rty2};
................................................................................
447 456 -- artifact: bytea
448 457 -- mime: pstring
449 458 artifact_quicksearch: {&m.source, lib.mem.ptr(uint8)} -> {uint64,bool}
450 459 -- checks whether a hash is already in the database without uploading
451 460 -- the entire file to the database server
452 461 -- hash: bytea
453 462 --> artifact id (0 if null), suppressed?
454 - artifact_expropriate: {&m.source, uint64, uint64, lib.mem.ptr(int8)} -> {}
463 + artifact_expropriate: {&m.source, uint64, uint64, lib.str.t, lib.str.t} -> {}
455 464 -- claims an existing artifact for the user's own collection
456 465 -- uid: uint64
457 466 -- artifact id: uint64
458 467 -- description: pstring
468 + -- folder: pstring
469 + artifact_claim_alter: {&m.source, uint64, uint64, lib.str.t, lib.str.t} -> {}
470 + -- edits an existing claim to an artifact
471 + -- ibid
459 472 artifact_disclaim: {&m.source, uint64, uint64} -> {}
460 473 -- a user disclaims their ownership stake in an artifact, removing it from
461 474 -- the database entirely if they were the only owner, and removing their
462 475 -- description of it either way
463 476 -- uid: uint64
464 477 -- artifact id: uint64
465 478 artifact_excise: {&m.source, uint64, bool} -> {}
................................................................................
466 479 -- (admin action) forcibly excise an artifact from the database, deleting
467 480 -- all links to it and removing it from users' collections. if "blacklist,"
468 481 -- the artifact will be banned and attempts to upload it in the future
469 482 -- will fail, triggering a report. mainly intended for dealing with spam,
470 483 -- IP violations, That Which Shall Not Be Named, and various other infohazards.
471 484 -- artifact id: uint64
472 485 -- blacklist: bool
486 + artifact_enum_uid: {&m.source, uint64, lib.str.t} -> lib.mem.lstptr(m.artifact)
487 + -- produces a list of artifacts claimed by a user, optionally
488 + -- restricted by folder (empty string = new only)
489 + artifact_fetch: {&m.source, uint64, uint64} -> lib.mem.ptr(m.artifact)
490 + -- fetch a user's view of an artifact
491 + -- uid: uint64
492 + -- rid: uint64
493 + artifact_load: {&m.source, uint64} -> {lib.mem.ptr(uint8),lib.str.t}
494 + -- load the body of an artifact into memory (also returns mime)
473 495
474 496 nkvd_report_issue: {&m.source, &m.kompromat} -> {}
475 497 -- an incidence of Badthink has been detected. report it immediately
476 498 -- to the Supreme Soviet
477 499 nkvd_reports_enum: {&m.source, &m.kompromat} -> lib.mem.ptr(m.kompromat)
478 500 -- search through the Archives
479 501 -- proto: kompromat (null for all records, or a prototype describing the records to return)