Documentation
¶
Overview ¶
Package kindsroute serves the site's public content model: the part of kinds.Config clients render content and entity kinds with. Domain policy, restrictions and token claims stay on the server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContentModel ¶
type ContentModel struct {
Languages []string `json:"languages"`
Tiers []string `json:"tiers"`
Kinds map[string]kinds.Kind `json:"kinds"`
GroupKinds map[string]kinds.GroupKind `json:"entity_kinds"`
// Signals: the site records signals and exposures now. Without, clients
// send none and read the model again later: a configured signal plane
// that is down comes back (history, similar and recommendations answer
// unavailable meanwhile), one never configured answers not_configured.
Signals bool `json:"signals"`
// Avatars is people's avatar preset (Stable): an avatar's URLs are its
// names at {base}/v1/{namespace}/{kind}/{user id}/public/, and its
// uploads target {kind, user id}. Absent: people have none.
Avatars *media.PresetRule `json:"avatars,omitempty"`
}
ContentModel is the public part of kinds.Config.
func Public ¶
func Public(c kinds.Config, signals bool, avatars *media.PresetRule) ContentModel
Public is c's public part, with empty lists and maps rather than null and each kind's locked view spelled out.
Click to show internal directories.
Click to hide internal directories.