config

package
v0.0.0-...-7365a31 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(cfg ServerCfg)

Set sets the server configuration.

Types

type Denotations

type Denotations struct {
	LogFile              string `json:"logfile"`
	ResultsFolder        string `json:"resultsfolder"`
	ResultsFile          string `json:"resultsfile"`
	ResultsBadge         string `json:"resultsbadge"`
	ValidationConfigFile string `json:"valcfgfile"`
}

Denotations provide any frequently used file names or other denotations e.g. validation result files, badge or result folder names.

type Directories

type Directories struct {
	Temp   string `json:"temp"`
	Result string `json:"result"`
	Log    string `json:"log"`
	Tokens string `json:"tokens"`
}

Directories used by the server for temporary and long term storage.

type Executables

type Executables struct {
	BIDS string `json:"bids"`
	NIX  string `json:"nix"`
	ODML string `json:"odml"`
}

Executables used by the server.

type GINAddresses

type GINAddresses struct {
	WebURL string `json:"weburl"`
	GitURL string `json:"giturl"`
}

GINAddresses specify http and ssh access to the companion GIN service.

type ServerCfg

type ServerCfg struct {
	Settings     Settings     `json:"settings"`
	Exec         Executables  `json:"executables"`
	Dir          Directories  `json:"directories"`
	Label        Denotations  `json:"denotations"`
	GINAddresses GINAddresses `json:"ginaddresses"`
}

ServerCfg holds the config used to setup the gin validation server and the paths to all required executables, temporary and permanent folders.

func Read

func Read() ServerCfg

Read returns the default server configuration.

type Settings

type Settings struct {
	RootURL     string   `json:"rooturl"`
	Port        string   `json:"port"`
	LogSize     int      `json:"logsize"`
	GINUser     string   `json:"ginuser"`
	GINPassword string   `json:"ginpassword"`
	ClientID    string   `json:"clientid"`
	HookSecret  string   `json:"hooksecret"`
	CookieName  string   `json:"cookiename"`
	Validators  []string `json:"validators"`
}

Settings provide the default server settings.

Jump to

Keyboard shortcuts

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