theme

package
v1.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 17 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateKV

func UpdateKV(fsys afero.Fs, p string, values KV) error

UpdateKV updates the key-value map at the given path with the given values.

func WriteKV

func WriteKV(fsys afero.Fs, p string, kv KV) error

WriteKV writes the given key-value map to the file system.

Types

type KV

type KV map[string]any

KV is a generic key-value map.

func LoadKV

func LoadKV(fsys afero.Fs, p string) (KV, error)

LoadKV loads a key-value map from the given file system.

func MergeKV

func MergeKV(values ...KV) (KV, error)

MergeKV merges the given key-value maps.

func PatchKV

func PatchKV(v map[string]interface{}, values KV) KV

PatchKV injects the given values into to v.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service defines the http service.

func NewService

func NewService(options ServiceOptions) (Service, error)

NewService initializes a new Service.

func (Service) Get

func (s Service) Get(w http.ResponseWriter, r *http.Request)

Get renders the theme, the theme is a merge of the default theme, the base theme, and the branding theme.

func (Service) LogoReset

func (s Service) LogoReset(w http.ResponseWriter, r *http.Request)

LogoReset implements the endpoint to reset the instance logo. The config will be changed back to use the embedded logo asset.

func (Service) LogoUpload

func (s Service) LogoUpload(w http.ResponseWriter, r *http.Request)

LogoUpload implements the endpoint to upload a custom logo for the OpenCloud instance.

type ServiceOptions

type ServiceOptions struct {
	// contains filtered or unexported fields
}

ServiceOptions defines the options to configure the Service.

func (ServiceOptions) WithGatewaySelector

WithGatewaySelector sets the gateway selector.

func (ServiceOptions) WithThemeFS

func (o ServiceOptions) WithThemeFS(fSys *fsx.FallbackFS) ServiceOptions

WithThemeFS sets the theme filesystem.

Jump to

Keyboard shortcuts

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