customization

package module
v0.0.0-...-d3b86da Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package customization contains the structure for the customization file to configure the OTS web- and command-line interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Customize

type Customize struct {
	AppIcon              string `json:"appIcon,omitempty" yaml:"appIcon"`
	AppIconDark          string `json:"appIconDark,omitempty" yaml:"appIconDark"`
	AppTitle             string `json:"appTitle,omitempty" yaml:"appTitle"`
	DisableAppTitle      bool   `json:"disableAppTitle,omitempty" yaml:"disableAppTitle"`
	DisablePoweredBy     bool   `json:"disablePoweredBy,omitempty" yaml:"disablePoweredBy"`
	DisableQRSupport     bool   `json:"disableQRSupport,omitempty" yaml:"disableQRSupport"`
	DisableThemeSwitcher bool   `json:"disableThemeSwitcher,omitempty" yaml:"disableThemeSwitcher"`

	DisableExpiryOverride bool    `json:"disableExpiryOverride,omitempty" yaml:"disableExpiryOverride"`
	ExpiryChoices         []int64 `json:"expiryChoices,omitempty" yaml:"expiryChoices"`

	AcceptedFileTypes      string `json:"acceptedFileTypes" yaml:"acceptedFileTypes"`
	DisableFileAttachment  bool   `json:"disableFileAttachment" yaml:"disableFileAttachment"`
	MaxAttachmentSizeTotal int64  `json:"maxAttachmentSizeTotal" yaml:"maxAttachmentSizeTotal"`

	MaxSecretSize         int64    `json:"-" yaml:"maxSecretSize"`
	MetricsAllowedSubnets []string `json:"-" yaml:"metricsAllowedSubnets"`
	OverlayFSPath         string   `json:"-" yaml:"overlayFSPath"`
	UseFormalLanguage     bool     `json:"-" yaml:"useFormalLanguage"`

	FooterLinks []FooterLink `json:"footerLinks,omitempty" yaml:"footerLinks"`
}

Customize holds the structure of the customization file

func Load

func Load(filename string) (cust Customize, err error)

Load retrieves the Customization file from filesystem

func (Customize) ToJSON

func (c Customize) ToJSON() (string, error)

ToJSON is a templating helper which returns the customization serialized as JSON in a string

type FooterLink struct {
	Name string `json:"name" yaml:"name"`
	URL  string `json:"url" yaml:"url"`
}

Jump to

Keyboard shortcuts

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