View Source Smee.Publish (Smee v0.4.1)
Publish exports streams or lists of entity structs into various formats.
At present the output formats are SAML XML (individual and collections) and simple index text files. Formats can be output as binary strings or streamed. Streamed output can be useful for web services, allowing gradual downloads generated on-the-fly with no need to render a very large document in advance.
Options:
valid_until
- pass a DateTime to set the validUntil attribute for the entity metadata. Alternatively, an integer can be passed to request a validity of n days, or "default" and "auto" to use the default validity period.
Summary
Functions
Returns the estimated size of a streamed index file without generating it in advance.
Returns the estimated size of a streamed SAML metadata XML file without generating it in advance.
Returns an index text document
Returns a streamed index file, a plain text list of entity IDs.
Returns a SAML metadata XML file, potentially very large.
Returns a streamed SAML metadata XML file
Functions
@spec estimate_index_size(entities :: Enumerable.t(), options :: keyword()) :: integer()
Returns the estimated size of a streamed index file without generating it in advance.
@spec estimate_xml_size(entities :: Enumerable.t(), options :: keyword()) :: integer()
Returns the estimated size of a streamed SAML metadata XML file without generating it in advance.
@spec index(entities :: Enumerable.t(), options :: keyword()) :: binary()
Returns an index text document
@spec index_stream(entities :: Enumerable.t(), options :: keyword()) :: Enumerable.t()
Returns a streamed index file, a plain text list of entity IDs.
@spec xml(entities :: Enumerable.t(), options :: keyword()) :: binary()
Returns a SAML metadata XML file, potentially very large.
@spec xml_stream(entities :: Smee.Entity.t() | Enumerable.t(), options :: keyword()) :: Enumerable.t()
Returns a streamed SAML metadata XML file