pub struct Cms { /* private fields */ }Expand description
A small content store with an editor.
Implementations§
Source§impl Cms
impl Cms
Sourcepub fn new() -> Self
pub fn new() -> Self
A CMS that, until Cms::collections or Cms::any_collection says
otherwise, allows no collection — so a misconfigured venture refuses
content rather than accepting anything.
Sourcepub fn collections(
self,
collections: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn collections( self, collections: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Exactly these collection slugs may hold content.
Sourcepub fn any_collection(self) -> Self
pub fn any_collection(self) -> Self
Accept any collection slug.
Trait Implementations§
Source§impl Module for Cms
impl Module for Cms
Source§fn personal_data(&self) -> &'static [PersonalDataSet]
fn personal_data(&self) -> &'static [PersonalDataSet]
Both tables hold the venture’s own published content and neither has a column that names a person (issue #265).
Declared rather than left silent: an export that skipped these tables
and an export that had never heard of them look identical from the
outside, and only one of them is a decision. The reason below is what
GET /v1/privacy/manifest publishes, so it is written for the person
reading it.
A row is filed under a collection and a slug. What an editor types
into body or data is the venture’s to govern — this module cannot
know that an article mentions somebody — but the shape of the table
offers erasure nothing to match on, and inventing a subject column
here would be inventing a promise. That gap is the one issue #266
describes for Outbox, and it is the same gap for the same reason.
Source§fn requires(&self) -> &'static [Port]
fn requires(&self) -> &'static [Port]
Source§fn tables(&self) -> &'static [&'static str]
fn tables(&self) -> &'static [&'static str]
Source§fn migrations(&self) -> Migrations
fn migrations(&self) -> Migrations
Source§fn validate_config(&self, cfg: &dyn Config) -> Result<(), ConfigError>
fn validate_config(&self, cfg: &dyn Config) -> Result<(), ConfigError>
Source§fn router(&self, ctx: ModuleContext) -> Router
fn router(&self, ctx: ModuleContext) -> Router
/v1/<name>.Source§fn surface(&self) -> Surface
fn surface(&self) -> Surface
Action::input::<Body>()), so the
declaration cannot drift from the route. Harness::build
validates it; GET /__surface serves the composition. Default:
nothing, and a module that declares nothing renders nothing.Source§fn harness_api(&self) -> u32
fn harness_api(&self) -> u32
Harness::build.Source§fn depends_on(&self) -> &'static [&'static str]
fn depends_on(&self) -> &'static [&'static str]
Source§fn emits(&self) -> &'static [&'static str]
fn emits(&self) -> &'static [&'static str]
"<module>.<event>"), listed by
/__health.Source§fn public_writes(&self) -> bool
fn public_writes(&self) -> bool
Source§fn public_write_policy(&self) -> RoutePolicy
fn public_write_policy(&self) -> RoutePolicy
RoutePolicy on
(issue #143). Read moreSource§fn signature_verification(&self) -> SignatureVerification
fn signature_verification(&self) -> SignatureVerification
RoutePolicy::Signature
deliveries (issue #533): how a webhook handler checks a machine
signature before acting. Read moreSource§fn max_body_bytes(&self, _cfg: &dyn Config) -> usize
fn max_body_bytes(&self, _cfg: &dyn Config) -> usize
Source§fn self_check(&self) -> Vec<String>
fn self_check(&self) -> Vec<String>
Source§fn well_known(&self) -> Option<Router>
fn well_known(&self) -> Option<Router>
/.well-known, for
spec-mandated discovery documents (OIDC openid-configuration,
jwks.json) that must live outside /v1 (issue #46). Paths are
relative to the prefix: register /jwks.json, not
/.well-known/jwks.json. Read more