config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountEditLink struct {
	Href string `` /* 197-byte string literal not displayed */
}

AccountEditLink are the AccountEditLink options

type App

type App struct {
	Disabled bool           `yaml:"disabled"`
	Config   map[string]any `yaml:"config"`
}

App defines the individual app configuration.

type Application

type Application struct {
	Icon   string            `json:"icon,omitempty" yaml:"icon"`
	Target string            `json:"target,omitempty" yaml:"target"`
	Title  map[string]string `json:"title,omitempty" yaml:"title"`
	Menu   string            `json:"menu,omitempty" yaml:"menu"`
	URL    string            `json:"url,omitempty" yaml:"url"`
}

Application defines an application for the Web app switcher.

type Asset

type Asset struct {
	CorePath   string `` /* 248-byte string literal not displayed */
	ThemesPath string `` /* 271-byte string literal not displayed */
	AppsPath   string `` /* 253-byte string literal not displayed */
}

Asset defines the available asset configuration.

type CORS

type CORS struct {
	AllowedOrigins   []string `` /* 363-byte string literal not displayed */
	AllowedMethods   []string `` /* 367-byte string literal not displayed */
	AllowedHeaders   []string `` /* 369-byte string literal not displayed */
	AllowCredentials bool     `` /* 316-byte string literal not displayed */
}

CORS defines the available cors configuration.

type ConcurrentRequests

type ConcurrentRequests struct {
	ResourceBatchActions int                       `` /* 261-byte string literal not displayed */
	SSE                  int                       `` /* 195-byte string literal not displayed */
	Shares               *ConcurrentRequestsShares `json:"shares,omitempty" yaml:"shares"`
}

ConcurrentRequests are the ConcurrentRequests options

type ConcurrentRequestsShares

type ConcurrentRequestsShares struct {
	Create int `` /* 214-byte string literal not displayed */
	List   int `` /* 241-byte string literal not displayed */
}

ConcurrentRequestsShares are the Shares options inside the ConcurrentRequests options

type Config

type Config struct {
	Commons *shared.Commons `yaml:"-"` // don't use this directly as configuration for a service

	Service Service `yaml:"-"`

	Tracing *Tracing `yaml:"tracing"`
	Log     *Log     `yaml:"log"`
	Debug   Debug    `yaml:"debug"`

	HTTP HTTP `yaml:"http"`

	Asset Asset  `yaml:"asset"`
	File  string `` /* 259-byte string literal not displayed */
	Web   Web    `yaml:"web"`
	Apps  map[string]App

	TokenManager *TokenManager `yaml:"token_manager"`

	GatewayAddress string          `yaml:"gateway_addr" env:"WEB_GATEWAY_GRPC_ADDR" desc:"The bind address of the GRPC service." introductionVersion:"1.0.0"`
	Context        context.Context `yaml:"-"`
}

Config combines all available configuration parts.

type CustomScript

type CustomScript struct {
	Src   string `json:"src" yaml:"src"`
	Async bool   `json:"async,omitempty" yaml:"async"`
}

CustomScript references an additional script to be loaded into OpenCloud Web.

type CustomStyle

type CustomStyle struct {
	Href string `json:"href" yaml:"href"`
}

CustomStyle references additional css to be loaded into OpenCloud Web.

type CustomTranslation

type CustomTranslation struct {
	Url string `json:"url" yaml:"url"`
}

CustomTranslation references a json file for overwriting translations in OpenCloud Web.

type Debug

type Debug struct {
	Addr   string `` /* 168-byte string literal not displayed */
	Token  string `yaml:"token" env:"WEB_DEBUG_TOKEN" desc:"Token to secure the metrics endpoint." introductionVersion:"1.0.0"`
	Pprof  bool   `yaml:"pprof" env:"WEB_DEBUG_PPROF" desc:"Enables pprof, which can be used for profiling." introductionVersion:"1.0.0"`
	Zpages bool   `` /* 150-byte string literal not displayed */
}

Debug defines the available debug configuration.

type Editor

type Editor struct {
	AutosaveEnabled  bool `` /* 189-byte string literal not displayed */
	AutosaveInterval int  `` /* 279-byte string literal not displayed */
}

Editor are the web editor options

type Embed

type Embed struct {
	Enabled                      string `` /* 463-byte string literal not displayed */
	Target                       string `` /* 562-byte string literal not displayed */
	MessagesOrigin               string `` /* 431-byte string literal not displayed */
	DelegateAuthentication       bool   `` /* 432-byte string literal not displayed */
	DelegateAuthenticationOrigin string `` /* 405-byte string literal not displayed */
}

Embed are the Embed options

type ExternalApp

type ExternalApp struct {
	ID   string `json:"id,omitempty" yaml:"id"`
	Path string `json:"path,omitempty" yaml:"path"`
	// Config is completely dynamic, because it depends on the extension
	Config map[string]interface{} `json:"config,omitempty" yaml:"config"`
}

ExternalApp defines an external web app.

{
	"name": "hello",
	"path": "http://localhost:9105/hello.js",
	  "config": {
	    "url": "http://localhost:9105"
	  }
 }

type ExternalAppConfig

type ExternalAppConfig struct {
	URL string `json:"url,omitempty" yaml:"url"`
}

ExternalAppConfig defines an external web app configuration.

type FeedbackLink struct {
	Href        string `` /* 242-byte string literal not displayed */
	AriaLabel   string `` /* 255-byte string literal not displayed */
	Description string `` /* 368-byte string literal not displayed */
}

