Documentation ¶
Index ¶
- Variables
- func IsValidSystemRole(role string) bool
- func IsValidTenantRole(role string) bool
- func ValidCompressionType(t string) bool
- type AuthProvider
- type AuthProviderBase
- func (p *AuthProviderBase) Assign(user *db.User, tenant, role string) bool
- func (p *AuthProviderBase) ClearAssignments()
- func (p AuthProviderBase) Configuration(private bool) AuthProviderConfig
- func (p AuthProviderBase) Debugf(m string, args ...interface{})
- func (p AuthProviderBase) Errorf(m string, args ...interface{})
- func (p AuthProviderBase) Fail(w http.ResponseWriter)
- func (p AuthProviderBase) Infof(m string, args ...interface{})
- func (p *AuthProviderBase) SaveAssignments(DB *db.DB, user *db.User) bool
- type AuthProviderConfig
- type Bearing
- type Config
- type Core
- func (c *Core) AnalyzeStorage()
- func (c *Core) ApplyFixups()
- func (c *Core) AuthenticatedUser(r *route.Request) (*db.User, error)
- func (c *Core) BearingFor(m *db.Membership) (Bearing, error)
- func (c *Core) Bind()
- func (c *Core) CanManageTenants(r *route.Request, tenant string) bool
- func (c *Core) CanSeeCredentials(r *route.Request, tenant string) bool
- func (c *Core) CanSeeGlobalCredentials(r *route.Request) bool
- func (c *Core) CheckArchiveExpiries()
- func (c *Core) CleanupLeftoverTasks()
- func (c *Core) CleanupOrphanedObjects()
- func (c *Core) ConfigureMessageBus()
- func (c *Core) ConnectToDatabase()
- func (c *Core) ConnectToVault()
- func (c *Core) CreateFailsafeUser()
- func (c *Core) CryptFile() string
- func (c *Core) DataFile(rel string) string
- func (c *Core) DeltaIncrease(filter *db.ArchiveFilter) (int64, error)
- func (c *Core) ExpireInteractiveSessions()
- func (c *Core) FabricFor(task *db.Task) (fabric.Fabric, error)
- func (c *Core) IsNotAuthenticated(r *route.Request) bool
- func (c *Core) IsNotSystemAdmin(r *route.Request) bool
- func (c *Core) IsNotSystemEngineer(r *route.Request) bool
- func (c *Core) IsNotSystemManager(r *route.Request) bool
- func (c *Core) IsNotTenantAdmin(r *route.Request, tenant string) bool
- func (c *Core) IsNotTenantEngineer(r *route.Request, tenant string) bool
- func (c *Core) IsNotTenantOperator(r *route.Request, tenant string) bool
- func (c Core) Main()
- func (c *Core) MarkIrrelevantTasks()
- func (c *Core) MaybeTerminate(err error)
- func (c *Core) PrecreateTenants()
- func (c *Core) PurgeExpiredAPISessions()
- func (c *Core) ScheduleAgentStatusCheckTasks(f *db.AgentFilter)
- func (c *Core) ScheduleBackupTasks()
- func (c *Core) SchedulePurgeTasks()
- func (c *Core) ScheduleStorageTestTasks()
- func (c *Core) StartScheduler()
- func (c *Core) TaskErrored(task *db.Task, fail string, args ...interface{})
- func (c *Core) TasksToChores()
- func (c *Core) Terminate(err error)
- func (c *Core) Unlocked() bool
- func (c *Core) WireUpAuthenticationProviders()
- type GithubAuthProvider
- func (p *GithubAuthProvider) Configure(raw map[interface{}]interface{}) error
- func (p *GithubAuthProvider) HandleRedirect(r *route.Request) *db.User
- func (p *GithubAuthProvider) Initiate(r *route.Request)
- func (p *GithubAuthProvider) ReferencedTenants() []string
- func (p *GithubAuthProvider) WireUpTo(c *Core)
- type Health
- type JobHealth
- type StorageHealth
- type UAAAuthProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version string DefaultConfig Config )
View Source
var DefaultCompressionType = "bzip2"
View Source
var Problems = map[string]string{
"legacy-shield-agent-version": "This SHIELD agent is not reporting its version, which means that it is probably a v6.x version of SHIELD. It will not be able to report back health and status information to this SHIELD Core. Similarly, plugin metadata will be unavailable for this agent, and SHIELD operators and site administrators will have to operate without it for all targets that use this agent for backup and restore operations.",
"dev-shield-agent-version": "This SHIELD agent is reporting its version as 'dev', which makes it difficult to determine its exact featureset. Dev builds of SHIELD are not recommended for production.",
}
View Source
var (
RoleTower map[string]int
)
Functions ¶
func IsValidSystemRole ¶
func IsValidTenantRole ¶
func ValidCompressionType ¶
Types ¶
type AuthProvider ¶
type AuthProviderBase ¶
type AuthProviderBase struct { Name string Identifier string Type string // contains filtered or unexported fields }
func (*AuthProviderBase) Assign ¶
func (p *AuthProviderBase) Assign(user *db.User, tenant, role string) bool
func (*AuthProviderBase) ClearAssignments ¶
func (p *AuthProviderBase) ClearAssignments()
func (AuthProviderBase) Configuration ¶
func (p AuthProviderBase) Configuration(private bool) AuthProviderConfig
func (AuthProviderBase) Debugf ¶
func (p AuthProviderBase) Debugf(m string, args ...interface{})
func (AuthProviderBase) Errorf ¶
func (p AuthProviderBase) Errorf(m string, args ...interface{})
func (AuthProviderBase) Fail ¶
func (p AuthProviderBase) Fail(w http.ResponseWriter)
func (AuthProviderBase) Infof ¶
func (p AuthProviderBase) Infof(m string, args ...interface{})
func (*AuthProviderBase) SaveAssignments ¶
type AuthProviderConfig ¶
type Bearing ¶
type Bearing struct { Tenant *db.Tenant `json:"tenant"` Archives []*db.Archive `json:"archives"` Jobs []*db.Job `json:"jobs"` Targets []*db.Target `json:"targets"` Stores []*db.Store `json:"stores"` Agents []*db.Agent `json:"agents"` Role string `json:"role"` Grants struct { Admin bool `json:"admin"` Engineer bool `json:"engineer"` Operator bool `json:"operator"` } `json:"grants"` }
type Config ¶
type Config struct { Debug bool `yaml:"debug"` DataDir string `yaml:"data-dir"` WebRoot string `yaml:"web-root"` PluginPaths []string `yaml:"plugin_paths"` Scheduler struct { FastLoop int `yaml:"fast-loop"` SlowLoop int `yaml:"slow-loop"` Threads int `yaml:"threads"` Timeout int `yaml:"timeout"` } `yaml:"scheduler"` API struct { Bind string `yaml:"bind"` PProf string `yaml:"pprof"` Session struct { ClearOnBoot bool `yaml:"clear-on-boot"` Timeout int `yaml:"timeout"` } `yaml:"session"` Failsafe struct { Username string `yaml:"username"` Password string `yaml:"password"` } `yaml:"failsafe"` Env string `yaml:"env"` Color string `yaml:"color"` MOTD string `yaml:"motd"` } `yaml:"api"` Limit struct { Retention struct { Min int `yaml:"min"` Max int `yaml:"max"` } `yaml:"retention"` } `yaml:"limit"` Auth []struct { Name string `yaml:"name"` Identifier string `yaml:"identifier"` Backend string `yaml:"backend"` Properties map[interface{}]interface{} `yaml:"properties"` } `yaml:"auth"` Fabrics []struct { Name string `yaml:"name"` Delay int `yaml:"delay"` SSHKey string `yaml:"ssh-key"` // contains filtered or unexported fields } `yaml:"fabrics"` Vault struct { Address string `yaml:"address"` CACert string `yaml:"ca"` // contains filtered or unexported fields } `yaml:"vault"` Cipher string `yaml:"cipher"` Bootstrapper string `yaml:"bootstrapper"` }
type Core ¶
type Core struct { Config Config // contains filtered or unexported fields }
func (*Core) AnalyzeStorage ¶
func (c *Core) AnalyzeStorage()
func (*Core) ApplyFixups ¶
func (c *Core) ApplyFixups()
func (*Core) AuthenticatedUser ¶
func (*Core) BearingFor ¶
func (c *Core) BearingFor(m *db.Membership) (Bearing, error)
func (*Core) CanManageTenants ¶
func (*Core) CanSeeCredentials ¶
func (*Core) CanSeeGlobalCredentials ¶
func (*Core) CheckArchiveExpiries ¶
func (c *Core) CheckArchiveExpiries()
func (*Core) CleanupLeftoverTasks ¶
func (c *Core) CleanupLeftoverTasks()
func (*Core) CleanupOrphanedObjects ¶
func (c *Core) CleanupOrphanedObjects()
func (*Core) ConfigureMessageBus ¶
func (c *Core) ConfigureMessageBus()
func (*Core) ConnectToDatabase ¶
func (c *Core) ConnectToDatabase()
func (*Core) ConnectToVault ¶
func (c *Core) ConnectToVault()
func (*Core) CreateFailsafeUser ¶
func (c *Core) CreateFailsafeUser()
func (*Core) DeltaIncrease ¶
func (c *Core) DeltaIncrease(filter *db.ArchiveFilter) (int64, error)
func (*Core) ExpireInteractiveSessions ¶
func (c *Core) ExpireInteractiveSessions()
func (*Core) IsNotTenantAdmin ¶
func (*Core) IsNotTenantEngineer ¶
func (*Core) IsNotTenantOperator ¶
func (*Core) MarkIrrelevantTasks ¶
func (c *Core) MarkIrrelevantTasks()
func (*Core) MaybeTerminate ¶
func (*Core) PrecreateTenants ¶
func (c *Core) PrecreateTenants()
func (*Core) PurgeExpiredAPISessions ¶
func (c *Core) PurgeExpiredAPISessions()
func (*Core) ScheduleAgentStatusCheckTasks ¶
func (c *Core) ScheduleAgentStatusCheckTasks(f *db.AgentFilter)
func (*Core) ScheduleBackupTasks ¶
func (c *Core) ScheduleBackupTasks()
func (*Core) SchedulePurgeTasks ¶
func (c *Core) SchedulePurgeTasks()
func (*Core) ScheduleStorageTestTasks ¶
func (c *Core) ScheduleStorageTestTasks()
func (*Core) StartScheduler ¶
func (c *Core) StartScheduler()
func (*Core) TaskErrored ¶
func (*Core) TasksToChores ¶
func (c *Core) TasksToChores()
func (*Core) WireUpAuthenticationProviders ¶
func (c *Core) WireUpAuthenticationProviders()
type GithubAuthProvider ¶
type GithubAuthProvider struct { AuthProviderBase ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` GithubEndpoint string `json:"github_endpoint"` GithubAPI string `json:"github_api"` GithubEnterprise bool `json:"github_enterprise"` Mapping []struct { Github string `json:"github"` Tenant string `json:"tenant"` Rights []struct { Team string `json:"team"` Role string `json:"role"` } `json:"rights"` } `json:"mapping"` }
func (*GithubAuthProvider) Configure ¶
func (p *GithubAuthProvider) Configure(raw map[interface{}]interface{}) error
func (*GithubAuthProvider) HandleRedirect ¶
func (p *GithubAuthProvider) HandleRedirect(r *route.Request) *db.User
func (*GithubAuthProvider) Initiate ¶
func (p *GithubAuthProvider) Initiate(r *route.Request)
func (*GithubAuthProvider) ReferencedTenants ¶
func (p *GithubAuthProvider) ReferencedTenants() []string
func (*GithubAuthProvider) WireUpTo ¶
func (p *GithubAuthProvider) WireUpTo(c *Core)
type Health ¶
type Health struct { Health struct { Core string `json:"core"` Storage bool `json:"storage_ok"` Jobs bool `json:"jobs_ok"` } `json:"health"` Storage []StorageHealth `json:"storage"` Jobs []JobHealth `json:"jobs"` Stats struct { Jobs int `json:"jobs"` Systems int `json:"systems"` Archives int `json:"archives"` Storage int64 `json:"storage"` Daily int64 `json:"daily"` } `json:"stats"` }
type StorageHealth ¶
type UAAAuthProvider ¶
type UAAAuthProvider struct { AuthProviderBase ClientID string `json:"client_id"` ClientSecret string `json:"client_secret"` UAAEndpoint string `json:"uaa_endpoint"` SkipVerifyTLS bool `json:"skip_verify_tls"` Mapping []struct { Tenant string `json:"tenant"` Rights []struct { SCIM string `json:"scim"` Role string `json:"role"` } `json:"rights"` } `json:"mapping"` // contains filtered or unexported fields }
func (*UAAAuthProvider) Configure ¶
func (p *UAAAuthProvider) Configure(raw map[interface{}]interface{}) error
func (*UAAAuthProvider) HandleRedirect ¶
func (p *UAAAuthProvider) HandleRedirect(r *route.Request) *db.User
func (*UAAAuthProvider) Initiate ¶
func (p *UAAAuthProvider) Initiate(r *route.Request)
func (*UAAAuthProvider) ReferencedTenants ¶
func (p *UAAAuthProvider) ReferencedTenants() []string
func (*UAAAuthProvider) WireUpTo ¶
func (p *UAAAuthProvider) WireUpTo(c *Core)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.