config

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SecretStore manages secrets
	SecretStore *secret.Store
	// AdminserverClient is a client for adminserver
	AdminserverClient client.Client
	// GlobalProjectMgr is initialized based on the deploy mode
	GlobalProjectMgr promgr.ProjectManager

	// AdmiralClient is initialized only under integration deploy mode
	// and can be passed to project manager as a parameter
	AdmiralClient *http.Client
	// TokenReader is used in integration mode to read token
	TokenReader admiral.TokenReader
	// GlobalJobserviceClient is a global client for jobservice
	GlobalJobserviceClient jobservice_client.Client
)

Functions

func AdmiralEndpoint

func AdmiralEndpoint() string

AdmiralEndpoint returns the URL of admiral, if Harbor is not deployed with admiral it should return an empty string.

func AuthMode

func AuthMode() (string, error)

AuthMode ...

func ClairDB

func ClairDB() (*models.PostGreSQL, error)

ClairDB return Clair db info

func ClairEndpoint

func ClairEndpoint() string

ClairEndpoint returns the end point of clair instance, by default it's the one deployed within Harbor.

func Database

func Database() (*models.Database, error)

Database returns database settings

func Email

func Email() (*models.Email, error)

Email returns email server settings

func ExtEndpoint

func ExtEndpoint() (string, error)

ExtEndpoint returns the external URL of Harbor: protocol://host:port

func ExtURL

func ExtURL() (string, error)

ExtURL returns the external URL: host:port

func GetSystemCfg

func GetSystemCfg() (map[string]interface{}, error)

GetSystemCfg returns the system configurations

func Init

func Init() error

Init configurations

func InitByURL

func InitByURL(adminServerURL string) error

InitByURL Init configurations with given url

func InitialAdminPassword

func InitialAdminPassword() (string, error)

InitialAdminPassword returns the initial password for administrator

func InternalJobServiceURL

func InternalJobServiceURL() string

InternalJobServiceURL returns jobservice URL for internal communication between Harbor containers

func InternalNotaryEndpoint

func InternalNotaryEndpoint() string

InternalNotaryEndpoint returns notary server endpoint for internal communication between Harbor containers This is currently a conventional value and can be unaccessible when Harbor is not deployed with Notary.

func InternalTokenServiceEndpoint

func InternalTokenServiceEndpoint() string

InternalTokenServiceEndpoint returns token service endpoint for internal communication between Harbor containers

func JobserviceSecret

func JobserviceSecret() string

JobserviceSecret returns a secret to mark Jobservice when communicate with other component TODO replace it with method of SecretStore

func LDAPConf

func LDAPConf() (*models.LdapConf, error)

LDAPConf returns the setting of ldap server

func Load

func Load() error

Load configurations

func OnlyAdminCreateProject

func OnlyAdminCreateProject() (bool, error)

OnlyAdminCreateProject returns the flag to restrict that only sys admin can create project

func RegistryURL

func RegistryURL() (string, error)

RegistryURL ...

func Reset

func Reset() error

Reset configurations

func ScanAllPolicy

func ScanAllPolicy() models.ScanAllPolicy

ScanAllPolicy returns the policy which controls the scan all.

func SecretKey

func SecretKey() (string, error)

SecretKey returns the secret key to encrypt the password of target

func SelfRegistration

func SelfRegistration() (bool, error)

SelfRegistration returns the enablement of self registration

func TokenExpiration

func TokenExpiration() (int, error)

TokenExpiration returns the token expiration time (in minute)

func UAASettings

func UAASettings() (*models.UAASettings, error)

UAASettings returns the UAASettings to access UAA service.

func UISecret

func UISecret() string

UISecret returns a secret to mark UI when communicate with other component

func Upload

func Upload(cfg map[string]interface{}) error

Upload uploads all system configurations to admin server

func WithAdmiral

func WithAdmiral() bool

WithAdmiral returns a bool to indicate if Harbor's deployed with admiral.

func WithClair

func WithClair() bool

WithClair returns a bool value to indicate if Harbor's deployed with Clair

func WithNotary

func WithNotary() bool

WithNotary returns a bool value to indicate if Harbor's deployed with Notary

Types

This section is empty.

Jump to

Keyboard shortcuts

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