config

package
v0.0.0-...-99fd3eb Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(configFileName string)

func SetPublicUrls

func SetPublicUrls() error

Types

type Auth

type Auth struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type Certificate

type Certificate struct {
	Cert       string `yaml:"cert"`
	PrivateKey string `yaml:"private_key"`
}

type Configuration

type Configuration struct {
	Certificate    Certificate        `yaml:"certificate"`
	Storage        Storage            `yaml:"storage"`
	License        License            `yaml:"license"`
	LcpServer      ServerInfo         `yaml:"lcp"`
	LsdServer      LsdServerInfo      `yaml:"lsd"`
	FrontendServer FrontendServerInfo `yaml:"frontend"`
	LsdNotifyAuth  Auth               `yaml:"lsd_notify_auth"`
	LcpUpdateAuth  Auth               `yaml:"lcp_update_auth"`
	CMSAccessAuth  Auth               `yaml:"cms_access_auth"`
	LicenseStatus  LicenseStatus      `yaml:"license_status"`
	Localization   Localization       `yaml:"localization"`
	ComplianceMode bool               `yaml:"compliance_mode"`
	GoofyMode      bool               `yaml:"goofy_mode"`
	Profile        string             `yaml:"profile,omitempty"`
}
var Config Configuration

Config is a global variable which contains the server configuration

type FileSystem

type FileSystem struct {
	Directory string `yaml:"directory"`
	URL       string `yaml:"url,omitempty"`
}

type FrontendServerInfo

type FrontendServerInfo struct {
	ServerInfo          `yaml:",inline"`
	ProviderUri         string `yaml:"provider_uri"`
	RightPrint          int32  `yaml:"right_print"`
	RightCopy           int32  `yaml:"right_copy"`
	MasterRepository    string `yaml:"master_repository"`
	EncryptedRepository string `yaml:"encrypted_repository"`
}

type License

type License struct {
	Links map[string]string `yaml:"links"`
}

type LicenseStatus

type LicenseStatus struct {
	Renew        bool   `yaml:"renew"`
	Register     bool   `yaml:"register"`
	Return       bool   `yaml:"return"`
	RentingDays  int    `yaml:"renting_days"`
	RenewDays    int    `yaml:"renew_days"`
	RenewPageUrl string `yaml:"renew_page_url,omitempty"`
}

type Localization

type Localization struct {
	Languages       []string `yaml:"languages"`
	Folder          string   `yaml:"folder"`
	DefaultLanguage string   `yaml:"default_language"`
}

type LsdServerInfo

type LsdServerInfo struct {
	ServerInfo     `yaml:",inline"`
	LicenseLinkUrl string `yaml:"license_link_url,omitempty"`
	UserDataUrl    string `yaml:"user_data_url,omitempty"`
	LogDirectory   string `yaml:"log_directory"`
}

type ServerInfo

type ServerInfo struct {
	Host          string `yaml:"host,omitempty"`
	Port          int    `yaml:"port,omitempty"`
	AuthFile      string `yaml:"auth_file"`
	ReadOnly      bool   `yaml:"readonly,omitempty"`
	PublicBaseUrl string `yaml:"public_base_url,omitempty"`
	Database      string `yaml:"database,omitempty"`
	Directory     string `yaml:"directory,omitempty"`
}

type Storage

type Storage struct {
	FileSystem FileSystem `yaml:"filesystem"`
	AccessId   string     `yaml:"access_id"`
	DisableSSL bool       `yaml:"disable_ssl"`
	PathStyle  bool       `yaml:"path_style"`
	Mode       string
	Secret     string
	Endpoint   string
	Bucket     string
	Region     string
	Token      string
}

Jump to

Keyboard shortcuts

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