setting

package
v0.0.0-...-930013b Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIVERSION_V1 = iota
	APIVERSION_V2
	APIVERSION_ACI
)

Variables

View Source
var (
	//Global
	AppName       string
	Usage         string
	Version       string
	Author        string
	Email         string
	RunMode       string
	ListenMode    string
	HttpsCertFile string
	HttpsKeyFile  string
	LogPath       string
	DBURI         string
	DBPasswd      string
	DBDB          int64
	//Dockyard
	BackendDriver       string
	ImagePath           string
	Domains             string
	RegistryVersion     string
	DistributionVersion string
	Standalone          string
	OssSwitch           string
)
View Source
var (
	Endpoint        string
	Bucket          string
	AccessKeyID     string
	AccessKeysecret string

	//upyun unique
	User   string
	Passwd string

	//qcloud unique
	AccessID string

	//googlecloud unique
	Projectid      string
	Scope          string
	PrivateKeyFile string
	Clientemail    string
)

object storage driver config parameters TBD: It should be considered to refine the universal config parameters

View Source
var (
	//Path of the database. Default:  '/db'
	ClairDBPath string
	//Remove all the data in DB after stop the clair service. Default: false
	ClairKeepDB bool
	//Log level of the clair lib. Default: 'info'
	//All values: ['critical, error, warning, notice, info, debug, trace']
	ClairLogLevel string
	//Update CVE date in every '%dh%dm%ds'. Default: '1h0m0s'
	ClairUpdateDuration string
	//Return CVEs with minimal priority to Dockyard. Default: 'Low'
	//All values: ['Unknown, Negligible, Low, Medium, High, Critical, Defcon1']
	ClairVulnPriority string
)

Clair service config parameters

View Source
var (
	APIPort      int
	APIHttpsPort int
	PartSizeMB   int
)

OSS backend driver parameters

Functions

func GetConfFromJSON

func GetConfFromJSON(path string) error

func SetConfig

func SetConfig(path string) error

Types

type AuthorDesc

type AuthorDesc map[string]interface{}

type AuthorsCtx

type AuthorsCtx map[string]AuthorDesc

func (AuthorsCtx) Name

func (auth AuthorsCtx) Name() (name string)

type Desc

type Desc struct {
	Notifications NotificationsCtx `json:"notifications,omitempty"`
	Authors       AuthorsCtx       `json:"auth,omitempty"`
}
var JSONConfCtx Desc

type EndpointDesc

type EndpointDesc struct {
	Name      string        `json:"name"`
	URL       string        `json:"url"`
	Headers   http.Header   `json:"headers"`
	Timeout   time.Duration `json:"timeout"`
	Threshold int           `json:"threshold"`
	Backoff   time.Duration `json:"backoff"`
	EventDB   string        `json:"eventdb"`
	Disabled  bool          `json:"disabled"`
}

type NotificationsCtx

type NotificationsCtx struct {
	Name      string         `json:"name,omitempty"`
	Endpoints []EndpointDesc `json:"endpoints,omitempty"`
}

Jump to

Keyboard shortcuts

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