Context

class Context : GeneratedMessage, ContextOrBuilder
Defines the notion of a *Render Context* for server-side pages in Gust. This protocol message is filled out with data
as configured by the developer (from `application.yml` and the active controller, as applicable) and provided as an
injected value to all server-side render operations.

When preparing context in Gust, adding a static script or stylesheet is done through `Context`. Setting page metadata
like the title, keywords, and manifest - also all done through `Context`. This of course has the added benefit of
being completely serializable, repeatable, and so on (i.e. all the benefits Protobuf brings).

Major context modules include:
- *Metadata*: Page-level metadata.
- *OpenGraph*: Properties for OG tags.
- *Twitter*: Properties for Twitter cards.
- *AppManifest*: Information to link or derive a web application manifest.
- *Styles*: Stylesheets and inline head-injected styles ("lifted styles").
- *Scripts*: Scripts to include, and inline head-injected logic ("lifted JS").
Protobuf type elide.page.Context

Types

Link copied to clipboard
class AppManifest : GeneratedMessage, Context.AppManifestOrBuilder
Specifies details about an application manifest, which should be or is linked to a given web
page, that is being rendered by the render engine.
Protobuf type elide.page.Context.AppManifest
Link copied to clipboard
interface AppManifestOrBuilder : MessageOrBuilder
Link copied to clipboard
class Builder : GeneratedMessage.Builder<BuilderT> , ContextOrBuilder
Defines the notion of a *Render Context* for server-side pages in Gust. This protocol message is filled out with data
as configured by the developer (from `application.yml` and the active controller, as applicable) and provided as an
injected value to all server-side render operations.

When preparing context in Gust, adding a static script or stylesheet is done through `Context`. Setting page metadata
like the title, keywords, and manifest - also all done through `Context`. This of course has the added benefit of
being completely serializable, repeatable, and so on (i.e. all the benefits Protobuf brings).

Major context modules include:
- *Metadata*: Page-level metadata.
- *OpenGraph*: Properties for OG tags.
- *Twitter*: Properties for Twitter cards.
- *AppManifest*: Information to link or derive a web application manifest.
- *Styles*: Stylesheets and inline head-injected styles ("lifted styles").
- *Scripts*: Scripts to include, and inline head-injected logic ("lifted JS").
Protobuf type elide.page.Context
Link copied to clipboard
enum ClientHint : ProtocolMessageEnum
Specifies supported client hints.
Protobuf enum elide.page.Context.ClientHint
Link copied to clipboard
class ClientHints : GeneratedMessage, Context.ClientHintsOrBuilder
Specifies client hints context information.
Protobuf type elide.page.Context.ClientHints
Link copied to clipboard
interface ClientHintsOrBuilder : MessageOrBuilder
Link copied to clipboard
enum ConnectionHint : ProtocolMessageEnum
Specifies estimated connection speed levels.
Protobuf enum elide.page.Context.ConnectionHint
Link copied to clipboard
class Cookie : GeneratedMessage, Context.CookieOrBuilder
HTTP cookies to set on the response, including the content of each cookie, name, and any flags.
Protobuf type elide.page.Context.Cookie
Link copied to clipboard
interface CookieOrBuilder : MessageOrBuilder
Link copied to clipboard
enum CrossOriginResourcePolicy : ProtocolMessageEnum
Enumerates `Cross-Origin-Resource-Policy` settings.
Protobuf enum elide.page.Context.CrossOriginResourcePolicy
Link copied to clipboard
class DynamicETag : GeneratedMessage, Context.DynamicETagOrBuilder
Defines the notion of a dynamically-served-page `ETag`, which is calculated either from weak parameters (the date/
time it was served and a simple hash of the request) or strong parameters (full hash of the response).
Protobuf type elide.page.Context.DynamicETag
Link copied to clipboard
interface DynamicETagOrBuilder : MessageOrBuilder
Link copied to clipboard
class Fonts : GeneratedMessage, Context.FontsOrBuilder
Specifies information about sets of fonts to include in the page via CSS declarations, or imports/link
references. Fonts are considered part of the stylesheet set of a page.
Protobuf type elide.page.Context.Fonts
Link copied to clipboard
interface FontsOrBuilder : MessageOrBuilder
Link copied to clipboard
enum FramingPolicy : ProtocolMessageEnum
Specifies a policy to apply via the `X-Frame-Options` header.
Protobuf enum elide.page.Context.FramingPolicy
Link copied to clipboard
class Metadata : GeneratedMessage, Context.MetadataOrBuilder
Defines the structure of well-known page-level metadata, including the page title, description,
keywords, and so on.
Protobuf type elide.page.Context.Metadata
Link copied to clipboard
interface MetadataOrBuilder : MessageOrBuilder
Link copied to clipboard
class PageLink : GeneratedMessage, Context.PageLinkOrBuilder
Specifies information about an asset or foreign page linked to this page. Stylesheets, favorite icons ("favicons"),
HTTP preloading, and other features are implemented via HTML links.
Protobuf type elide.page.Context.PageLink
Link copied to clipboard
interface PageLinkOrBuilder : MessageOrBuilder
Link copied to clipboard
class RDFPrefix : GeneratedMessage, Context.RDFPrefixOrBuilder
Specifies an individual RDF prefix block to include in the HTML tag.
Protobuf type elide.page.Context.RDFPrefix
Link copied to clipboard
interface RDFPrefixOrBuilder : MessageOrBuilder
Link copied to clipboard
enum ReferrerPolicy : ProtocolMessageEnum
Specifies a policy to apply via the `Referrer-Policy` header. All policy docs come from MDN.
Protobuf enum elide.page.Context.ReferrerPolicy
Link copied to clipboard
Specifies custom response headers to affix to the request.
Protobuf type elide.page.Context.ResponseHeader
Link copied to clipboard
interface ResponseHeaderOrBuilder : MessageOrBuilder
Link copied to clipboard
class Scripts : GeneratedMessage, Context.ScriptsOrBuilder
Specifies information about JavaScript code that should be included with a given page render. Scripts
included in this manner may be emitted inline or by reference (URI).
Protobuf type elide.page.Context.Scripts
Link copied to clipboard
interface ScriptsOrBuilder : MessageOrBuilder
Link copied to clipboard
class Styles : GeneratedMessage, Context.StylesOrBuilder
Defines page-level style settings (CSS), including external stylesheets, lifted CSS that should
be rendered in the <head>, and more.
Protobuf type elide.page.Context.Styles
Link copied to clipboard
interface StylesOrBuilder : MessageOrBuilder

