datastore

package
v0.0.0-...-4560a53 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Zlib Imports: 51 Imported by: 1

Documentation

Index

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 MustNewTestStore

func MustNewTestStore(t testing.TB, init, secure bool) (bool, *Store)

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 NewTestStore(t testing.TB, init, secure bool) (bool, *Store, func(), error)

func (*Store) APIKeyRepository

func (store *Store) APIKeyRepository() dataservices.APIKeyRepository

APIKeyRepository gives access to the api-key data management layer

func (*Store) Backup

func (store *Store) Backup(version *models.Version) (string, error)

Backup current database with default options

func (*Store) BackupTo

func (store *Store) BackupTo(w io.Writer) error

BackupTo backs up db to a provided writer. It does hot backup and doesn't block other database reads and writes

func (*Store) CheckCurrentEdition

func (store *Store) CheckCurrentEdition() error

CheckCurrentEdition checks if current edition is community edition

func (*Store) Close

func (store *Store) Close() error

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) Export

func (store *Store) Export(filename string) (err error)

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) Import

func (store *Store) Import(filename string) (err error)

func (*Store) Init

func (store *Store) Init() error

Init creates the default data set.

func (*Store) IsErrObjectNotFound

func (store *Store) IsErrObjectNotFound(e error) bool

TODO: move the use of this to dataservices.IsErrObjectNotFound()?

func (*Store) MigrateData

func (store *Store) MigrateData() error

func (*Store) Open

func (store *Store) Open() (newStore bool, err error)

Open opens and initializes the BoltDB database.

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) Rollback

func (store *Store) Rollback(force bool) error

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 (tx *StoreTx) IsErrObjectNotFound(err error) bool

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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