def

package
v1.0.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2017 License: GPL-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTmpDir

func MakeTmpDir(tmpDir string) (string, error)

MakeTmpDir creates a temporary folder

func NewRandomTmpDir

func NewRandomTmpDir(parentComponents ...string) (path string, id string, err error)

NewRandomTmpDir creates a temporary folder with a unique name

Types

type AdminConfig

type AdminConfig struct {
	SuperAdminEmail string
	ContactLink     string
}

InfoConfig exported

type B2AccessConfig

type B2AccessConfig struct {
	BaseURL     string
	RedirectURL string
}

B2AccessConfig exported

type B2DropConfig

type B2DropConfig struct {
	BaseURL string
}

B2DropConfig exported

type Configuration

type Configuration struct {
	Docker DockerConfig
	// Default Docker limits
	Limits LimitConfig

	// Default GEF internal timeouts
	Timeouts TimeoutConfig

	Pier        PierConfig
	Server      ServerConfig
	EventSystem EventSystemConfig

	// TmpDir is the directory to keep session files in
	// If the path is relative, it will be used as a subfolder of the system temporary directory
	TmpDir string
}

Configuration keeps the configs for the entire application

func ReadConfigFile

func ReadConfigFile(configFilepath string) (Configuration, error)

ReadConfigFile reads a configuration file

type DockerConfig

type DockerConfig struct {
	Description string
	Endpoint    string
	TLSVerify   bool
	CertPath    string
	KeyPath     string
	CAPath      string
}

DockerConfig configuration for building docker clients

func (DockerConfig) String

func (c DockerConfig) String() string

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error is the main error type

func Err

func Err(cause error, format string, a ...interface{}) Error

Err fn creates a new Error from an optional existing cause

func (Error) Error

func (e Error) Error() string

type EventSystemConfig

type EventSystemConfig struct {
	Address string
}

EventSystemConfig keeps the configuration options needed to make an EventSystem

type LimitConfig

type LimitConfig struct {
	CPUShares  int64 `json:"CPUShares"`
	CPUPeriod  int64 `json:"CPUPeriod"`
	CPUQuota   int64 `json:"CPUQuota"`
	Memory     int64 `json:"memory"`
	MemorySwap int64 `json:"memorySwap"`
}

LimitConfig keeps the configuration options to limit resources used by a docker container while its execution

type PermissionError

type PermissionError struct {
	// contains filtered or unexported fields
}

PermissionError is returned when the currently loggedin user is denied an action

func PermissionErr

func PermissionErr(format string, a ...interface{}) PermissionError

PermissionErr creates a new PermissionError

func (PermissionError) Error

func (e PermissionError) Error() string

type PierConfig

type PierConfig struct {
	InternalServicesFolder string
}

PierConfig configuration for pier

type ServerConfig

type ServerConfig struct {
	Address                string
	ReadTimeoutSecs        int
	WriteTimeoutSecs       int
	TLSCertificateFilePath string
	TLSKeyFilePath         string
	B2Access               B2AccessConfig
	B2Drop                 B2DropConfig
	Administration         AdminConfig
}

ServerConfig keeps the configuration options needed to make a Server

type TimeoutConfig

type TimeoutConfig struct {
	DataStaging      float64 `json:"dataStaging"`
	VolumeInspection float64 `json:"volumeInspection"`
	FileDownload     float64 `json:"fileDownload"`
	Preparation      float64 `json:"preparation"`
	JobExecution     float64 `json:"jobExecution"`
	CheckInterval    float64 `json:"checkInterval"` // how often (in seconds) we need to check a job's execution time
}

TimeoutConfig specifies timeout parameters (in seconds)

Jump to

Keyboard shortcuts

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