Properties

Link copied to clipboard
Link copied to clipboard
val ContextOrBuilder.cdnPrefixOrNull: TrustedResourceUrlProto?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline fun Context.copy(block: ContextKt.Dsl.() -> Unit): Context
Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
Link copied to clipboard
open fun getAllFields(): Map<Descriptors.FieldDescriptor, Any>
Link copied to clipboard
open fun getCdnPrefix(): TrustedResourceUrlProto
Specifies the selected CDN prefix to use.
.webutil.html.types.TrustedResourceUrlProto cdn_prefix = 17;
Link copied to clipboard
open fun getCdnPrefixOrBuilder(): TrustedResourceUrlProtoOrBuilder
Specifies the selected CDN prefix to use.
.webutil.html.types.TrustedResourceUrlProto cdn_prefix = 17;
Link copied to clipboard
Specifies that the `nosniff` flag should be included in a `X-Content-Type-Options` header.
bool content_type_nosniff = 16;
Link copied to clipboard
open fun getCookie(index: Int): Context.Cookie
Specifies HTTP cookies to affix to the response associated with this context.
repeated .elide.page.Context.Cookie cookie = 8;
Link copied to clipboard
open fun getCookieCount(): Int
Specifies HTTP cookies to affix to the response associated with this context.
repeated .elide.page.Context.Cookie cookie = 8;
Link copied to clipboard
Specifies HTTP cookies to affix to the response associated with this context.
repeated .elide.page.Context.Cookie cookie = 8;
Link copied to clipboard
Specifies HTTP cookies to affix to the response associated with this context.
repeated .elide.page.Context.Cookie cookie = 8;
Link copied to clipboard
Specifies HTTP cookies to affix to the response associated with this context.
repeated .elide.page.Context.Cookie cookie = 8;
Link copied to clipboard
Link copied to clipboard
abstract fun getDefaultInstanceForType(): MessageLite
Link copied to clipboard
fun getDescriptor(): Descriptors.Descriptor
Link copied to clipboard
open fun getDescriptorForType(): Descriptors.Descriptor
Link copied to clipboard
open fun getDnsPrefetch(index: Int): String
Specifies hostnames to pre-load DNS records for.
repeated string dns_prefetch = 18;
Link copied to clipboard
open fun getDnsPrefetchBytes(index: Int): ByteString
Specifies hostnames to pre-load DNS records for.
repeated string dns_prefetch = 18;
Link copied to clipboard
Specifies hostnames to pre-load DNS records for.
repeated string dns_prefetch = 18;
Link copied to clipboard
open fun getDnsPrefetchList(): ProtocolStringList
Specifies hostnames to pre-load DNS records for.
repeated string dns_prefetch = 18;
Link copied to clipboard
`ETag` information to enclose with this page, when rendered.
.elide.page.Context.DynamicETag etag = 6;
Link copied to clipboard
`ETag` information to enclose with this page, when rendered.
.elide.page.Context.DynamicETag etag = 6;
Link copied to clipboard
open fun getFeaturePolicy(index: Int): String
Specifies feature policies for this HTTP cycle.
repeated string feature_policy = 13;
Link copied to clipboard
open fun getFeaturePolicyBytes(index: Int): ByteString
Specifies feature policies for this HTTP cycle.
repeated string feature_policy = 13;
Link copied to clipboard
Specifies feature policies for this HTTP cycle.
repeated string feature_policy = 13;
Link copied to clipboard
open fun getFeaturePolicyList(): ProtocolStringList
Specifies feature policies for this HTTP cycle.
repeated string feature_policy = 13;
Link copied to clipboard
open fun getField(field: Descriptors.FieldDescriptor): Any
Link copied to clipboard
Fonts to include/load on the page.
.elide.page.Context.Fonts fonts = 3;
Link copied to clipboard
Fonts to include/load on the page.
.elide.page.Context.Fonts fonts = 3;
Link copied to clipboard
Specifies options when a page is referenced as a frame.
.elide.page.Context.FramingPolicy framing_policy = 15;
Link copied to clipboard
Specifies options when a page is referenced as a frame.
.elide.page.Context.FramingPolicy framing_policy = 15;
Link copied to clipboard
Custom headers to affix to the response associated with this context.
repeated .elide.page.Context.ResponseHeader header = 9;
Link copied to clipboard
open fun getHeaderCount(): Int
Custom headers to affix to the response associated with this context.
repeated .elide.page.Context.ResponseHeader header = 9;
Link copied to clipboard
Custom headers to affix to the response associated with this context.
repeated .elide.page.Context.ResponseHeader header = 9;
Link copied to clipboard
Custom headers to affix to the response associated with this context.
repeated .elide.page.Context.ResponseHeader header = 9;
Link copied to clipboard
Custom headers to affix to the response associated with this context.
repeated .elide.page.Context.ResponseHeader header = 9;
Link copied to clipboard
Information provided by client-indicated hints.
.elide.page.Context.ClientHints hints = 12;
Link copied to clipboard
Information provided by client-indicated hints.
.elide.page.Context.ClientHints hints = 12;
Link copied to clipboard
open fun getLanguage(): String
Language to send in the `Content-Language` header.
string language = 11;
Link copied to clipboard
open fun getLanguageBytes(): ByteString
Language to send in the `Content-Language` header.
string language = 11;
Link copied to clipboard
Application manifest for a given page or web app.
.elide.page.Context.AppManifest manifest = 5;
Link copied to clipboard
Application manifest for a given page or web app.
.elide.page.Context.AppManifest manifest = 5;
Link copied to clipboard
Metadata definitions for this web page render context.
.elide.page.Context.Metadata meta = 1;
Link copied to clipboard
Metadata definitions for this web page render context.
.elide.page.Context.Metadata meta = 1;
Link copied to clipboard
open fun getOneofFieldDescriptor(oneof: Descriptors.OneofDescriptor): Descriptors.FieldDescriptor
Link copied to clipboard
abstract fun getParserForType(): Parser<out Message>
abstract fun getParserForType(): Parser<out MessageLite>
open fun getParserForType(): Parser<Context>
Link copied to clipboard
open fun getPreconnect(index: Int): String
Specifies hostnames to pre-connect to.
repeated string preconnect = 19;
Link copied to clipboard
open fun getPreconnectBytes(index: Int): ByteString
Specifies hostnames to pre-connect to.
repeated string preconnect = 19;
Link copied to clipboard
Specifies hostnames to pre-connect to.
repeated string preconnect = 19;
Link copied to clipboard
open fun getPreconnectList(): ProtocolStringList
Specifies hostnames to pre-connect to.
repeated string preconnect = 19;
Link copied to clipboard
Specifies the `Referrer-Policy` to apply to this HTTP cycle, as applicable.
.elide.page.Context.ReferrerPolicy referrer_policy = 21;
Link copied to clipboard
Specifies the `Referrer-Policy` to apply to this HTTP cycle, as applicable.
.elide.page.Context.ReferrerPolicy referrer_policy = 21;
Link copied to clipboard
open fun getRepeatedField(field: Descriptors.FieldDescriptor, index: Int): Any
Link copied to clipboard
open fun getRepeatedFieldCount(field: Descriptors.FieldDescriptor): Int
Link copied to clipboard
Scripts to include on the page or lift into the head.
.elide.page.Context.Scripts scripts = 4;
Link copied to clipboard
Scripts to include on the page or lift into the head.
.elide.page.Context.Scripts scripts = 4;
Link copied to clipboard
Link copied to clipboard
CSS definitions and lifted code for the page head.
.elide.page.Context.Styles styles = 2;
Link copied to clipboard
CSS definitions and lifted code for the page head.
.elide.page.Context.Styles styles = 2;
Link copied to clipboard
open fun getUnknownFields(): UnknownFieldSet
Link copied to clipboard
open fun getVary(index: Int): String
Set of HTTP request headers which cause this response to vary.
repeated string vary = 10;
Link copied to clipboard
open fun getVaryBytes(index: Int): ByteString
Set of HTTP request headers which cause this response to vary.
repeated string vary = 10;
Link copied to clipboard
open fun getVaryCount(): Int
Set of HTTP request headers which cause this response to vary.
repeated string vary = 10;
Link copied to clipboard
open fun getVaryList(): ProtocolStringList
Set of HTTP request headers which cause this response to vary.
repeated string vary = 10;
Link copied to clipboard
Old-style Cross-Site Scripting vulnerability protection policy.
string xss_protection = 20;
Link copied to clipboard
open fun getXssProtectionBytes(): ByteString
Old-style Cross-Site Scripting vulnerability protection policy.
string xss_protection = 20;
Link copied to clipboard
open fun hasCdnPrefix(): Boolean
Specifies the selected CDN prefix to use.
.webutil.html.types.TrustedResourceUrlProto cdn_prefix = 17;
Link copied to clipboard
open fun hasEtag(): Boolean
`ETag` information to enclose with this page, when rendered.
.elide.page.Context.DynamicETag etag = 6;
Link copied to clipboard
open fun hasField(field: Descriptors.FieldDescriptor): Boolean
Link copied to clipboard
open fun hasFonts(): Boolean
Fonts to include/load on the page.
.elide.page.Context.Fonts fonts = 3;
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun hasHints(): Boolean
Information provided by client-indicated hints.
.elide.page.Context.ClientHints hints = 12;
Link copied to clipboard
open fun hasManifest(): Boolean
Application manifest for a given page or web app.
.elide.page.Context.AppManifest manifest = 5;
Link copied to clipboard
open fun hasMeta(): Boolean
Metadata definitions for this web page render context.
.elide.page.Context.Metadata meta = 1;
Link copied to clipboard
open fun hasOneof(oneof: Descriptors.OneofDescriptor): Boolean
Link copied to clipboard
open fun hasScripts(): Boolean
Scripts to include on the page or lift into the head.
.elide.page.Context.Scripts scripts = 4;
Link copied to clipboard
open fun hasStyles(): Boolean
CSS definitions and lifted code for the page head.
.elide.page.Context.Styles styles = 2;
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun <ContainingT : Message?, T> newFileScopedGeneratedExtension(singularType: Class<out Any>, defaultInstance: Message): GeneratedMessage.GeneratedExtension<ContainingT, T>
Link copied to clipboard
open fun <ContainingT : Message?, T> newMessageScopedGeneratedExtension(scope: Message, descriptorIndex: Int, singularType: Class<out Any>, defaultInstance: Message): GeneratedMessage.GeneratedExtension<ContainingT, T>
Link copied to clipboard
open fun parseDelimitedFrom(input: InputStream, extensionRegistry: ExtensionRegistryLite): Context
Link copied to clipboard
open fun parseFrom(data: Array<Byte>): Context
open fun parseFrom(data: ByteString): Context
open fun parseFrom(input: CodedInputStream): Context
open fun parseFrom(input: InputStream): Context
open fun parseFrom(data: ByteBuffer): Context
open fun parseFrom(data: Array<Byte>, extensionRegistry: ExtensionRegistryLite): Context
open fun parseFrom(data: ByteString, extensionRegistry: ExtensionRegistryLite): Context
open fun parseFrom(input: CodedInputStream, extensionRegistry: ExtensionRegistryLite): Context
open fun parseFrom(input: InputStream, extensionRegistry: ExtensionRegistryLite): Context
open fun parseFrom(data: ByteBuffer, extensionRegistry: ExtensionRegistryLite): Context
Link copied to clipboard
open fun parser(): Parser<Context>
Link copied to clipboard
Link copied to clipboard
open fun toByteArray(): Array<Byte>
Link copied to clipboard
open fun toByteString(): ByteString
Link copied to clipboard
Link copied to clipboard
open fun writeDelimitedTo(output: OutputStream)
Link copied to clipboard
open fun writeTo(output: CodedOutputStream)