1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

Display error message if database is for Portainer BE (#4557)

This commit is contained in:
Stéphane Busso 2021-02-23 11:14:52 +13:00 committed by GitHub
parent cc9dd55b5c
commit b9cad8a7ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 88 additions and 2 deletions

View file

@ -559,6 +559,9 @@ type (
// SnapshotJob represents a scheduled job that can create endpoint snapshots
SnapshotJob struct{}
// SoftwareEdition represents an edition of Portainer
SoftwareEdition int
// Stack represents a Docker stack created via docker stack deploy
Stack struct {
ID StackID `json:"Id"`
@ -822,6 +825,7 @@ type (
Close() error
IsNew() bool
MigrateData() error
CheckCurrentEdition() error
DockerHub() DockerHubService
CustomTemplate() CustomTemplateService
@ -1122,8 +1126,9 @@ type (
// VersionService represents a service for managing version data
VersionService interface {
DBVersion() (int, error)
StoreDBVersion(version int) error
Edition() (SoftwareEdition, error)
InstanceID() (string, error)
StoreDBVersion(version int) error
StoreInstanceID(ID string) error
}
@ -1268,6 +1273,16 @@ const (
TeamMember
)
const (
_ SoftwareEdition = iota
// PortainerCE represents the community edition of Portainer
PortainerCE
// PortainerBE represents the business edition of Portainer
PortainerBE
// PortainerEE represents the business edition of Portainer
PortainerEE
)
const (
_ RegistryType = iota
// QuayRegistry represents a Quay.io registry