FeedbackLink are the feedback link options

type HTTP

type HTTP struct {
	Addr      string                `yaml:"addr" env:"WEB_HTTP_ADDR" desc:"The bind address of the HTTP service." introductionVersion:"1.0.0"`
	TLS       shared.HTTPServiceTLS `yaml:"tls"`
	Namespace string                `yaml:"-"`
	Root      string                `` /* 126-byte string literal not displayed */
	CacheTTL  int                   `yaml:"cache_ttl" env:"WEB_CACHE_TTL" desc:"Cache policy in seconds for OpenCloud Web assets." introductionVersion:"1.0.0"`
	CORS      CORS                  `yaml:"cors"`
}

HTTP defines the available http configuration.

type Log

type Log struct {
	Level  string `` /* 182-byte string literal not displayed */
	Pretty bool   `mapstructure:"pretty" env:"OC_LOG_PRETTY;WEB_LOG_PRETTY" desc:"Activates pretty log output." introductionVersion:"1.0.0"`
	Color  bool   `mapstructure:"color" env:"OC_LOG_COLOR;WEB_LOG_COLOR" desc:"Activates colorized log output." introductionVersion:"1.0.0"`
	File   string `` /* 150-byte string literal not displayed */
}

Log defines the available log configuration.

type OIDC

type OIDC struct {
	MetadataURL           string `` /* 237-byte string literal not displayed */
	Authority             string `` /* 188-byte string literal not displayed */
	ClientID              string `` /* 275-byte string literal not displayed */
	ResponseType          string `` /* 165-byte string literal not displayed */
	Scope                 string `` /* 309-byte string literal not displayed */
	PostLogoutRedirectURI string `` /* 355-byte string literal not displayed */
}

OIDC defines the available oidc configuration

type Options

type Options struct {
	OpenAppsInTab          bool                `` /* 214-byte string literal not displayed */
	AccountEditLink        *AccountEditLink    `json:"accountEditLink,omitempty" yaml:"accountEditLink"`
	DisableFeedbackLink    bool                `` /* 383-byte string literal not displayed */
	FeedbackLink           *FeedbackLink       `json:"feedbackLink,omitempty" yaml:"feedbackLink"`
	RunningOnEOS           bool                `` /* 272-byte string literal not displayed */
	CernFeatures           bool                `json:"cernFeatures,omitempty" yaml:"cernFeatures"`
	Upload                 *Upload             `json:"upload,omitempty" yaml:"upload"`
	Editor                 *Editor             `json:"editor,omitempty" yaml:"editor"`
	ContextHelpersReadMore bool                `` /* 213-byte string literal not displayed */
	LogoutURL              string              `` /* 306-byte string literal not displayed */
	LoginURL               string              `` /* 276-byte string literal not displayed */
	TokenStorageLocal      bool                `` /* 391-byte string literal not displayed */
	DisabledExtensions     []string            `` /* 429-byte string literal not displayed */
	Embed                  *Embed              `json:"embed,omitempty" yaml:"embed"`
	UserListRequiresFilter bool                `` /* 392-byte string literal not displayed */
	ConcurrentRequests     *ConcurrentRequests `json:"concurrentRequests,omitempty" yaml:"concurrentRequests"`
}

Options are the option for the web

type Service

type Service struct {
	Name string `yaml:"-"`
}

Service defines the available service configuration.

type TokenManager

type TokenManager struct {
	JWTSecret string `` /* 131-byte string literal not displayed */
}

TokenManager is the config for using the reva token manager

type Tracing

type Tracing struct {
	Enabled   bool   `yaml:"enabled" env:"OC_TRACING_ENABLED;WEB_TRACING_ENABLED" desc:"Activates tracing." introductionVersion:"1.0.0"`
	Type      string `` /* 206-byte string literal not displayed */
	Endpoint  string `` /* 132-byte string literal not displayed */
	Collector string `` /* 252-byte string literal not displayed */
}

Tracing defines the available tracing configuration.

func (Tracing) Convert

func (t Tracing) Convert() tracing.Config

Convert Tracing to the tracing package's Config struct.

type Upload

type Upload struct {
	CompanionURL string `` /* 365-byte string literal not displayed */
}

Upload are the upload options

type Web

type Web struct {
	ThemeServer string `` // used to build Theme in WebConfig
	/* 154-byte string literal not displayed */
	ThemePath string `` // used to build Theme in WebConfig
	/* 154-byte string literal not displayed */
	Config WebConfig `yaml:"config"`
}

Web defines the available web configuration.

type WebConfig

type WebConfig struct {
	Server        string              `` /* 169-byte string literal not displayed */
	Theme         string              `json:"theme,omitempty" yaml:"-"`
	OpenIDConnect OIDC                `json:"openIdConnect,omitempty" yaml:"oidc"`
	Apps          []string            `json:"apps" yaml:"apps"`
	Applications  []Application       `json:"applications,omitempty" yaml:"applications"`
	ExternalApps  []ExternalApp       `json:"external_apps,omitempty" yaml:"external_apps"`
	Options       Options             `json:"options,omitempty" yaml:"options"`
	Styles        []CustomStyle       `json:"styles,omitempty" yaml:"styles"`
	Scripts       []CustomScript      `json:"scripts,omitempty" yaml:"scripts"`
	Translations  []CustomTranslation `json:"customTranslations,omitempty" yaml:"custom_translations"`
}

WebConfig defines the available web configuration for a dynamically rendered config.json.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