branding

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package branding resolves the organisation branding SofCat UI shows: policy registry values first, then the config.yaml `branding:` block, field by field. Every field is validated here, in the SYSTEM service, so the UI only ever receives plain text, an http(s) URL, a #rrggbb colour and a sniffed image. A field that fails validation is dropped; it never fails the request.

Index

Constants

View Source
const (
	MaxLogoBytes = 512 << 10
)

Caps on the admin-supplied values. Text is counted in runes.

Variables

This section is empty.

Functions

This section is empty.

Types

type Branding

type Branding struct {
	Title      string `json:"title"`
	Tagline    string `json:"tagline"`
	HelpURL    string `json:"helpUrl"`
	HelpLabel  string `json:"helpLabel"`
	Accent     string `json:"accent"`
	LogoMime   string `json:"logoMime"`
	LogoBase64 string `json:"logoBase64"`
}

Branding is the GetBranding payload. Unset or rejected fields are empty.

func Resolve

func Resolve(cfg config.Branding) Branding

Resolve reads the policy registry values, merges them over cfg and returns the validated branding. The logo file is read on every call, so a replaced logo shows up without a service restart.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL