Documentation ¶
Index ¶
- type BackupOptions
- type PostInitMigrator
- type Store
- func (store *Store) APIKeyRepository() dataservices.APIKeyRepository
- func (store *Store) Backup(version *models.Version) (string, error)
- func (store *Store) BackupTo(w io.Writer) error
- func (store *Store) CheckCurrentEdition() error
- func (store *Store) Close() error
- func (store *Store) Connection() portainer.Connection
- func (store *Store) CustomTemplate() dataservices.CustomTemplateService
- func (store *Store) EdgeGroup() dataservices.EdgeGroupService
- func (store *Store) EdgeJob() dataservices.EdgeJobService
- func (store *Store) EdgeStack() dataservices.EdgeStackService
- func (store *Store) Endpoint() dataservices.EndpointService
- func (store *Store) EndpointGroup() dataservices.EndpointGroupService
- func (store *Store) EndpointRelation() dataservices.EndpointRelationService
- func (store *Store) Export(filename string) (err error)
- func (store *Store) FDOProfile() dataservices.FDOProfileService
- func (store *Store) FailSafeMigrate(migrator *migrator.Migrator, version *models.Version) (err error)
- func (store *Store) GetConnection() portainer.Connection
- func (store *Store) HelmUserRepository() dataservices.HelmUserRepositoryService
- func (store *Store) Import(filename string) (err error)
- func (store *Store) Init() error
- func (store *Store) IsErrObjectNotFound(e error) bool
- func (store *Store) MigrateData() error
- func (store *Store) Open() (newStore bool, err error)
- func (store *Store) Registry() dataservices.RegistryService
- func (store *Store) ResourceControl() dataservices.ResourceControlService
- func (store *Store) Role() dataservices.RoleService
- func (store *Store) Rollback(force bool) error
- func (store *Store) SSLSettings() dataservices.SSLSettingsService
- func (store *Store) Settings() dataservices.SettingsService
- func (store *Store) Snapshot() dataservices.SnapshotService
- func (store *Store) Stack() dataservices.StackService
- func (store *Store) Tag() dataservices.TagService
- func (store *Store) Team() dataservices.TeamService
- func (store *Store) TeamMembership() dataservices.TeamMembershipService
- func (store *Store) TunnelServer() dataservices.TunnelServerService
- func (store *Store) UpdateTx(fn func(dataservices.DataStoreTx) error) error
- func (store *Store) User() dataservices.UserService
- func (store *Store) Version() dataservices.VersionService
- func (store *Store) ViewTx(fn func(dataservices.DataStoreTx) error) error
- func (store *Store) Webhook() dataservices.WebhookService
- type StoreTx
- func (tx *StoreTx) APIKeyRepository() dataservices.APIKeyRepository
- func (tx *StoreTx) CustomTemplate() dataservices.CustomTemplateService
- func (tx *StoreTx) EdgeGroup() dataservices.EdgeGroupService
- func (tx *StoreTx) EdgeJob() dataservices.EdgeJobService
- func (tx *StoreTx) EdgeStack() dataservices.EdgeStackService
- func (tx *StoreTx) Endpoint() dataservices.EndpointService
- func (tx *StoreTx) EndpointGroup() dataservices.EndpointGroupService
- func (tx *StoreTx) EndpointRelation() dataservices.EndpointRelationService
- func (tx *StoreTx) FDOProfile() dataservices.FDOProfileService
- func (tx *StoreTx) HelmUserRepository() dataservices.HelmUserRepositoryService
- func (tx *StoreTx) IsErrObjectNotFound(err error) bool
- func (tx *StoreTx) Registry() dataservices.RegistryService
- func (tx *StoreTx) ResourceControl() dataservices.ResourceControlService
- func (tx *StoreTx) Role() dataservices.RoleService
- func (tx *StoreTx) SSLSettings() dataservices.SSLSettingsService
- func (tx *StoreTx) Settings() dataservices.SettingsService
- func (tx *StoreTx) Snapshot() dataservices.SnapshotService
- func (tx *StoreTx) Stack() dataservices.StackService
- func (tx *StoreTx) Tag() dataservices.TagService
- func (tx *StoreTx) Team() dataservices.TeamService
- func (tx *StoreTx) TeamMembership() dataservices.TeamMembershipService
- func (tx *StoreTx) TunnelServer() dataservices.TunnelServerService
- func (tx *StoreTx) User() dataservices.UserService
- func (tx *StoreTx) Version() dataservices.VersionService
- func (tx *StoreTx) Webhook() dataservices.WebhookService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupOptions ¶
type BackupOptions struct { Version string BackupDir string BackupFileName string BackupPath string }
BackupOptions provide a helper to inject backup options
type PostInitMigrator ¶
type PostInitMigrator struct {
// contains filtered or unexported fields
}
func NewPostInitMigrator ¶
func NewPostInitMigrator(kubeFactory *cli.ClientFactory, dockerFactory *dockerclient.ClientFactory, dataStore dataservices.DataStore) *PostInitMigrator
func (*PostInitMigrator) PostInitMigrate ¶
func (migrator *PostInitMigrator) PostInitMigrate() error
func (*PostInitMigrator) PostInitMigrateGPUs ¶
func (migrator *PostInitMigrator) PostInitMigrateGPUs()
PostInitMigrateGPUs will check all docker endpoints for containers with GPUs and set EnableGPUManagement to true if any are found If there's an error getting the containers, we'll log it and move on
func (*PostInitMigrator) PostInitMigrateIngresses ¶
func (migrator *PostInitMigrator) PostInitMigrateIngresses() error
type Store ¶
type Store struct { CustomTemplateService *customtemplate.Service DockerHubService *dockerhub.Service EdgeGroupService *edgegroup.Service EdgeJobService *edgejob.Service EdgeStackService *edgestack.Service EndpointGroupService *endpointgroup.Service EndpointService *endpoint.Service EndpointRelationService *endpointrelation.Service ExtensionService *extension.Service FDOProfilesService *fdoprofile.Service HelmUserRepositoryService *helmuserrepository.Service RegistryService *registry.Service ResourceControlService *resourcecontrol.Service RoleService *role.Service APIKeyRepositoryService *apikeyrepository.Service ScheduleService *schedule.Service SettingsService *settings.Service SnapshotService *snapshot.Service SSLSettingsService *ssl.Service StackService *stack.Service TagService *tag.Service TeamMembershipService *teammembership.Service TeamService *team.Service TunnelServerService *tunnelserver.Service UserService *user.Service VersionService *version.Service WebhookService *webhook.Service // contains filtered or unexported fields }
Store defines the implementation of portainer.DataStore using BoltDB as the storage system.
func NewStore ¶
func NewStore(storePath string, fileService portainer.FileService, connection portainer.Connection) *Store
NewStore initializes a new Store and the associated services
func NewTestStore ¶
func (*Store) APIKeyRepository ¶
func (store *Store) APIKeyRepository() dataservices.APIKeyRepository
APIKeyRepository gives access to the api-key data management layer
func (*Store) BackupTo ¶
BackupTo backs up db to a provided writer. It does hot backup and doesn't block other database reads and writes
func (*Store) CheckCurrentEdition ¶
CheckCurrentEdition checks if current edition is community edition
func (*Store) Connection ¶
func (store *Store) Connection() portainer.Connection
func (*Store) CustomTemplate ¶
func (store *Store) CustomTemplate() dataservices.CustomTemplateService
CustomTemplate gives access to the CustomTemplate data management layer
func (*Store) EdgeGroup ¶
func (store *Store) EdgeGroup() dataservices.EdgeGroupService
EdgeGroup gives access to the EdgeGroup data management layer
func (*Store) EdgeJob ¶
func (store *Store) EdgeJob() dataservices.EdgeJobService
EdgeJob gives access to the EdgeJob data management layer
func (*Store) EdgeStack ¶
func (store *Store) EdgeStack() dataservices.EdgeStackService
EdgeStack gives access to the EdgeStack data management layer
func (*Store) Endpoint ¶
func (store *Store) Endpoint() dataservices.EndpointService
Environment(Endpoint) gives access to the Environment(Endpoint) data management layer
func (*Store) EndpointGroup ¶
func (store *Store) EndpointGroup() dataservices.EndpointGroupService
EndpointGroup gives access to the EndpointGroup data management layer
func (*Store) EndpointRelation ¶
func (store *Store) EndpointRelation() dataservices.EndpointRelationService
EndpointRelation gives access to the EndpointRelation data management layer
func (*Store) FDOProfile ¶
func (store *Store) FDOProfile() dataservices.FDOProfileService
FDOProfile gives access to the FDOProfile data management layer
func (*Store) FailSafeMigrate ¶
func (store *Store) FailSafeMigrate(migrator *migrator.Migrator, version *models.Version) (err error)
FailSafeMigrate backup and restore DB if migration fail
func (*Store) GetConnection ¶
func (store *Store) GetConnection() portainer.Connection
func (*Store) HelmUserRepository ¶
func (store *Store) HelmUserRepository() dataservices.HelmUserRepositoryService
HelmUserRepository access the helm user repository settings
func (*Store) IsErrObjectNotFound ¶
TODO: move the use of this to dataservices.IsErrObjectNotFound()?
func (*Store) MigrateData ¶
func (*Store) Registry ¶
func (store *Store) Registry() dataservices.RegistryService
Registry gives access to the Registry data management layer
func (*Store) ResourceControl ¶
func (store *Store) ResourceControl() dataservices.ResourceControlService
ResourceControl gives access to the ResourceControl data management layer
func (*Store) Role ¶
func (store *Store) Role() dataservices.RoleService
Role gives access to the Role data management layer
func (*Store) SSLSettings ¶
func (store *Store) SSLSettings() dataservices.SSLSettingsService
SSLSettings gives access to the SSL Settings data management layer
func (*Store) Settings ¶
func (store *Store) Settings() dataservices.SettingsService
Settings gives access to the Settings data management layer
func (*Store) Snapshot ¶
func (store *Store) Snapshot() dataservices.SnapshotService
func (*Store) Stack ¶
func (store *Store) Stack() dataservices.StackService
Stack gives access to the Stack data management layer
func (*Store) Tag ¶
func (store *Store) Tag() dataservices.TagService
Tag gives access to the Tag data management layer
func (*Store) Team ¶
func (store *Store) Team() dataservices.TeamService
Team gives access to the Team data management layer
func (*Store) TeamMembership ¶
func (store *Store) TeamMembership() dataservices.TeamMembershipService
TeamMembership gives access to the TeamMembership data management layer
func (*Store) TunnelServer ¶
func (store *Store) TunnelServer() dataservices.TunnelServerService
TunnelServer gives access to the TunnelServer data management layer
func (*Store) UpdateTx ¶
func (store *Store) UpdateTx(fn func(dataservices.DataStoreTx) error) error
func (*Store) User ¶
func (store *Store) User() dataservices.UserService
User gives access to the User data management layer
func (*Store) Version ¶
func (store *Store) Version() dataservices.VersionService
Version gives access to the Version data management layer
func (*Store) ViewTx ¶
func (store *Store) ViewTx(fn func(dataservices.DataStoreTx) error) error
func (*Store) Webhook ¶
func (store *Store) Webhook() dataservices.WebhookService
Webhook gives access to the Webhook data management layer
type StoreTx ¶
type StoreTx struct {
// contains filtered or unexported fields
}
func (*StoreTx) APIKeyRepository ¶
func (tx *StoreTx) APIKeyRepository() dataservices.APIKeyRepository
func (*StoreTx) CustomTemplate ¶
func (tx *StoreTx) CustomTemplate() dataservices.CustomTemplateService
func (*StoreTx) EdgeGroup ¶
func (tx *StoreTx) EdgeGroup() dataservices.EdgeGroupService
func (*StoreTx) EdgeJob ¶
func (tx *StoreTx) EdgeJob() dataservices.EdgeJobService
func (*StoreTx) EdgeStack ¶
func (tx *StoreTx) EdgeStack() dataservices.EdgeStackService
func (*StoreTx) Endpoint ¶
func (tx *StoreTx) Endpoint() dataservices.EndpointService
func (*StoreTx) EndpointGroup ¶
func (tx *StoreTx) EndpointGroup() dataservices.EndpointGroupService
func (*StoreTx) EndpointRelation ¶
func (tx *StoreTx) EndpointRelation() dataservices.EndpointRelationService
func (*StoreTx) FDOProfile ¶
func (tx *StoreTx) FDOProfile() dataservices.FDOProfileService
func (*StoreTx) HelmUserRepository ¶
func (tx *StoreTx) HelmUserRepository() dataservices.HelmUserRepositoryService
func (*StoreTx) IsErrObjectNotFound ¶
func (*StoreTx) Registry ¶
func (tx *StoreTx) Registry() dataservices.RegistryService
func (*StoreTx) ResourceControl ¶
func (tx *StoreTx) ResourceControl() dataservices.ResourceControlService
func (*StoreTx) Role ¶
func (tx *StoreTx) Role() dataservices.RoleService
func (*StoreTx) SSLSettings ¶
func (tx *StoreTx) SSLSettings() dataservices.SSLSettingsService
func (*StoreTx) Settings ¶
func (tx *StoreTx) Settings() dataservices.SettingsService
func (*StoreTx) Snapshot ¶
func (tx *StoreTx) Snapshot() dataservices.SnapshotService
func (*StoreTx) Stack ¶
func (tx *StoreTx) Stack() dataservices.StackService
func (*StoreTx) Tag ¶
func (tx *StoreTx) Tag() dataservices.TagService
func (*StoreTx) Team ¶
func (tx *StoreTx) Team() dataservices.TeamService
func (*StoreTx) TeamMembership ¶
func (tx *StoreTx) TeamMembership() dataservices.TeamMembershipService
func (*StoreTx) TunnelServer ¶
func (tx *StoreTx) TunnelServer() dataservices.TunnelServerService
func (*StoreTx) User ¶
func (tx *StoreTx) User() dataservices.UserService
func (*StoreTx) Version ¶
func (tx *StoreTx) Version() dataservices.VersionService
func (*StoreTx) Webhook ¶
func (tx *StoreTx) Webhook() dataservices.WebhookService