package config import ( "reflect" ) // JSCKServerFrontend is the frontend section's configuration key. const JSCKServerFrontend string = "frontend" // JSCServerFrontend configures how the server serves the frontend. Nothing // reads it yet. Dir serves the frontend from disk instead of the embedded // build; empty means the embedded build. ImmutablePrefix is where Vite emits // content-hashed files, and IndexCacheControl the Cache-Control of HTML and // other files without a hash; empty means none. type JSCServerFrontend struct { Dir string `cfg:"dir"` ImmutablePrefix string `cfg:"immutable_prefix"` IndexCacheControl string `cfg:"index_cache_control"` } // ---------- Section methods (see Section) ---------- // Map implements Section. func (c JSCServerFrontend) Map() map[string]any { return mapOf(c) } // Flatten implements Section. func (c JSCServerFrontend) Flatten() map[string]any { return flattenOf(JSCKServerFrontend, c) } // TypeOf implements Section. func (c JSCServerFrontend) TypeOf(key string) (reflect.Kind, error) { return typeOf(c, key) } // ValueOf implements Section. func (c JSCServerFrontend) ValueOf(key string) (any, error) { return valueOf(c, key) } // SetValue implements Section. func (c *JSCServerFrontend) SetValue(key string, value any) error { return setValue(c, key, value) }