conf

package
v0.0.0-...-6d50a0b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Port on which the server is running
	Port int `yaml:"port"`
	// Public base URL of the API
	PublicBaseUrl string `yaml:"public_base_url" split_words:"true"`
	// Data Source Name of the pubstore database
	DSN string `yaml:"dsn"`
	// OAuth seed
	OAuthSeed string `yaml:"oauth_seed" envconfig:"OAUTH_SEED"`
	// Path to static files and views
	RootDir string `yaml:"root_dir" envconfig:"ROOT_DIR"`
	// Path to resources, especially cover images
	Resources string `yaml:"resources"`
	// Page size used in the REST API and Web interface
	PageSize int `yaml:"page_size"  split_words:"true"`
	// LCP print and copy limits set in LCP licenses generated from the associated LCP Server
	PrintLimit int `yaml:"print_limit"  split_words:"true"`
	CopyLimit  int `yaml:"copy_limit"  split_words:"true"`
	// Basic Auth credentials used by the LCP encryption tool to notify Pubstore of a new encrypted publication
	UserName string `yaml:"username"`
	Password string `yaml:"password"`
	// LCP Server
	LCPServer LCPServerAccess `yaml:"lcp_server"`
}

Pubstore configuration split_words true is how envconfig maps e.g. the PUBFRONT_PUBLIC_BASE_URL environment variable to PublicBaseUrl

func Init

func Init(configFile string) (Config, error)

type LCPServerAccess

type LCPServerAccess struct {
	Url      string `yaml:"url"`
	Version  string `yaml:"version"`
	UserName string `yaml:"username"`
	Password string `yaml:"password"`
}

LCP Server access parameters

Jump to

Keyboard shortcuts

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