Documentation ¶
Index ¶
- type BackupOptions
- 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) User() dataservices.UserService
- func (store *Store) Version() dataservices.VersionService
- func (store *Store) 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 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 MustNewTestStore ¶
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) 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) Webhook ¶
func (store *Store) Webhook() dataservices.WebhookService
Webhook gives access to the Webhook data management layer