2016-12-18 05:21:29 +00:00
|
|
|
package portainer
|
|
|
|
|
2020-05-20 05:23:15 +00:00
|
|
|
import (
|
2020-07-05 23:21:03 +00:00
|
|
|
"io"
|
2020-05-20 05:23:15 +00:00
|
|
|
"time"
|
|
|
|
)
|
2019-07-25 22:38:07 +00:00
|
|
|
|
2016-12-18 05:21:29 +00:00
|
|
|
type (
|
2020-04-08 21:26:11 +00:00
|
|
|
// AccessPolicy represent a policy that can be associated to a user or team
|
|
|
|
AccessPolicy struct {
|
|
|
|
RoleID RoleID `json:"RoleId"`
|
|
|
|
}
|
|
|
|
|
2020-08-04 00:44:17 +00:00
|
|
|
// AgentPlatform represents a platform type for an Agent
|
|
|
|
AgentPlatform int
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// AuthenticationMethod represents the authentication method used to authenticate a user
|
|
|
|
AuthenticationMethod int
|
|
|
|
|
|
|
|
// Authorization represents an authorization associated to an operation
|
|
|
|
Authorization string
|
|
|
|
|
|
|
|
// Authorizations represents a set of authorizations associated to a role
|
|
|
|
Authorizations map[Authorization]bool
|
|
|
|
|
|
|
|
// AzureCredentials represents the credentials used to connect to an Azure
|
2020-06-09 02:43:32 +00:00
|
|
|
// environment.
|
2020-04-08 21:26:11 +00:00
|
|
|
AzureCredentials struct {
|
|
|
|
ApplicationID string `json:"ApplicationID"`
|
|
|
|
TenantID string `json:"TenantID"`
|
|
|
|
AuthenticationKey string `json:"AuthenticationKey"`
|
2016-12-18 05:21:29 +00:00
|
|
|
}
|
|
|
|
|
2018-08-21 18:40:42 +00:00
|
|
|
// CLIFlags represents the available flags on the CLI
|
2016-12-18 05:21:29 +00:00
|
|
|
CLIFlags struct {
|
2020-06-16 07:55:45 +00:00
|
|
|
Addr *string
|
|
|
|
TunnelAddr *string
|
|
|
|
TunnelPort *string
|
|
|
|
AdminPassword *string
|
|
|
|
AdminPasswordFile *string
|
|
|
|
Assets *string
|
|
|
|
Data *string
|
|
|
|
EnableEdgeComputeFeatures *bool
|
|
|
|
EndpointURL *string
|
|
|
|
Labels *[]Pair
|
|
|
|
Logo *string
|
|
|
|
NoAnalytics *bool
|
|
|
|
Templates *string
|
|
|
|
TLS *bool
|
|
|
|
TLSSkipVerify *bool
|
|
|
|
TLSCacert *string
|
|
|
|
TLSCert *string
|
|
|
|
TLSKey *string
|
|
|
|
SSL *bool
|
|
|
|
SSLCert *string
|
|
|
|
SSLKey *string
|
|
|
|
SnapshotInterval *string
|
2017-06-01 08:14:55 +00:00
|
|
|
}
|
|
|
|
|
2020-07-06 23:18:39 +00:00
|
|
|
// CustomTemplate represents a custom template
|
|
|
|
CustomTemplate struct {
|
|
|
|
ID CustomTemplateID `json:"Id"`
|
|
|
|
Title string `json:"Title"`
|
|
|
|
Description string `json:"Description"`
|
|
|
|
ProjectPath string `json:"ProjectPath"`
|
|
|
|
EntryPoint string `json:"EntryPoint"`
|
|
|
|
CreatedByUserID UserID `json:"CreatedByUserId"`
|
|
|
|
Note string `json:"Note"`
|
|
|
|
Platform CustomTemplatePlatform `json:"Platform"`
|
|
|
|
Logo string `json:"Logo"`
|
|
|
|
Type StackType `json:"Type"`
|
|
|
|
ResourceControl *ResourceControl `json:"ResourceControl"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// CustomTemplateID represents a custom template identifier
|
|
|
|
CustomTemplateID int
|
|
|
|
|
|
|
|
// CustomTemplatePlatform represents a custom template platform
|
|
|
|
CustomTemplatePlatform int
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// DockerHub represents all the required information to connect and use the
|
|
|
|
// Docker Hub
|
|
|
|
DockerHub struct {
|
|
|
|
Authentication bool `json:"Authentication"`
|
|
|
|
Username string `json:"Username"`
|
|
|
|
Password string `json:"Password,omitempty"`
|
2018-12-30 16:02:22 +00:00
|
|
|
}
|
|
|
|
|
2020-07-05 23:21:03 +00:00
|
|
|
// DockerSnapshot represents a snapshot of a specific Docker endpoint at a specific time
|
|
|
|
DockerSnapshot struct {
|
|
|
|
Time int64 `json:"Time"`
|
|
|
|
DockerVersion string `json:"DockerVersion"`
|
|
|
|
Swarm bool `json:"Swarm"`
|
|
|
|
TotalCPU int `json:"TotalCPU"`
|
|
|
|
TotalMemory int64 `json:"TotalMemory"`
|
|
|
|
RunningContainerCount int `json:"RunningContainerCount"`
|
|
|
|
StoppedContainerCount int `json:"StoppedContainerCount"`
|
|
|
|
HealthyContainerCount int `json:"HealthyContainerCount"`
|
|
|
|
UnhealthyContainerCount int `json:"UnhealthyContainerCount"`
|
|
|
|
VolumeCount int `json:"VolumeCount"`
|
|
|
|
ImageCount int `json:"ImageCount"`
|
|
|
|
ServiceCount int `json:"ServiceCount"`
|
|
|
|
StackCount int `json:"StackCount"`
|
|
|
|
SnapshotRaw DockerSnapshotRaw `json:"DockerSnapshotRaw"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// DockerSnapshotRaw represents all the information related to a snapshot as returned by the Docker API
|
|
|
|
DockerSnapshotRaw struct {
|
|
|
|
Containers interface{} `json:"Containers"`
|
|
|
|
Volumes interface{} `json:"Volumes"`
|
|
|
|
Networks interface{} `json:"Networks"`
|
|
|
|
Images interface{} `json:"Images"`
|
|
|
|
Info interface{} `json:"Info"`
|
|
|
|
Version interface{} `json:"Version"`
|
|
|
|
}
|
|
|
|
|
2020-05-14 02:14:28 +00:00
|
|
|
// EdgeGroup represents an Edge group
|
|
|
|
EdgeGroup struct {
|
|
|
|
ID EdgeGroupID `json:"Id"`
|
|
|
|
Name string `json:"Name"`
|
|
|
|
Dynamic bool `json:"Dynamic"`
|
|
|
|
TagIDs []TagID `json:"TagIds"`
|
|
|
|
Endpoints []EndpointID `json:"Endpoints"`
|
|
|
|
PartialMatch bool `json:"PartialMatch"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// EdgeGroupID represents an Edge group identifier
|
|
|
|
EdgeGroupID int
|
|
|
|
|
2020-06-25 03:25:51 +00:00
|
|
|
// EdgeJob represents a job that can run on Edge environments.
|
|
|
|
EdgeJob struct {
|
|
|
|
ID EdgeJobID `json:"Id"`
|
|
|
|
Created int64 `json:"Created"`
|
|
|
|
CronExpression string `json:"CronExpression"`
|
|
|
|
Endpoints map[EndpointID]EdgeJobEndpointMeta `json:"Endpoints"`
|
|
|
|
Name string `json:"Name"`
|
|
|
|
ScriptPath string `json:"ScriptPath"`
|
|
|
|
Recurring bool `json:"Recurring"`
|
|
|
|
Version int `json:"Version"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// EdgeJobEndpointMeta represents a meta data object for an Edge job and Endpoint relation
|
|
|
|
EdgeJobEndpointMeta struct {
|
|
|
|
LogsStatus EdgeJobLogsStatus
|
|
|
|
CollectLogs bool
|
|
|
|
}
|
|
|
|
|
|
|
|
// EdgeJobID represents an Edge job identifier
|
|
|
|
EdgeJobID int
|
|
|
|
|
|
|
|
// EdgeJobLogsStatus represent status of logs collection job
|
|
|
|
EdgeJobLogsStatus int
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// EdgeSchedule represents a scheduled job that can run on Edge environments.
|
2020-06-25 03:25:51 +00:00
|
|
|
// Deprecated in favor of EdgeJob
|
2020-04-08 21:26:11 +00:00
|
|
|
EdgeSchedule struct {
|
|
|
|
ID ScheduleID `json:"Id"`
|
|
|
|
CronExpression string `json:"CronExpression"`
|
|
|
|
Script string `json:"Script"`
|
|
|
|
Version int `json:"Version"`
|
|
|
|
Endpoints []EndpointID `json:"Endpoints"`
|
|
|
|
}
|
|
|
|
|
2020-05-14 02:14:28 +00:00
|
|
|
//EdgeStack represents an edge stack
|
|
|
|
EdgeStack struct {
|
|
|
|
ID EdgeStackID `json:"Id"`
|
|
|
|
Name string `json:"Name"`
|
|
|
|
Status map[EndpointID]EdgeStackStatus `json:"Status"`
|
|
|
|
CreationDate int64 `json:"CreationDate"`
|
|
|
|
EdgeGroups []EdgeGroupID `json:"EdgeGroups"`
|
|
|
|
ProjectPath string `json:"ProjectPath"`
|
|
|
|
EntryPoint string `json:"EntryPoint"`
|
|
|
|
Version int `json:"Version"`
|
|
|
|
Prune bool `json:"Prune"`
|
|
|
|
}
|
|
|
|
|
|
|
|
//EdgeStackID represents an edge stack id
|
|
|
|
EdgeStackID int
|
|
|
|
|
|
|
|
//EdgeStackStatus represents an edge stack status
|
|
|
|
EdgeStackStatus struct {
|
|
|
|
Type EdgeStackStatusType `json:"Type"`
|
|
|
|
Error string `json:"Error"`
|
|
|
|
EndpointID EndpointID `json:"EndpointID"`
|
|
|
|
}
|
|
|
|
|
|
|
|
//EdgeStackStatusType represents an edge stack status type
|
|
|
|
EdgeStackStatusType int
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// Endpoint represents a Docker endpoint with all the info required
|
|
|
|
// to connect to it
|
|
|
|
Endpoint struct {
|
2020-06-04 05:35:09 +00:00
|
|
|
ID EndpointID `json:"Id"`
|
|
|
|
Name string `json:"Name"`
|
|
|
|
Type EndpointType `json:"Type"`
|
|
|
|
URL string `json:"URL"`
|
|
|
|
GroupID EndpointGroupID `json:"GroupId"`
|
|
|
|
PublicURL string `json:"PublicURL"`
|
|
|
|
TLSConfig TLSConfiguration `json:"TLSConfig"`
|
|
|
|
Extensions []EndpointExtension `json:"Extensions"`
|
2020-06-09 02:43:32 +00:00
|
|
|
AzureCredentials AzureCredentials `json:"AzureCredentials,omitempty"`
|
2020-06-04 05:35:09 +00:00
|
|
|
TagIDs []TagID `json:"TagIds"`
|
|
|
|
Status EndpointStatus `json:"Status"`
|
2020-07-05 23:21:03 +00:00
|
|
|
Snapshots []DockerSnapshot `json:"Snapshots"`
|
2020-06-04 05:35:09 +00:00
|
|
|
UserAccessPolicies UserAccessPolicies `json:"UserAccessPolicies"`
|
|
|
|
TeamAccessPolicies TeamAccessPolicies `json:"TeamAccessPolicies"`
|
|
|
|
EdgeID string `json:"EdgeID,omitempty"`
|
|
|
|
EdgeKey string `json:"EdgeKey"`
|
|
|
|
EdgeCheckinInterval int `json:"EdgeCheckinInterval"`
|
2020-07-05 23:21:03 +00:00
|
|
|
Kubernetes KubernetesData `json:"Kubernetes"`
|
2020-06-04 05:35:09 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// Deprecated fields
|
|
|
|
// Deprecated in DBVersion == 4
|
|
|
|
TLS bool `json:"TLS,omitempty"`
|
2017-08-10 08:35:23 +00:00
|
|
|
TLSCACertPath string `json:"TLSCACert,omitempty"`
|
|
|
|
TLSCertPath string `json:"TLSCert,omitempty"`
|
|
|
|
TLSKeyPath string `json:"TLSKey,omitempty"`
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// Deprecated in DBVersion == 18
|
|
|
|
AuthorizedUsers []UserID `json:"AuthorizedUsers"`
|
|
|
|
AuthorizedTeams []TeamID `json:"AuthorizedTeams"`
|
|
|
|
|
|
|
|
// Deprecated in DBVersion == 22
|
|
|
|
Tags []string `json:"Tags"`
|
2017-08-10 08:35:23 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// EndpointAuthorizations represents the authorizations associated to a set of endpoints
|
|
|
|
EndpointAuthorizations map[EndpointID]Authorizations
|
|
|
|
|
|
|
|
// EndpointExtension represents a deprecated form of Portainer extension
|
|
|
|
// TODO: legacy extension management
|
|
|
|
EndpointExtension struct {
|
|
|
|
Type EndpointExtensionType `json:"Type"`
|
|
|
|
URL string `json:"URL"`
|
2018-07-23 04:57:38 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// EndpointExtensionType represents the type of an endpoint extension. Only
|
|
|
|
// one extension of each type can be associated to an endpoint
|
|
|
|
EndpointExtensionType int
|
|
|
|
|
|
|
|
// EndpointGroup represents a group of endpoints
|
|
|
|
EndpointGroup struct {
|
|
|
|
ID EndpointGroupID `json:"Id"`
|
|
|
|
Name string `json:"Name"`
|
|
|
|
Description string `json:"Description"`
|
|
|
|
UserAccessPolicies UserAccessPolicies `json:"UserAccessPolicies"`
|
|
|
|
TeamAccessPolicies TeamAccessPolicies `json:"TeamAccessPolicies"`
|
|
|
|
TagIDs []TagID `json:"TagIds"`
|
2018-07-11 08:39:20 +00:00
|
|
|
|
2018-05-28 14:40:59 +00:00
|
|
|
// Deprecated fields
|
2020-04-08 21:26:11 +00:00
|
|
|
Labels []Pair `json:"Labels"`
|
2016-12-18 05:21:29 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// Deprecated in DBVersion == 18
|
|
|
|
AuthorizedUsers []UserID `json:"AuthorizedUsers"`
|
|
|
|
AuthorizedTeams []TeamID `json:"AuthorizedTeams"`
|
|
|
|
|
|
|
|
// Deprecated in DBVersion == 22
|
|
|
|
Tags []string `json:"Tags"`
|
2016-12-18 05:21:29 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// EndpointGroupID represents an endpoint group identifier
|
|
|
|
EndpointGroupID int
|
2017-03-12 16:24:15 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// EndpointID represents an endpoint identifier
|
|
|
|
EndpointID int
|
2017-03-12 16:24:15 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// EndpointStatus represents the status of an endpoint
|
|
|
|
EndpointStatus int
|
2017-08-10 08:35:23 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// EndpointSyncJob represents a scheduled job that synchronize endpoints based on an external file
|
2020-05-18 08:29:37 +00:00
|
|
|
// Deprecated
|
2020-04-08 21:26:11 +00:00
|
|
|
EndpointSyncJob struct{}
|
2017-05-23 18:56:10 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// EndpointType represents the type of an endpoint
|
|
|
|
EndpointType int
|
2017-05-23 18:56:10 +00:00
|
|
|
|
2020-05-14 02:14:28 +00:00
|
|
|
// EndpointRelation represnts a endpoint relation object
|
|
|
|
EndpointRelation struct {
|
|
|
|
EndpointID EndpointID
|
|
|
|
EdgeStacks map[EdgeStackID]bool
|
|
|
|
}
|
|
|
|
|
2020-08-11 05:41:37 +00:00
|
|
|
// Extension represents a deprecated Portainer extension
|
2020-04-08 21:26:11 +00:00
|
|
|
Extension struct {
|
|
|
|
ID ExtensionID `json:"Id"`
|
|
|
|
Enabled bool `json:"Enabled"`
|
|
|
|
Name string `json:"Name,omitempty"`
|
|
|
|
ShortDescription string `json:"ShortDescription,omitempty"`
|
|
|
|
Description string `json:"Description,omitempty"`
|
|
|
|
DescriptionURL string `json:"DescriptionURL,omitempty"`
|
|
|
|
Price string `json:"Price,omitempty"`
|
|
|
|
PriceDescription string `json:"PriceDescription,omitempty"`
|
|
|
|
Deal bool `json:"Deal,omitempty"`
|
|
|
|
Available bool `json:"Available,omitempty"`
|
|
|
|
License LicenseInformation `json:"License,omitempty"`
|
|
|
|
Version string `json:"Version"`
|
|
|
|
UpdateAvailable bool `json:"UpdateAvailable"`
|
|
|
|
ShopURL string `json:"ShopURL,omitempty"`
|
|
|
|
Images []string `json:"Images,omitempty"`
|
|
|
|
Logo string `json:"Logo,omitempty"`
|
2017-05-23 18:56:10 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// ExtensionID represents a extension identifier
|
|
|
|
ExtensionID int
|
2017-05-23 18:56:10 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// GitlabRegistryData represents data required for gitlab registry to work
|
|
|
|
GitlabRegistryData struct {
|
|
|
|
ProjectID int `json:"ProjectId"`
|
|
|
|
InstanceURL string `json:"InstanceURL"`
|
|
|
|
ProjectPath string `json:"ProjectPath"`
|
|
|
|
}
|
2017-05-23 18:56:10 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// JobType represents a job type
|
|
|
|
JobType int
|
|
|
|
|
2020-07-05 23:21:03 +00:00
|
|
|
// KubernetesData contains all the Kubernetes related endpoint information
|
|
|
|
KubernetesData struct {
|
|
|
|
Snapshots []KubernetesSnapshot `json:"Snapshots"`
|
|
|
|
Configuration KubernetesConfiguration `json:"Configuration"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// KubernetesSnapshot represents a snapshot of a specific Kubernetes endpoint at a specific time
|
|
|
|
KubernetesSnapshot struct {
|
|
|
|
Time int64 `json:"Time"`
|
|
|
|
KubernetesVersion string `json:"KubernetesVersion"`
|
|
|
|
NodeCount int `json:"NodeCount"`
|
|
|
|
TotalCPU int64 `json:"TotalCPU"`
|
|
|
|
TotalMemory int64 `json:"TotalMemory"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// KubernetesConfiguration represents the configuration of a Kubernetes endpoint
|
|
|
|
KubernetesConfiguration struct {
|
2020-08-04 22:08:11 +00:00
|
|
|
UseLoadBalancer bool `json:"UseLoadBalancer"`
|
|
|
|
UseServerMetrics bool `json:"UseServerMetrics"`
|
|
|
|
StorageClasses []KubernetesStorageClassConfig `json:"StorageClasses"`
|
2020-08-20 00:51:14 +00:00
|
|
|
IngressClasses []KubernetesIngressClassConfig `json:"IngressClasses"`
|
2020-07-05 23:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// KubernetesStorageClassConfig represents a Kubernetes Storage Class configuration
|
|
|
|
KubernetesStorageClassConfig struct {
|
2020-08-07 04:40:24 +00:00
|
|
|
Name string `json:"Name"`
|
|
|
|
AccessModes []string `json:"AccessModes"`
|
|
|
|
Provisioner string `json:"Provisioner"`
|
|
|
|
AllowVolumeExpansion bool `json:"AllowVolumeExpansion"`
|
2020-07-05 23:21:03 +00:00
|
|
|
}
|
|
|
|
|
2020-08-20 00:51:14 +00:00
|
|
|
// KubernetesIngressClassConfig represents a Kubernetes Ingress Class configuration
|
|
|
|
KubernetesIngressClassConfig struct {
|
|
|
|
Name string `json:"Name"`
|
|
|
|
Type string `json:"Type"`
|
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// LDAPGroupSearchSettings represents settings used to search for groups in a LDAP server
|
|
|
|
LDAPGroupSearchSettings struct {
|
|
|
|
GroupBaseDN string `json:"GroupBaseDN"`
|
|
|
|
GroupFilter string `json:"GroupFilter"`
|
|
|
|
GroupAttribute string `json:"GroupAttribute"`
|
2016-12-18 05:21:29 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// LDAPSearchSettings represents settings used to search for users in a LDAP server
|
|
|
|
LDAPSearchSettings struct {
|
|
|
|
BaseDN string `json:"BaseDN"`
|
|
|
|
Filter string `json:"Filter"`
|
|
|
|
UserNameAttribute string `json:"UserNameAttribute"`
|
|
|
|
}
|
2017-10-15 17:24:40 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// LDAPSettings represents the settings used to connect to a LDAP server
|
|
|
|
LDAPSettings struct {
|
|
|
|
AnonymousMode bool `json:"AnonymousMode"`
|
|
|
|
ReaderDN string `json:"ReaderDN"`
|
|
|
|
Password string `json:"Password,omitempty"`
|
|
|
|
URL string `json:"URL"`
|
|
|
|
TLSConfig TLSConfiguration `json:"TLSConfig"`
|
|
|
|
StartTLS bool `json:"StartTLS"`
|
|
|
|
SearchSettings []LDAPSearchSettings `json:"SearchSettings"`
|
|
|
|
GroupSearchSettings []LDAPGroupSearchSettings `json:"GroupSearchSettings"`
|
|
|
|
AutoCreateUsers bool `json:"AutoCreateUsers"`
|
|
|
|
}
|
2018-06-11 13:13:19 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// LicenseInformation represents information about an extension license
|
|
|
|
LicenseInformation struct {
|
|
|
|
LicenseKey string `json:"LicenseKey,omitempty"`
|
|
|
|
Company string `json:"Company,omitempty"`
|
|
|
|
Expiration string `json:"Expiration,omitempty"`
|
|
|
|
Valid bool `json:"Valid,omitempty"`
|
2017-10-15 17:24:40 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// MembershipRole represents the role of a user within a team
|
|
|
|
MembershipRole int
|
2017-06-20 11:00:32 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// OAuthSettings represents the settings used to authorize with an authorization server
|
|
|
|
OAuthSettings struct {
|
|
|
|
ClientID string `json:"ClientID"`
|
|
|
|
ClientSecret string `json:"ClientSecret,omitempty"`
|
|
|
|
AccessTokenURI string `json:"AccessTokenURI"`
|
|
|
|
AuthorizationURI string `json:"AuthorizationURI"`
|
|
|
|
ResourceURI string `json:"ResourceURI"`
|
|
|
|
RedirectURI string `json:"RedirectURI"`
|
|
|
|
UserIdentifier string `json:"UserIdentifier"`
|
|
|
|
Scopes string `json:"Scopes"`
|
|
|
|
OAuthAutoCreateUsers bool `json:"OAuthAutoCreateUsers"`
|
|
|
|
DefaultTeamID TeamID `json:"DefaultTeamID"`
|
|
|
|
}
|
2018-12-09 03:49:27 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// Pair defines a key/value string pair
|
|
|
|
Pair struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Value string `json:"value"`
|
2019-11-12 03:28:31 +00:00
|
|
|
}
|
|
|
|
|
2017-06-20 11:00:32 +00:00
|
|
|
// Registry represents a Docker registry with all the info required
|
2018-08-21 18:40:42 +00:00
|
|
|
// to connect to it
|
2017-06-20 11:00:32 +00:00
|
|
|
Registry struct {
|
2018-12-09 03:49:27 +00:00
|
|
|
ID RegistryID `json:"Id"`
|
|
|
|
Type RegistryType `json:"Type"`
|
|
|
|
Name string `json:"Name"`
|
|
|
|
URL string `json:"URL"`
|
|
|
|
Authentication bool `json:"Authentication"`
|
|
|
|
Username string `json:"Username"`
|
|
|
|
Password string `json:"Password,omitempty"`
|
|
|
|
ManagementConfiguration *RegistryManagementConfiguration `json:"ManagementConfiguration"`
|
2019-11-12 03:28:31 +00:00
|
|
|
Gitlab GitlabRegistryData `json:"Gitlab"`
|
2019-05-24 06:04:58 +00:00
|
|
|
UserAccessPolicies UserAccessPolicies `json:"UserAccessPolicies"`
|
|
|
|
TeamAccessPolicies TeamAccessPolicies `json:"TeamAccessPolicies"`
|
|
|
|
|
|
|
|
// Deprecated fields
|
|
|
|
// Deprecated in DBVersion == 18
|
|
|
|
AuthorizedUsers []UserID `json:"AuthorizedUsers"`
|
|
|
|
AuthorizedTeams []TeamID `json:"AuthorizedTeams"`
|
2018-12-09 03:49:27 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// RegistryID represents a registry identifier
|
|
|
|
RegistryID int
|
|
|
|
|
2018-12-09 03:49:27 +00:00
|
|
|
// RegistryManagementConfiguration represents a configuration that can be used to query
|
|
|
|
// the registry API via the registry management extension.
|
|
|
|
RegistryManagementConfiguration struct {
|
|
|
|
Type RegistryType `json:"Type"`
|
|
|
|
Authentication bool `json:"Authentication"`
|
|
|
|
Username string `json:"Username"`
|
|
|
|
Password string `json:"Password"`
|
|
|
|
TLSConfig TLSConfiguration `json:"TLSConfig"`
|
2017-06-20 11:00:32 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// RegistryType represents a type of registry
|
|
|
|
RegistryType int
|
2016-12-25 20:34:02 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// ResourceAccessLevel represents the level of control associated to a resource
|
|
|
|
ResourceAccessLevel int
|
2018-05-06 07:15:57 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// ResourceControl represent a reference to a Docker resource with specific access controls
|
|
|
|
ResourceControl struct {
|
|
|
|
ID ResourceControlID `json:"Id"`
|
|
|
|
ResourceID string `json:"ResourceId"`
|
|
|
|
SubResourceIDs []string `json:"SubResourceIds"`
|
|
|
|
Type ResourceControlType `json:"Type"`
|
|
|
|
UserAccesses []UserResourceAccess `json:"UserAccesses"`
|
|
|
|
TeamAccesses []TeamResourceAccess `json:"TeamAccesses"`
|
|
|
|
Public bool `json:"Public"`
|
|
|
|
AdministratorsOnly bool `json:"AdministratorsOnly"`
|
|
|
|
System bool `json:"System"`
|
2018-07-11 08:39:20 +00:00
|
|
|
|
2017-09-14 06:08:37 +00:00
|
|
|
// Deprecated fields
|
2020-04-08 21:26:11 +00:00
|
|
|
// Deprecated in DBVersion == 2
|
|
|
|
OwnerID UserID `json:"OwnerId,omitempty"`
|
|
|
|
AccessLevel ResourceAccessLevel `json:"AccessLevel,omitempty"`
|
2019-05-24 06:04:58 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// ResourceControlID represents a resource control identifier
|
|
|
|
ResourceControlID int
|
2019-05-24 06:04:58 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// ResourceControlType represents the type of resource associated to the resource control (volume, container, service...)
|
|
|
|
ResourceControlType int
|
2019-05-24 06:04:58 +00:00
|
|
|
|
|
|
|
// Role represents a set of authorizations that can be associated to a user or
|
|
|
|
// to a team.
|
|
|
|
Role struct {
|
|
|
|
ID RoleID `json:"Id"`
|
|
|
|
Name string `json:"Name"`
|
|
|
|
Description string `json:"Description"`
|
|
|
|
Authorizations Authorizations `json:"Authorizations"`
|
2019-11-18 08:22:47 +00:00
|
|
|
Priority int `json:"Priority"`
|
2019-05-24 06:04:58 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// RoleID represents a role identifier
|
|
|
|
RoleID int
|
2018-11-06 09:49:48 +00:00
|
|
|
|
|
|
|
// Schedule represents a scheduled job.
|
|
|
|
// It only contains a pointer to one of the JobRunner implementations
|
2018-12-06 19:53:23 +00:00
|
|
|
// based on the JobType.
|
|
|
|
// NOTE: The Recurring option is only used by ScriptExecutionJob at the moment
|
2020-06-25 03:25:51 +00:00
|
|
|
// Deprecated in favor of EdgeJob
|
2018-11-05 20:58:15 +00:00
|
|
|
Schedule struct {
|
2020-06-25 03:25:51 +00:00
|
|
|
ID ScheduleID `json:"Id"`
|
|
|
|
Name string
|
|
|
|
CronExpression string
|
|
|
|
Recurring bool
|
|
|
|
Created int64
|
|
|
|
JobType JobType
|
|
|
|
EdgeSchedule *EdgeSchedule
|
2018-11-05 20:58:15 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// ScheduleID represents a schedule identifier.
|
2020-06-25 03:25:51 +00:00
|
|
|
// Deprecated in favor of EdgeJob
|
2020-04-08 21:26:11 +00:00
|
|
|
ScheduleID int
|
2018-09-03 10:08:03 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// ScriptExecutionJob represents a scheduled job that can execute a script via a privileged container
|
|
|
|
ScriptExecutionJob struct {
|
|
|
|
Endpoints []EndpointID
|
|
|
|
Image string
|
|
|
|
ScriptPath string
|
|
|
|
RetryCount int
|
|
|
|
RetryInterval int
|
2018-09-03 10:08:03 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// Settings represents the application settings
|
|
|
|
Settings struct {
|
2020-07-28 07:08:15 +00:00
|
|
|
LogoURL string `json:"LogoURL"`
|
|
|
|
BlackListedLabels []Pair `json:"BlackListedLabels"`
|
|
|
|
AuthenticationMethod AuthenticationMethod `json:"AuthenticationMethod"`
|
|
|
|
LDAPSettings LDAPSettings `json:"LDAPSettings"`
|
|
|
|
OAuthSettings OAuthSettings `json:"OAuthSettings"`
|
|
|
|
AllowBindMountsForRegularUsers bool `json:"AllowBindMountsForRegularUsers"`
|
|
|
|
AllowPrivilegedModeForRegularUsers bool `json:"AllowPrivilegedModeForRegularUsers"`
|
|
|
|
AllowVolumeBrowserForRegularUsers bool `json:"AllowVolumeBrowserForRegularUsers"`
|
|
|
|
AllowHostNamespaceForRegularUsers bool `json:"AllowHostNamespaceForRegularUsers"`
|
|
|
|
AllowDeviceMappingForRegularUsers bool `json:"AllowDeviceMappingForRegularUsers"`
|
|
|
|
AllowStackManagementForRegularUsers bool `json:"AllowStackManagementForRegularUsers"`
|
|
|
|
AllowContainerCapabilitiesForRegularUsers bool `json:"AllowContainerCapabilitiesForRegularUsers"`
|
|
|
|
SnapshotInterval string `json:"SnapshotInterval"`
|
|
|
|
TemplatesURL string `json:"TemplatesURL"`
|
|
|
|
EnableHostManagementFeatures bool `json:"EnableHostManagementFeatures"`
|
|
|
|
EdgeAgentCheckinInterval int `json:"EdgeAgentCheckinInterval"`
|
|
|
|
EnableEdgeComputeFeatures bool `json:"EnableEdgeComputeFeatures"`
|
|
|
|
UserSessionTimeout string `json:"UserSessionTimeout"`
|
2020-08-06 22:46:25 +00:00
|
|
|
EnableTelemetry bool `json:"EnableTelemetry"`
|
2020-04-08 21:26:11 +00:00
|
|
|
|
|
|
|
// Deprecated fields
|
|
|
|
DisplayDonationHeader bool
|
|
|
|
DisplayExternalContributors bool
|
2018-05-28 14:40:33 +00:00
|
|
|
}
|
|
|
|
|
2020-07-05 23:21:03 +00:00
|
|
|
// SnapshotJob represents a scheduled job that can create endpoint snapshots
|
|
|
|
SnapshotJob struct{}
|
2018-07-11 08:39:20 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// Stack represents a Docker stack created via docker stack deploy
|
|
|
|
Stack struct {
|
|
|
|
ID StackID `json:"Id"`
|
|
|
|
Name string `json:"Name"`
|
|
|
|
Type StackType `json:"Type"`
|
|
|
|
EndpointID EndpointID `json:"EndpointId"`
|
|
|
|
SwarmID string `json:"SwarmId"`
|
|
|
|
EntryPoint string `json:"EntryPoint"`
|
|
|
|
Env []Pair `json:"Env"`
|
|
|
|
ResourceControl *ResourceControl `json:"ResourceControl"`
|
2020-08-03 22:18:53 +00:00
|
|
|
Status StackStatus `json:"Status"`
|
2020-04-08 21:26:11 +00:00
|
|
|
ProjectPath string
|
|
|
|
}
|
2018-06-15 07:18:25 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// StackID represents a stack identifier (it must be composed of Name + "_" + SwarmID to create a unique identifier)
|
|
|
|
StackID int
|
2019-05-24 06:04:58 +00:00
|
|
|
|
2020-08-03 22:18:53 +00:00
|
|
|
// StackStatus represent a status for a stack
|
|
|
|
StackStatus int
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// StackType represents the type of the stack (compose v2, stack deploy v3)
|
|
|
|
StackType int
|
2020-03-29 09:54:14 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// Status represents the application status
|
|
|
|
Status struct {
|
2020-08-06 22:46:25 +00:00
|
|
|
Version string `json:"Version"`
|
2018-04-26 16:08:46 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// Tag represents a tag that can be associated to a resource
|
|
|
|
Tag struct {
|
2020-05-14 02:14:28 +00:00
|
|
|
ID TagID
|
|
|
|
Name string `json:"Name"`
|
|
|
|
Endpoints map[EndpointID]bool `json:"Endpoints"`
|
|
|
|
EndpointGroups map[EndpointGroupID]bool `json:"EndpointGroups"`
|
2018-02-23 02:10:26 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TagID represents a tag identifier
|
|
|
|
TagID int
|
2017-05-23 18:56:10 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// Team represents a list of user accounts
|
|
|
|
Team struct {
|
|
|
|
ID TeamID `json:"Id"`
|
|
|
|
Name string `json:"Name"`
|
2017-03-12 16:24:15 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TeamAccessPolicies represent the association of an access policy and a team
|
|
|
|
TeamAccessPolicies map[TeamID]AccessPolicy
|
2017-03-12 16:24:15 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TeamID represents a team identifier
|
|
|
|
TeamID int
|
|
|
|
|
|
|
|
// TeamMembership represents a membership association between a user and a team
|
|
|
|
TeamMembership struct {
|
|
|
|
ID TeamMembershipID `json:"Id"`
|
|
|
|
UserID UserID `json:"UserID"`
|
|
|
|
TeamID TeamID `json:"TeamID"`
|
|
|
|
Role MembershipRole `json:"Role"`
|
2017-05-23 18:56:10 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TeamMembershipID represents a team membership identifier
|
|
|
|
TeamMembershipID int
|
|
|
|
|
2018-08-21 18:40:42 +00:00
|
|
|
// TeamResourceAccess represents the level of control on a resource for a specific team
|
2017-05-23 18:56:10 +00:00
|
|
|
TeamResourceAccess struct {
|
|
|
|
TeamID TeamID `json:"TeamId"`
|
|
|
|
AccessLevel ResourceAccessLevel `json:"AccessLevel"`
|
|
|
|
}
|
|
|
|
|
2020-04-15 05:49:34 +00:00
|
|
|
// Template represents an application template that can be used as an App Template
|
|
|
|
// or an Edge template
|
2018-07-03 18:31:02 +00:00
|
|
|
Template struct {
|
|
|
|
// Mandatory container/stack fields
|
|
|
|
ID TemplateID `json:"Id"`
|
|
|
|
Type TemplateType `json:"type"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
AdministratorOnly bool `json:"administrator_only"`
|
|
|
|
|
|
|
|
// Mandatory container fields
|
|
|
|
Image string `json:"image"`
|
|
|
|
|
|
|
|
// Mandatory stack fields
|
|
|
|
Repository TemplateRepository `json:"repository"`
|
|
|
|
|
2020-04-15 05:49:34 +00:00
|
|
|
// Mandatory Edge stack fields
|
2020-05-14 02:14:28 +00:00
|
|
|
StackFile string `json:"stackFile"`
|
|
|
|
|
2018-07-03 18:31:02 +00:00
|
|
|
// Optional stack/container fields
|
|
|
|
Name string `json:"name,omitempty"`
|
|
|
|
Logo string `json:"logo,omitempty"`
|
|
|
|
Env []TemplateEnv `json:"env,omitempty"`
|
|
|
|
Note string `json:"note,omitempty"`
|
|
|
|
Platform string `json:"platform,omitempty"`
|
|
|
|
Categories []string `json:"categories,omitempty"`
|
|
|
|
|
|
|
|
// Optional container fields
|
|
|
|
Registry string `json:"registry,omitempty"`
|
|
|
|
Command string `json:"command,omitempty"`
|
|
|
|
Network string `json:"network,omitempty"`
|
|
|
|
Volumes []TemplateVolume `json:"volumes,omitempty"`
|
|
|
|
Ports []string `json:"ports,omitempty"`
|
|
|
|
Labels []Pair `json:"labels,omitempty"`
|
|
|
|
Privileged bool `json:"privileged,omitempty"`
|
|
|
|
Interactive bool `json:"interactive,omitempty"`
|
|
|
|
RestartPolicy string `json:"restart_policy,omitempty"`
|
|
|
|
Hostname string `json:"hostname,omitempty"`
|
|
|
|
}
|
|
|
|
|
2018-08-21 18:40:42 +00:00
|
|
|
// TemplateEnv represents a template environment variable configuration
|
2018-07-03 18:31:02 +00:00
|
|
|
TemplateEnv struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Label string `json:"label,omitempty"`
|
|
|
|
Description string `json:"description,omitempty"`
|
|
|
|
Default string `json:"default,omitempty"`
|
|
|
|
Preset bool `json:"preset,omitempty"`
|
|
|
|
Select []TemplateEnvSelect `json:"select,omitempty"`
|
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TemplateEnvSelect represents text/value pair that will be displayed as a choice for the
|
|
|
|
// template user
|
|
|
|
TemplateEnvSelect struct {
|
|
|
|
Text string `json:"text"`
|
|
|
|
Value string `json:"value"`
|
|
|
|
Default bool `json:"default"`
|
2018-07-03 18:31:02 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TemplateID represents a template identifier
|
|
|
|
TemplateID int
|
|
|
|
|
2018-08-21 18:40:42 +00:00
|
|
|
// TemplateRepository represents the git repository configuration for a template
|
2018-07-03 18:31:02 +00:00
|
|
|
TemplateRepository struct {
|
|
|
|
URL string `json:"url"`
|
|
|
|
StackFile string `json:"stackfile"`
|
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TemplateType represents the type of a template
|
|
|
|
TemplateType int
|
|
|
|
|
|
|
|
// TemplateVolume represents a template volume configuration
|
|
|
|
TemplateVolume struct {
|
|
|
|
Container string `json:"container"`
|
|
|
|
Bind string `json:"bind,omitempty"`
|
|
|
|
ReadOnly bool `json:"readonly,omitempty"`
|
2018-07-03 18:31:02 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TLSConfiguration represents a TLS configuration
|
|
|
|
TLSConfiguration struct {
|
|
|
|
TLS bool `json:"TLS"`
|
|
|
|
TLSSkipVerify bool `json:"TLSSkipVerify"`
|
|
|
|
TLSCACertPath string `json:"TLSCACert,omitempty"`
|
|
|
|
TLSCertPath string `json:"TLSCert,omitempty"`
|
|
|
|
TLSKeyPath string `json:"TLSKey,omitempty"`
|
|
|
|
}
|
2017-03-12 16:24:15 +00:00
|
|
|
|
2016-12-25 20:34:02 +00:00
|
|
|
// TLSFileType represents a type of TLS file required to connect to a Docker endpoint.
|
2018-08-21 18:40:42 +00:00
|
|
|
// It can be either a TLS CA file, a TLS certificate file or a TLS key file
|
2016-12-25 20:34:02 +00:00
|
|
|
TLSFileType int
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TokenData represents the data embedded in a JWT token
|
|
|
|
TokenData struct {
|
|
|
|
ID UserID
|
|
|
|
Username string
|
|
|
|
Role UserRole
|
2018-12-09 03:49:27 +00:00
|
|
|
}
|
|
|
|
|
2019-07-25 22:38:07 +00:00
|
|
|
// TunnelDetails represents information associated to a tunnel
|
|
|
|
TunnelDetails struct {
|
|
|
|
Status string
|
|
|
|
LastActivity time.Time
|
|
|
|
Port int
|
2020-06-25 03:25:51 +00:00
|
|
|
Jobs []EdgeJob
|
2019-07-25 22:38:07 +00:00
|
|
|
Credentials string
|
|
|
|
}
|
|
|
|
|
|
|
|
// TunnelServerInfo represents information associated to the tunnel server
|
|
|
|
TunnelServerInfo struct {
|
|
|
|
PrivateKeySeed string `json:"PrivateKeySeed"`
|
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// User represents a user account
|
|
|
|
User struct {
|
2020-08-11 05:41:37 +00:00
|
|
|
ID UserID `json:"Id"`
|
|
|
|
Username string `json:"Username"`
|
|
|
|
Password string `json:"Password,omitempty"`
|
|
|
|
Role UserRole `json:"Role"`
|
|
|
|
|
|
|
|
// Deprecated fields
|
|
|
|
// Deprecated in DBVersion == 25
|
2020-04-08 21:26:11 +00:00
|
|
|
PortainerAuthorizations Authorizations `json:"PortainerAuthorizations"`
|
|
|
|
EndpointAuthorizations EndpointAuthorizations `json:"EndpointAuthorizations"`
|
2016-12-18 05:21:29 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// UserAccessPolicies represent the association of an access policy and a user
|
|
|
|
UserAccessPolicies map[UserID]AccessPolicy
|
2016-12-18 05:21:29 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// UserID represents a user identifier
|
|
|
|
UserID int
|
|
|
|
|
|
|
|
// UserResourceAccess represents the level of control on a resource for a specific user
|
|
|
|
UserResourceAccess struct {
|
|
|
|
UserID UserID `json:"UserId"`
|
|
|
|
AccessLevel ResourceAccessLevel `json:"AccessLevel"`
|
2016-12-18 05:21:29 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// UserRole represents the role of a user. It can be either an administrator
|
|
|
|
// or a regular user
|
|
|
|
UserRole int
|
|
|
|
|
|
|
|
// Webhook represents a url webhook that can be used to update a service
|
|
|
|
Webhook struct {
|
|
|
|
ID WebhookID `json:"Id"`
|
|
|
|
Token string `json:"Token"`
|
|
|
|
ResourceID string `json:"ResourceId"`
|
|
|
|
EndpointID EndpointID `json:"EndpointId"`
|
|
|
|
WebhookType WebhookType `json:"Type"`
|
2016-12-18 05:21:29 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// WebhookID represents a webhook identifier.
|
|
|
|
WebhookID int
|
|
|
|
|
|
|
|
// WebhookType represents the type of resource a webhook is related to
|
|
|
|
WebhookType int
|
|
|
|
|
2020-07-05 23:21:03 +00:00
|
|
|
// CLIService represents a service for managing CLI
|
|
|
|
CLIService interface {
|
|
|
|
ParseFlags(version string) (*CLIFlags, error)
|
|
|
|
ValidateFlags(flags *CLIFlags) error
|
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// ComposeStackManager represents a service to manage Compose stacks
|
|
|
|
ComposeStackManager interface {
|
|
|
|
Up(stack *Stack, endpoint *Endpoint) error
|
|
|
|
Down(stack *Stack, endpoint *Endpoint) error
|
2019-05-24 06:04:58 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// CryptoService represents a service for encrypting/hashing data
|
|
|
|
CryptoService interface {
|
|
|
|
Hash(data string) (string, error)
|
|
|
|
CompareHashAndData(hash string, data string) error
|
2017-05-23 18:56:10 +00:00
|
|
|
}
|
|
|
|
|
2020-07-06 23:18:39 +00:00
|
|
|
// CustomTemplateService represents a service to manage custom templates
|
|
|
|
CustomTemplateService interface {
|
|
|
|
GetNextIdentifier() int
|
|
|
|
CustomTemplates() ([]CustomTemplate, error)
|
|
|
|
CustomTemplate(ID CustomTemplateID) (*CustomTemplate, error)
|
|
|
|
CreateCustomTemplate(customTemplate *CustomTemplate) error
|
|
|
|
UpdateCustomTemplate(ID CustomTemplateID, customTemplate *CustomTemplate) error
|
|
|
|
DeleteCustomTemplate(ID CustomTemplateID) error
|
|
|
|
}
|
|
|
|
|
2020-07-05 23:21:03 +00:00
|
|
|
// DataStore defines the interface to manage the data
|
|
|
|
DataStore interface {
|
|
|
|
Open() error
|
|
|
|
Init() error
|
|
|
|
Close() error
|
|
|
|
IsNew() bool
|
|
|
|
MigrateData() error
|
|
|
|
|
|
|
|
DockerHub() DockerHubService
|
2020-07-06 23:18:39 +00:00
|
|
|
CustomTemplate() CustomTemplateService
|
2020-07-05 23:21:03 +00:00
|
|
|
EdgeGroup() EdgeGroupService
|
|
|
|
EdgeJob() EdgeJobService
|
|
|
|
EdgeStack() EdgeStackService
|
|
|
|
Endpoint() EndpointService
|
|
|
|
EndpointGroup() EndpointGroupService
|
|
|
|
EndpointRelation() EndpointRelationService
|
|
|
|
Registry() RegistryService
|
|
|
|
ResourceControl() ResourceControlService
|
|
|
|
Role() RoleService
|
|
|
|
Settings() SettingsService
|
|
|
|
Stack() StackService
|
|
|
|
Tag() TagService
|
|
|
|
TeamMembership() TeamMembershipService
|
|
|
|
Team() TeamService
|
|
|
|
TunnelServer() TunnelServerService
|
|
|
|
User() UserService
|
|
|
|
Version() VersionService
|
|
|
|
Webhook() WebhookService
|
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// DigitalSignatureService represents a service to manage digital signatures
|
|
|
|
DigitalSignatureService interface {
|
|
|
|
ParseKeyPair(private, public []byte) error
|
|
|
|
GenerateKeyPair() ([]byte, []byte, error)
|
|
|
|
EncodedPublicKey() string
|
|
|
|
PEMHeaders() (string, string)
|
|
|
|
CreateSignature(message string) (string, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
// DockerHubService represents a service for managing the DockerHub object
|
|
|
|
DockerHubService interface {
|
|
|
|
DockerHub() (*DockerHub, error)
|
|
|
|
UpdateDockerHub(registry *DockerHub) error
|
2017-05-23 18:56:10 +00:00
|
|
|
}
|
|
|
|
|
2020-07-05 23:21:03 +00:00
|
|
|
// DockerSnapshotter represents a service used to create Docker endpoint snapshots
|
|
|
|
DockerSnapshotter interface {
|
|
|
|
CreateSnapshot(endpoint *Endpoint) (*DockerSnapshot, error)
|
|
|
|
}
|
|
|
|
|
2020-06-25 03:25:51 +00:00
|
|
|
// EdgeGroupService represents a service to manage Edge groups
|
|
|
|
EdgeGroupService interface {
|
|
|
|
EdgeGroups() ([]EdgeGroup, error)
|
|
|
|
EdgeGroup(ID EdgeGroupID) (*EdgeGroup, error)
|
|
|
|
CreateEdgeGroup(group *EdgeGroup) error
|
|
|
|
UpdateEdgeGroup(ID EdgeGroupID, group *EdgeGroup) error
|
|
|
|
DeleteEdgeGroup(ID EdgeGroupID) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// EdgeJobService represents a service to manage Edge jobs
|
|
|
|
EdgeJobService interface {
|
|
|
|
EdgeJobs() ([]EdgeJob, error)
|
|
|
|
EdgeJob(ID EdgeJobID) (*EdgeJob, error)
|
|
|
|
CreateEdgeJob(edgeJob *EdgeJob) error
|
|
|
|
UpdateEdgeJob(ID EdgeJobID, edgeJob *EdgeJob) error
|
|
|
|
DeleteEdgeJob(ID EdgeJobID) error
|
|
|
|
GetNextIdentifier() int
|
|
|
|
}
|
|
|
|
|
|
|
|
// EdgeStackService represents a service to manage Edge stacks
|
|
|
|
EdgeStackService interface {
|
|
|
|
EdgeStacks() ([]EdgeStack, error)
|
|
|
|
EdgeStack(ID EdgeStackID) (*EdgeStack, error)
|
|
|
|
CreateEdgeStack(edgeStack *EdgeStack) error
|
|
|
|
UpdateEdgeStack(ID EdgeStackID, edgeStack *EdgeStack) error
|
|
|
|
DeleteEdgeStack(ID EdgeStackID) error
|
|
|
|
GetNextIdentifier() int
|
|
|
|
}
|
|
|
|
|
2018-08-21 18:40:42 +00:00
|
|
|
// EndpointService represents a service for managing endpoint data
|
2016-12-25 20:34:02 +00:00
|
|
|
EndpointService interface {
|
|
|
|
Endpoint(ID EndpointID) (*Endpoint, error)
|
|
|
|
Endpoints() ([]Endpoint, error)
|
|
|
|
CreateEndpoint(endpoint *Endpoint) error
|
|
|
|
UpdateEndpoint(ID EndpointID, endpoint *Endpoint) error
|
|
|
|
DeleteEndpoint(ID EndpointID) error
|
2017-02-06 05:29:34 +00:00
|
|
|
Synchronize(toCreate, toUpdate, toDelete []*Endpoint) error
|
2018-07-24 12:47:19 +00:00
|
|
|
GetNextIdentifier() int
|
2016-12-25 20:34:02 +00:00
|
|
|
}
|
|
|
|
|
2018-08-21 18:40:42 +00:00
|
|
|
// EndpointGroupService represents a service for managing endpoint group data
|
2018-04-26 16:08:46 +00:00
|
|
|
EndpointGroupService interface {
|
|
|
|
EndpointGroup(ID EndpointGroupID) (*EndpointGroup, error)
|
|
|
|
EndpointGroups() ([]EndpointGroup, error)
|
|
|
|
CreateEndpointGroup(group *EndpointGroup) error
|
|
|
|
UpdateEndpointGroup(ID EndpointGroupID, group *EndpointGroup) error
|
|
|
|
DeleteEndpointGroup(ID EndpointGroupID) error
|
|
|
|
}
|
|
|
|
|
2020-05-14 02:14:28 +00:00
|
|
|
// EndpointRelationService represents a service for managing endpoint relations data
|
|
|
|
EndpointRelationService interface {
|
|
|
|
EndpointRelation(EndpointID EndpointID) (*EndpointRelation, error)
|
|
|
|
CreateEndpointRelation(endpointRelation *EndpointRelation) error
|
|
|
|
UpdateEndpointRelation(EndpointID EndpointID, endpointRelation *EndpointRelation) error
|
|
|
|
DeleteEndpointRelation(EndpointID EndpointID) error
|
|
|
|
}
|
|
|
|
|
2018-08-21 18:40:42 +00:00
|
|
|
// FileService represents a service for managing files
|
2016-12-25 20:34:02 +00:00
|
|
|
FileService interface {
|
2018-07-03 18:31:02 +00:00
|
|
|
GetFileContent(filePath string) ([]byte, error)
|
2018-06-18 10:07:56 +00:00
|
|
|
Rename(oldPath, newPath string) error
|
2017-10-15 17:24:40 +00:00
|
|
|
RemoveDirectory(directoryPath string) error
|
2018-06-11 13:13:19 +00:00
|
|
|
StoreTLSFileFromBytes(folder string, fileType TLSFileType, data []byte) (string, error)
|
2017-08-10 08:35:23 +00:00
|
|
|
GetPathForTLSFile(folder string, fileType TLSFileType) (string, error)
|
2017-09-14 06:08:37 +00:00
|
|
|
DeleteTLSFile(folder string, fileType TLSFileType) error
|
2017-08-10 08:35:23 +00:00
|
|
|
DeleteTLSFiles(folder string) error
|
2017-10-15 17:24:40 +00:00
|
|
|
GetStackProjectPath(stackIdentifier string) string
|
2018-06-11 13:13:19 +00:00
|
|
|
StoreStackFileFromBytes(stackIdentifier, fileName string, data []byte) (string, error)
|
2020-05-14 02:14:28 +00:00
|
|
|
GetEdgeStackProjectPath(edgeStackIdentifier string) string
|
|
|
|
StoreEdgeStackFileFromBytes(edgeStackIdentifier, fileName string, data []byte) (string, error)
|
2018-12-09 03:49:27 +00:00
|
|
|
StoreRegistryManagementFileFromBytes(folder, fileName string, data []byte) (string, error)
|
2018-05-06 07:15:57 +00:00
|
|
|
KeyPairFilesExist() (bool, error)
|
|
|
|
StoreKeyPair(private, public []byte, privatePEMHeader, publicPEMHeader string) error
|
|
|
|
LoadKeyPair() ([]byte, []byte, error)
|
|
|
|
WriteJSONToFile(path string, content interface{}) error
|
2018-06-19 11:15:10 +00:00
|
|
|
FileExists(path string) (bool, error)
|
2020-06-25 03:25:51 +00:00
|
|
|
StoreEdgeJobFileFromBytes(identifier string, data []byte) (string, error)
|
|
|
|
GetEdgeJobFolder(identifier string) string
|
|
|
|
ClearEdgeJobTaskLogs(edgeJobID, taskID string) error
|
|
|
|
GetEdgeJobTaskLogFileContent(edgeJobID, taskID string) (string, error)
|
|
|
|
StoreEdgeJobTaskLogFileFromBytes(edgeJobID, taskID string, data []byte) error
|
2018-12-09 03:49:27 +00:00
|
|
|
GetBinaryFolder() string
|
2020-07-06 23:18:39 +00:00
|
|
|
StoreCustomTemplateFileFromBytes(identifier, fileName string, data []byte) (string, error)
|
|
|
|
GetCustomTemplateProjectPath(identifier string) string
|
|
|
|
GetTemporaryPath() (string, error)
|
2017-10-15 17:24:40 +00:00
|
|
|
}
|
|
|
|
|
2018-08-21 18:40:42 +00:00
|
|
|
// GitService represents a service for managing Git
|
2017-10-15 17:24:40 +00:00
|
|
|
GitService interface {
|
2018-07-24 14:11:35 +00:00
|
|
|
ClonePublicRepository(repositoryURL, referenceName string, destination string) error
|
|
|
|
ClonePrivateRepositoryWithBasicAuth(repositoryURL, referenceName string, destination, username, password string) error
|
2016-12-25 20:34:02 +00:00
|
|
|
}
|
2017-02-06 05:29:34 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// JWTService represents a service for managing JWT tokens
|
|
|
|
JWTService interface {
|
|
|
|
GenerateToken(data *TokenData) (string, error)
|
|
|
|
ParseAndVerifyToken(token string) (*TokenData, error)
|
2020-06-09 09:55:36 +00:00
|
|
|
SetUserSessionDuration(userSessionDuration time.Duration)
|
2017-02-06 05:29:34 +00:00
|
|
|
}
|
2017-08-10 08:35:23 +00:00
|
|
|
|
2020-07-05 23:21:03 +00:00
|
|
|
// KubeClient represents a service used to query a Kubernetes environment
|
|
|
|
KubeClient interface {
|
2020-08-04 04:01:15 +00:00
|
|
|
SetupUserServiceAccount(userID int, teamIDs []int) error
|
|
|
|
GetServiceAccountBearerToken(userID int) (string, error)
|
2020-07-05 23:21:03 +00:00
|
|
|
StartExecProcess(namespace, podName, containerName string, command []string, stdin io.Reader, stdout io.Writer) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// KubernetesDeployer represents a service to deploy a manifest inside a Kubernetes endpoint
|
|
|
|
KubernetesDeployer interface {
|
|
|
|
Deploy(endpoint *Endpoint, data string, composeFormat bool, namespace string) ([]byte, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
// KubernetesSnapshotter represents a service used to create Kubernetes endpoint snapshots
|
|
|
|
KubernetesSnapshotter interface {
|
|
|
|
CreateSnapshot(endpoint *Endpoint) (*KubernetesSnapshot, error)
|
|
|
|
}
|
|
|
|
|
2018-08-21 18:40:42 +00:00
|
|
|
// LDAPService represents a service used to authenticate users against a LDAP/AD
|
2017-08-10 08:35:23 +00:00
|
|
|
LDAPService interface {
|
|
|
|
AuthenticateUser(username, password string, settings *LDAPSettings) error
|
|
|
|
TestConnectivity(settings *LDAPSettings) error
|
2018-07-23 04:57:38 +00:00
|
|
|
GetUserGroups(username string, settings *LDAPSettings) ([]string, error)
|
2017-08-10 08:35:23 +00:00
|
|
|
}
|
2017-10-15 17:24:40 +00:00
|
|
|
|
2020-08-05 08:36:46 +00:00
|
|
|
// OAuthService represents a service used to authenticate users using OAuth
|
|
|
|
OAuthService interface {
|
|
|
|
Authenticate(code string, configuration *OAuthSettings) (string, error)
|
|
|
|
}
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// RegistryService represents a service for managing registry data
|
|
|
|
RegistryService interface {
|
|
|
|
Registry(ID RegistryID) (*Registry, error)
|
|
|
|
Registries() ([]Registry, error)
|
|
|
|
CreateRegistry(registry *Registry) error
|
|
|
|
UpdateRegistry(ID RegistryID, registry *Registry) error
|
|
|
|
DeleteRegistry(ID RegistryID) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// ResourceControlService represents a service for managing resource control data
|
|
|
|
ResourceControlService interface {
|
|
|
|
ResourceControl(ID ResourceControlID) (*ResourceControl, error)
|
|
|
|
ResourceControlByResourceIDAndType(resourceID string, resourceType ResourceControlType) (*ResourceControl, error)
|
|
|
|
ResourceControls() ([]ResourceControl, error)
|
|
|
|
CreateResourceControl(rc *ResourceControl) error
|
|
|
|
UpdateResourceControl(ID ResourceControlID, resourceControl *ResourceControl) error
|
|
|
|
DeleteResourceControl(ID ResourceControlID) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// ReverseTunnelService represensts a service used to manage reverse tunnel connections.
|
|
|
|
ReverseTunnelService interface {
|
2020-07-05 23:21:03 +00:00
|
|
|
StartTunnelServer(addr, port string, snapshotService SnapshotService) error
|
2020-04-08 21:26:11 +00:00
|
|
|
GenerateEdgeKey(url, host string, endpointIdentifier int) string
|
|
|
|
SetTunnelStatusToActive(endpointID EndpointID)
|
|
|
|
SetTunnelStatusToRequired(endpointID EndpointID) error
|
|
|
|
SetTunnelStatusToIdle(endpointID EndpointID)
|
|
|
|
GetTunnelDetails(endpointID EndpointID) *TunnelDetails
|
2020-06-25 03:25:51 +00:00
|
|
|
AddEdgeJob(endpointID EndpointID, edgeJob *EdgeJob)
|
|
|
|
RemoveEdgeJob(edgeJobID EdgeJobID)
|
2020-04-08 21:26:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// RoleService represents a service for managing user roles
|
|
|
|
RoleService interface {
|
|
|
|
Role(ID RoleID) (*Role, error)
|
|
|
|
Roles() ([]Role, error)
|
|
|
|
CreateRole(role *Role) error
|
|
|
|
UpdateRole(ID RoleID, role *Role) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// SettingsService represents a service for managing application settings
|
|
|
|
SettingsService interface {
|
|
|
|
Settings() (*Settings, error)
|
|
|
|
UpdateSettings(settings *Settings) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Server defines the interface to serve the API
|
|
|
|
Server interface {
|
|
|
|
Start() error
|
|
|
|
}
|
|
|
|
|
|
|
|
// StackService represents a service for managing stack data
|
|
|
|
StackService interface {
|
|
|
|
Stack(ID StackID) (*Stack, error)
|
|
|
|
StackByName(name string) (*Stack, error)
|
|
|
|
Stacks() ([]Stack, error)
|
|
|
|
CreateStack(stack *Stack) error
|
|
|
|
UpdateStack(ID StackID, stack *Stack) error
|
|
|
|
DeleteStack(ID StackID) error
|
|
|
|
GetNextIdentifier() int
|
|
|
|
}
|
|
|
|
|
2020-07-05 23:21:03 +00:00
|
|
|
// StackService represents a service for managing endpoint snapshots
|
|
|
|
SnapshotService interface {
|
|
|
|
Start()
|
|
|
|
SetSnapshotInterval(snapshotInterval string) error
|
|
|
|
SnapshotEndpoint(endpoint *Endpoint) error
|
|
|
|
}
|
|
|
|
|
2018-08-21 18:40:42 +00:00
|
|
|
// SwarmStackManager represents a service to manage Swarm stacks
|
2018-06-11 13:13:19 +00:00
|
|
|
SwarmStackManager interface {
|
2018-02-07 07:37:01 +00:00
|
|
|
Login(dockerhub *DockerHub, registries []Registry, endpoint *Endpoint)
|
2017-10-26 12:22:09 +00:00
|
|
|
Logout(endpoint *Endpoint) error
|
2018-01-20 17:05:01 +00:00
|
|
|
Deploy(stack *Stack, prune bool, endpoint *Endpoint) error
|
2017-10-15 17:24:40 +00:00
|
|
|
Remove(stack *Stack, endpoint *Endpoint) error
|
|
|
|
}
|
2018-06-11 13:13:19 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TagService represents a service for managing tag data
|
|
|
|
TagService interface {
|
|
|
|
Tags() ([]Tag, error)
|
|
|
|
Tag(ID TagID) (*Tag, error)
|
|
|
|
CreateTag(tag *Tag) error
|
2020-05-14 02:14:28 +00:00
|
|
|
UpdateTag(ID TagID, tag *Tag) error
|
2020-04-08 21:26:11 +00:00
|
|
|
DeleteTag(ID TagID) error
|
2018-06-11 13:13:19 +00:00
|
|
|
}
|
2018-10-22 21:03:30 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TeamService represents a service for managing user data
|
|
|
|
TeamService interface {
|
|
|
|
Team(ID TeamID) (*Team, error)
|
|
|
|
TeamByName(name string) (*Team, error)
|
|
|
|
Teams() ([]Team, error)
|
|
|
|
CreateTeam(team *Team) error
|
|
|
|
UpdateTeam(ID TeamID, team *Team) error
|
|
|
|
DeleteTeam(ID TeamID) error
|
2018-10-22 21:03:30 +00:00
|
|
|
}
|
2018-12-09 03:49:27 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TeamMembershipService represents a service for managing team membership data
|
|
|
|
TeamMembershipService interface {
|
|
|
|
TeamMembership(ID TeamMembershipID) (*TeamMembership, error)
|
|
|
|
TeamMemberships() ([]TeamMembership, error)
|
|
|
|
TeamMembershipsByUserID(userID UserID) ([]TeamMembership, error)
|
|
|
|
TeamMembershipsByTeamID(teamID TeamID) ([]TeamMembership, error)
|
|
|
|
CreateTeamMembership(membership *TeamMembership) error
|
|
|
|
UpdateTeamMembership(ID TeamMembershipID, membership *TeamMembership) error
|
|
|
|
DeleteTeamMembership(ID TeamMembershipID) error
|
|
|
|
DeleteTeamMembershipByUserID(userID UserID) error
|
|
|
|
DeleteTeamMembershipByTeamID(teamID TeamID) error
|
2018-12-09 03:49:27 +00:00
|
|
|
}
|
2019-07-25 22:38:07 +00:00
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
// TunnelServerService represents a service for managing data associated to the tunnel server
|
|
|
|
TunnelServerService interface {
|
|
|
|
Info() (*TunnelServerInfo, error)
|
|
|
|
UpdateInfo(info *TunnelServerInfo) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// UserService represents a service for managing user data
|
|
|
|
UserService interface {
|
|
|
|
User(ID UserID) (*User, error)
|
|
|
|
UserByUsername(username string) (*User, error)
|
|
|
|
Users() ([]User, error)
|
|
|
|
UsersByRole(role UserRole) ([]User, error)
|
|
|
|
CreateUser(user *User) error
|
|
|
|
UpdateUser(ID UserID, user *User) error
|
|
|
|
DeleteUser(ID UserID) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// VersionService represents a service for managing version data
|
|
|
|
VersionService interface {
|
|
|
|
DBVersion() (int, error)
|
|
|
|
StoreDBVersion(version int) error
|
2020-08-12 05:10:28 +00:00
|
|
|
InstanceID() (string, error)
|
|
|
|
StoreInstanceID(ID string) error
|
2020-04-08 21:26:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// WebhookService represents a service for managing webhook data.
|
|
|
|
WebhookService interface {
|
|
|
|
Webhooks() ([]Webhook, error)
|
|
|
|
Webhook(ID WebhookID) (*Webhook, error)
|
|
|
|
CreateWebhook(portainer *Webhook) error
|
|
|
|
WebhookByResourceID(resourceID string) (*Webhook, error)
|
|
|
|
WebhookByToken(token string) (*Webhook, error)
|
|
|
|
DeleteWebhook(serviceID WebhookID) error
|
2019-07-25 22:38:07 +00:00
|
|
|
}
|
2016-12-18 05:21:29 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2018-08-21 18:40:42 +00:00
|
|
|
// APIVersion is the version number of the Portainer API
|
2020-08-27 05:48:02 +00:00
|
|
|
APIVersion = "2.0.0"
|
2018-08-21 18:40:42 +00:00
|
|
|
// DBVersion is the version number of the Portainer database
|
2020-07-24 23:10:46 +00:00
|
|
|
DBVersion = 25
|
2018-12-11 20:46:05 +00:00
|
|
|
// AssetsServerURL represents the URL of the Portainer asset server
|
|
|
|
AssetsServerURL = "https://portainer-io-assets.sfo2.digitaloceanspaces.com"
|
2018-08-21 18:40:42 +00:00
|
|
|
// MessageOfTheDayURL represents the URL where Portainer MOTD message can be retrieved
|
2019-06-02 06:16:43 +00:00
|
|
|
MessageOfTheDayURL = AssetsServerURL + "/motd.json"
|
2019-09-25 20:38:11 +00:00
|
|
|
// VersionCheckURL represents the URL used to retrieve the latest version of Portainer
|
|
|
|
VersionCheckURL = "https://api.github.com/repos/portainer/portainer/releases/latest"
|
2018-05-06 07:15:57 +00:00
|
|
|
// PortainerAgentHeader represents the name of the header available in any agent response
|
|
|
|
PortainerAgentHeader = "Portainer-Agent"
|
2019-07-25 22:38:07 +00:00
|
|
|
// PortainerAgentEdgeIDHeader represent the name of the header containing the Edge ID associated to an agent/agent cluster
|
|
|
|
PortainerAgentEdgeIDHeader = "X-PortainerAgent-EdgeID"
|
2020-08-04 00:44:17 +00:00
|
|
|
// HTTPResponseAgentPlatform represents the name of the header containing the Agent platform
|
|
|
|
HTTPResponseAgentPlatform = "Portainer-Agent-Platform"
|
2018-08-21 18:40:42 +00:00
|
|
|
// PortainerAgentTargetHeader represent the name of the header containing the target node name
|
2018-05-06 07:15:57 +00:00
|
|
|
PortainerAgentTargetHeader = "X-PortainerAgent-Target"
|
|
|
|
// PortainerAgentSignatureHeader represent the name of the header containing the digital signature
|
|
|
|
PortainerAgentSignatureHeader = "X-PortainerAgent-Signature"
|
|
|
|
// PortainerAgentPublicKeyHeader represent the name of the header containing the public key
|
|
|
|
PortainerAgentPublicKeyHeader = "X-PortainerAgent-PublicKey"
|
2020-07-05 23:21:03 +00:00
|
|
|
// PortainerAgentKubernetesSATokenHeader represent the name of the header containing a Kubernetes SA token
|
|
|
|
PortainerAgentKubernetesSATokenHeader = "X-PortainerAgent-SA-Token"
|
2018-05-06 07:15:57 +00:00
|
|
|
// PortainerAgentSignatureMessage represents the message used to create a digital signature
|
|
|
|
// to be used when communicating with an agent
|
|
|
|
PortainerAgentSignatureMessage = "Portainer-App"
|
2019-07-25 22:38:07 +00:00
|
|
|
// DefaultEdgeAgentCheckinIntervalInSeconds represents the default interval (in seconds) used by Edge agents to checkin with the Portainer instance
|
|
|
|
DefaultEdgeAgentCheckinIntervalInSeconds = 5
|
2020-04-15 05:49:34 +00:00
|
|
|
// DefaultTemplatesURL represents the URL to the official templates supported by Portainer
|
|
|
|
DefaultTemplatesURL = "https://raw.githubusercontent.com/portainer/templates/master/templates-2.0.json"
|
2020-06-09 09:55:36 +00:00
|
|
|
// DefaultUserSessionTimeout represents the default timeout after which the user session is cleared
|
|
|
|
DefaultUserSessionTimeout = "8h"
|
2016-12-18 05:21:29 +00:00
|
|
|
)
|
2016-12-25 20:34:02 +00:00
|
|
|
|
|
|
|
const (
|
2020-04-08 21:26:11 +00:00
|
|
|
_ AuthenticationMethod = iota
|
|
|
|
// AuthenticationInternal represents the internal authentication method (authentication against Portainer API)
|
|
|
|
AuthenticationInternal
|
|
|
|
// AuthenticationLDAP represents the LDAP authentication method (authentication against a LDAP server)
|
|
|
|
AuthenticationLDAP
|
|
|
|
//AuthenticationOAuth represents the OAuth authentication method (authentication against a authorization server)
|
|
|
|
AuthenticationOAuth
|
|
|
|
)
|
|
|
|
|
2020-08-04 00:44:17 +00:00
|
|
|
const (
|
|
|
|
_ AgentPlatform = iota
|
|
|
|
// AgentPlatformDocker represent the Docker platform (Standalone/Swarm)
|
|
|
|
AgentPlatformDocker
|
|
|
|
// AgentPlatformKubernetes represent the Kubernetes platform
|
|
|
|
AgentPlatformKubernetes
|
|
|
|
)
|
|
|
|
|
2020-06-25 03:25:51 +00:00
|
|
|
const (
|
|
|
|
_ EdgeJobLogsStatus = iota
|
|
|
|
// EdgeJobLogsStatusIdle represents an idle log collection job
|
|
|
|
EdgeJobLogsStatusIdle
|
|
|
|
// EdgeJobLogsStatusPending represents a pending log collection job
|
|
|
|
EdgeJobLogsStatusPending
|
|
|
|
// EdgeJobLogsStatusCollected represents a completed log collection job
|
|
|
|
EdgeJobLogsStatusCollected
|
|
|
|
)
|
|
|
|
|
2020-07-06 23:18:39 +00:00
|
|
|
const (
|
|
|
|
_ CustomTemplatePlatform = iota
|
|
|
|
// CustomTemplatePlatformLinux represents a custom template for linux
|
|
|
|
CustomTemplatePlatformLinux
|
|
|
|
// CustomTemplatePlatformWindows represents a custom template for windows
|
|
|
|
CustomTemplatePlatformWindows
|
|
|
|
)
|
|
|
|
|
2020-05-14 02:14:28 +00:00
|
|
|
const (
|
|
|
|
_ EdgeStackStatusType = iota
|
|
|
|
//StatusOk represents a successfully deployed edge stack
|
|
|
|
StatusOk
|
|
|
|
//StatusError represents an edge endpoint which failed to deploy its edge stack
|
|
|
|
StatusError
|
|
|
|
//StatusAcknowledged represents an acknowledged edge stack
|
|
|
|
StatusAcknowledged
|
|
|
|
)
|
|
|
|
|
2020-04-08 21:26:11 +00:00
|
|
|
const (
|
|
|
|
_ EndpointExtensionType = iota
|
|
|
|
// StoridgeEndpointExtension represents the Storidge extension
|
|
|
|
StoridgeEndpointExtension
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
_ EndpointStatus = iota
|
|
|
|
// EndpointStatusUp is used to represent an available endpoint
|
|
|
|
EndpointStatusUp
|
|
|
|
// EndpointStatusDown is used to represent an unavailable endpoint
|
|
|
|
EndpointStatusDown
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
_ EndpointType = iota
|
|
|
|
// DockerEnvironment represents an endpoint connected to a Docker environment
|
|
|
|
DockerEnvironment
|
|
|
|
// AgentOnDockerEnvironment represents an endpoint connected to a Portainer agent deployed on a Docker environment
|
|
|
|
AgentOnDockerEnvironment
|
2020-06-09 02:43:32 +00:00
|
|
|
// AzureEnvironment represents an endpoint connected to an Azure environment
|
2020-04-08 21:26:11 +00:00
|
|
|
AzureEnvironment
|
2020-07-05 23:21:03 +00:00
|
|
|
// EdgeAgentOnDockerEnvironment represents an endpoint connected to an Edge agent deployed on a Docker environment
|
|
|
|
EdgeAgentOnDockerEnvironment
|
|
|
|
// KubernetesLocalEnvironment represents an endpoint connected to a local Kubernetes environment
|
|
|
|
KubernetesLocalEnvironment
|
|
|
|
// AgentOnKubernetesEnvironment represents an endpoint connected to a Portainer agent deployed on a Kubernetes environment
|
|
|
|
AgentOnKubernetesEnvironment
|
|
|
|
// EdgeAgentOnKubernetesEnvironment represents an endpoint connected to an Edge agent deployed on a Kubernetes environment
|
|
|
|
EdgeAgentOnKubernetesEnvironment
|
2020-04-08 21:26:11 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
_ JobType = iota
|
|
|
|
// SnapshotJobType is a system job used to create endpoint snapshots
|
2020-06-25 03:25:51 +00:00
|
|
|
SnapshotJobType = 2
|
2016-12-25 20:34:02 +00:00
|
|
|
)
|
2017-03-12 16:24:15 +00:00
|
|
|
|
2017-05-23 18:56:10 +00:00
|
|
|
const (
|
|
|
|
_ MembershipRole = iota
|
|
|
|
// TeamLeader represents a leader role inside a team
|
|
|
|
TeamLeader
|
|
|
|
// TeamMember represents a member role inside a team
|
|
|
|
TeamMember
|
|
|
|
)
|
|
|
|
|
2017-03-12 16:24:15 +00:00
|
|
|
const (
|
2020-04-08 21:26:11 +00:00
|
|
|
_ RegistryType = iota
|
|
|
|
// QuayRegistry represents a Quay.io registry
|
|
|
|
QuayRegistry
|
|
|
|
// AzureRegistry represents an ACR registry
|
|
|
|
AzureRegistry
|
|
|
|
// CustomRegistry represents a custom registry
|
|
|
|
CustomRegistry
|
|
|
|
// GitlabRegistry represents a gitlab registry
|
|
|
|
GitlabRegistry
|
2017-08-10 08:35:23 +00:00
|
|
|
)
|
|
|
|
|
2017-05-23 18:56:10 +00:00
|
|
|
const (
|
|
|
|
_ ResourceAccessLevel = iota
|
|
|
|
// ReadWriteAccessLevel represents an access level with read-write permissions on a resource
|
|
|
|
ReadWriteAccessLevel
|
|
|
|
)
|
|
|
|
|
2017-03-12 16:24:15 +00:00
|
|
|
const (
|
|
|
|
_ ResourceControlType = iota
|
2017-05-23 18:56:10 +00:00
|
|
|
// ContainerResourceControl represents a resource control associated to a Docker container
|
2017-03-12 16:24:15 +00:00
|
|
|
ContainerResourceControl
|
2017-05-23 18:56:10 +00:00
|
|
|
// ServiceResourceControl represents a resource control associated to a Docker service
|
2017-03-12 16:24:15 +00:00
|
|
|
ServiceResourceControl
|
2017-05-23 18:56:10 +00:00
|
|
|
// VolumeResourceControl represents a resource control associated to a Docker volume
|
2017-03-12 16:24:15 +00:00
|
|
|
VolumeResourceControl
|
2017-09-19 14:58:30 +00:00
|
|
|
// NetworkResourceControl represents a resource control associated to a Docker network
|
|
|
|
NetworkResourceControl
|
2017-09-19 15:10:15 +00:00
|
|
|
// SecretResourceControl represents a resource control associated to a Docker secret
|
|
|
|
SecretResourceControl
|
2017-10-15 17:24:40 +00:00
|
|
|
// StackResourceControl represents a resource control associated to a stack composed of Docker services
|
|
|
|
StackResourceControl
|
2017-11-06 08:47:31 +00:00
|
|
|
// ConfigResourceControl represents a resource control associated to a Docker config
|
|
|
|
ConfigResourceControl
|
2020-07-06 23:18:39 +00:00
|
|
|
// CustomTemplateResourceControl represents a resource control associated to a custom template
|
|
|
|
CustomTemplateResourceControl
|
2017-03-12 16:24:15 +00:00
|
|
|
)
|
2018-02-23 02:10:26 +00:00
|
|
|
|
2018-06-11 13:13:19 +00:00
|
|
|
const (
|
|
|
|
_ StackType = iota
|
|
|
|
// DockerSwarmStack represents a stack managed via docker stack
|
|
|
|
DockerSwarmStack
|
|
|
|
// DockerComposeStack represents a stack managed via docker-compose
|
|
|
|
DockerComposeStack
|
2020-07-05 23:21:03 +00:00
|
|
|
// KubernetesStack represents a stack managed via kubectl
|
|
|
|
KubernetesStack
|
2018-06-11 13:13:19 +00:00
|
|
|
)
|
2018-07-03 18:31:02 +00:00
|
|
|
|
2020-08-03 22:18:53 +00:00
|
|
|
// StackStatus represents a status for a stack
|
|
|
|
const (
|
|
|
|
_ StackStatus = iota
|
|
|
|
StackStatusActive
|
|
|
|
StackStatusInactive
|
|
|
|
)
|
|
|
|
|
2018-07-03 18:31:02 +00:00
|
|
|
const (
|
|
|
|
_ TemplateType = iota
|
|
|
|
// ContainerTemplate represents a container template
|
|
|
|
ContainerTemplate
|
|
|
|
// SwarmStackTemplate represents a template used to deploy a Swarm stack
|
|
|
|
SwarmStackTemplate
|
|
|
|
// ComposeStackTemplate represents a template used to deploy a Compose stack
|
|
|
|
ComposeStackTemplate
|
2020-05-14 02:14:28 +00:00
|
|
|
// EdgeStackTemplate represents a template used to deploy an Edge stack
|
|
|
|
EdgeStackTemplate
|
2018-07-03 18:31:02 +00:00
|
|
|
)
|
2018-07-11 08:39:20 +00:00
|
|
|
|
|
|
|
const (
|
2020-04-08 21:26:11 +00:00
|
|
|
// TLSFileCA represents a TLS CA certificate file
|
|
|
|
TLSFileCA TLSFileType = iota
|
|
|
|
// TLSFileCert represents a TLS certificate file
|
|
|
|
TLSFileCert
|
|
|
|
// TLSFileKey represents a TLS key file
|
|
|
|
TLSFileKey
|
2018-12-09 03:49:27 +00:00
|
|
|
)
|
|
|
|
|
2018-11-06 09:49:48 +00:00
|
|
|
const (
|
2020-04-08 21:26:11 +00:00
|
|
|
_ UserRole = iota
|
|
|
|
// AdministratorRole represents an administrator user role
|
|
|
|
AdministratorRole
|
|
|
|
// StandardUserRole represents a regular user role
|
|
|
|
StandardUserRole
|
2018-11-06 09:49:48 +00:00
|
|
|
)
|
2018-12-09 03:49:27 +00:00
|
|
|
|
|
|
|
const (
|
2020-04-08 21:26:11 +00:00
|
|
|
_ WebhookType = iota
|
|
|
|
// ServiceWebhook is a webhook for restarting a docker service
|
|
|
|
ServiceWebhook
|
2018-12-09 03:49:27 +00:00
|
|
|
)
|
2019-05-24 06:04:58 +00:00
|
|
|
|
2019-07-25 22:38:07 +00:00
|
|
|
const (
|
|
|
|
// EdgeAgentIdle represents an idle state for a tunnel connected to an Edge endpoint.
|
|
|
|
EdgeAgentIdle string = "IDLE"
|
|
|
|
// EdgeAgentManagementRequired represents a required state for a tunnel connected to an Edge endpoint
|
|
|
|
EdgeAgentManagementRequired string = "REQUIRED"
|
|
|
|
// EdgeAgentActive represents an active state for a tunnel connected to an Edge endpoint
|
|
|
|
EdgeAgentActive string = "ACTIVE"
|
|
|
|
)
|
|
|
|
|
2019-05-24 06:04:58 +00:00
|
|
|
const (
|
|
|
|
OperationDockerContainerArchiveInfo Authorization = "DockerContainerArchiveInfo"
|
|
|
|
OperationDockerContainerList Authorization = "DockerContainerList"
|
|
|
|
OperationDockerContainerExport Authorization = "DockerContainerExport"
|
|
|
|
OperationDockerContainerChanges Authorization = "DockerContainerChanges"
|
|
|
|
OperationDockerContainerInspect Authorization = "DockerContainerInspect"
|
|
|
|
OperationDockerContainerTop Authorization = "DockerContainerTop"
|
|
|
|
OperationDockerContainerLogs Authorization = "DockerContainerLogs"
|
|
|
|
OperationDockerContainerStats Authorization = "DockerContainerStats"
|
|
|
|
OperationDockerContainerAttachWebsocket Authorization = "DockerContainerAttachWebsocket"
|
|
|
|
OperationDockerContainerArchive Authorization = "DockerContainerArchive"
|
|
|
|
OperationDockerContainerCreate Authorization = "DockerContainerCreate"
|
|
|
|
OperationDockerContainerPrune Authorization = "DockerContainerPrune"
|
|
|
|
OperationDockerContainerKill Authorization = "DockerContainerKill"
|
|
|
|
OperationDockerContainerPause Authorization = "DockerContainerPause"
|
|
|
|
OperationDockerContainerUnpause Authorization = "DockerContainerUnpause"
|
|
|
|
OperationDockerContainerRestart Authorization = "DockerContainerRestart"
|
|
|
|
OperationDockerContainerStart Authorization = "DockerContainerStart"
|
|
|
|
OperationDockerContainerStop Authorization = "DockerContainerStop"
|
|
|
|
OperationDockerContainerWait Authorization = "DockerContainerWait"
|
|
|
|
OperationDockerContainerResize Authorization = "DockerContainerResize"
|
|
|
|
OperationDockerContainerAttach Authorization = "DockerContainerAttach"
|
|
|
|
OperationDockerContainerExec Authorization = "DockerContainerExec"
|
|
|
|
OperationDockerContainerRename Authorization = "DockerContainerRename"
|
|
|
|
OperationDockerContainerUpdate Authorization = "DockerContainerUpdate"
|
|
|
|
OperationDockerContainerPutContainerArchive Authorization = "DockerContainerPutContainerArchive"
|
|
|
|
OperationDockerContainerDelete Authorization = "DockerContainerDelete"
|
|
|
|
OperationDockerImageList Authorization = "DockerImageList"
|
|
|
|
OperationDockerImageSearch Authorization = "DockerImageSearch"
|
|
|
|
OperationDockerImageGetAll Authorization = "DockerImageGetAll"
|
|
|
|
OperationDockerImageGet Authorization = "DockerImageGet"
|
|
|
|
OperationDockerImageHistory Authorization = "DockerImageHistory"
|
|
|
|
OperationDockerImageInspect Authorization = "DockerImageInspect"
|
|
|
|
OperationDockerImageLoad Authorization = "DockerImageLoad"
|
|
|
|
OperationDockerImageCreate Authorization = "DockerImageCreate"
|
|
|
|
OperationDockerImagePrune Authorization = "DockerImagePrune"
|
|
|
|
OperationDockerImagePush Authorization = "DockerImagePush"
|
|
|
|
OperationDockerImageTag Authorization = "DockerImageTag"
|
|
|
|
OperationDockerImageDelete Authorization = "DockerImageDelete"
|
|
|
|
OperationDockerImageCommit Authorization = "DockerImageCommit"
|
|
|
|
OperationDockerImageBuild Authorization = "DockerImageBuild"
|
|
|
|
OperationDockerNetworkList Authorization = "DockerNetworkList"
|
|
|
|
OperationDockerNetworkInspect Authorization = "DockerNetworkInspect"
|
|
|
|
OperationDockerNetworkCreate Authorization = "DockerNetworkCreate"
|
|
|
|
OperationDockerNetworkConnect Authorization = "DockerNetworkConnect"
|
|
|
|
OperationDockerNetworkDisconnect Authorization = "DockerNetworkDisconnect"
|
|
|
|
OperationDockerNetworkPrune Authorization = "DockerNetworkPrune"
|
|
|
|
OperationDockerNetworkDelete Authorization = "DockerNetworkDelete"
|
|
|
|
OperationDockerVolumeList Authorization = "DockerVolumeList"
|
|
|
|
OperationDockerVolumeInspect Authorization = "DockerVolumeInspect"
|
|
|
|
OperationDockerVolumeCreate Authorization = "DockerVolumeCreate"
|
|
|
|
OperationDockerVolumePrune Authorization = "DockerVolumePrune"
|
|
|
|
OperationDockerVolumeDelete Authorization = "DockerVolumeDelete"
|
|
|
|
OperationDockerExecInspect Authorization = "DockerExecInspect"
|
|
|
|
OperationDockerExecStart Authorization = "DockerExecStart"
|
|
|
|
OperationDockerExecResize Authorization = "DockerExecResize"
|
|
|
|
OperationDockerSwarmInspect Authorization = "DockerSwarmInspect"
|
|
|
|
OperationDockerSwarmUnlockKey Authorization = "DockerSwarmUnlockKey"
|
|
|
|
OperationDockerSwarmInit Authorization = "DockerSwarmInit"
|
|
|
|
OperationDockerSwarmJoin Authorization = "DockerSwarmJoin"
|
|
|
|
OperationDockerSwarmLeave Authorization = "DockerSwarmLeave"
|
|
|
|
OperationDockerSwarmUpdate Authorization = "DockerSwarmUpdate"
|
|
|
|
OperationDockerSwarmUnlock Authorization = "DockerSwarmUnlock"
|
|
|
|
OperationDockerNodeList Authorization = "DockerNodeList"
|
|
|
|
OperationDockerNodeInspect Authorization = "DockerNodeInspect"
|
|
|
|
OperationDockerNodeUpdate Authorization = "DockerNodeUpdate"
|
|
|
|
OperationDockerNodeDelete Authorization = "DockerNodeDelete"
|
|
|
|
OperationDockerServiceList Authorization = "DockerServiceList"
|
|
|
|
OperationDockerServiceInspect Authorization = "DockerServiceInspect"
|
|
|
|
OperationDockerServiceLogs Authorization = "DockerServiceLogs"
|
|
|
|
OperationDockerServiceCreate Authorization = "DockerServiceCreate"
|
|
|
|
OperationDockerServiceUpdate Authorization = "DockerServiceUpdate"
|
|
|
|
OperationDockerServiceDelete Authorization = "DockerServiceDelete"
|
|
|
|
OperationDockerSecretList Authorization = "DockerSecretList"
|
|
|
|
OperationDockerSecretInspect Authorization = "DockerSecretInspect"
|
|
|
|
OperationDockerSecretCreate Authorization = "DockerSecretCreate"
|
|
|
|
OperationDockerSecretUpdate Authorization = "DockerSecretUpdate"
|
|
|
|
OperationDockerSecretDelete Authorization = "DockerSecretDelete"
|
|
|
|
OperationDockerConfigList Authorization = "DockerConfigList"
|
|
|
|
OperationDockerConfigInspect Authorization = "DockerConfigInspect"
|
|
|
|
OperationDockerConfigCreate Authorization = "DockerConfigCreate"
|
|
|
|
OperationDockerConfigUpdate Authorization = "DockerConfigUpdate"
|
|
|
|
OperationDockerConfigDelete Authorization = "DockerConfigDelete"
|
|
|
|
OperationDockerTaskList Authorization = "DockerTaskList"
|
|
|
|
OperationDockerTaskInspect Authorization = "DockerTaskInspect"
|
|
|
|
OperationDockerTaskLogs Authorization = "DockerTaskLogs"
|
|
|
|
OperationDockerPluginList Authorization = "DockerPluginList"
|
|
|
|
OperationDockerPluginPrivileges Authorization = "DockerPluginPrivileges"
|
|
|
|
OperationDockerPluginInspect Authorization = "DockerPluginInspect"
|
|
|
|
OperationDockerPluginPull Authorization = "DockerPluginPull"
|
|
|
|
OperationDockerPluginCreate Authorization = "DockerPluginCreate"
|
|
|
|
OperationDockerPluginEnable Authorization = "DockerPluginEnable"
|
|
|
|
OperationDockerPluginDisable Authorization = "DockerPluginDisable"
|
|
|
|
OperationDockerPluginPush Authorization = "DockerPluginPush"
|
|
|
|
OperationDockerPluginUpgrade Authorization = "DockerPluginUpgrade"
|
|
|
|
OperationDockerPluginSet Authorization = "DockerPluginSet"
|
|
|
|
OperationDockerPluginDelete Authorization = "DockerPluginDelete"
|
|
|
|
OperationDockerSessionStart Authorization = "DockerSessionStart"
|
|
|
|
OperationDockerDistributionInspect Authorization = "DockerDistributionInspect"
|
|
|
|
OperationDockerBuildPrune Authorization = "DockerBuildPrune"
|
|
|
|
OperationDockerBuildCancel Authorization = "DockerBuildCancel"
|
|
|
|
OperationDockerPing Authorization = "DockerPing"
|
|
|
|
OperationDockerInfo Authorization = "DockerInfo"
|
|
|
|
OperationDockerEvents Authorization = "DockerEvents"
|
|
|
|
OperationDockerSystem Authorization = "DockerSystem"
|
|
|
|
OperationDockerVersion Authorization = "DockerVersion"
|
|
|
|
|
|
|
|
OperationDockerAgentPing Authorization = "DockerAgentPing"
|
|
|
|
OperationDockerAgentList Authorization = "DockerAgentList"
|
|
|
|
OperationDockerAgentHostInfo Authorization = "DockerAgentHostInfo"
|
|
|
|
OperationDockerAgentBrowseDelete Authorization = "DockerAgentBrowseDelete"
|
|
|
|
OperationDockerAgentBrowseGet Authorization = "DockerAgentBrowseGet"
|
|
|
|
OperationDockerAgentBrowseList Authorization = "DockerAgentBrowseList"
|
|
|
|
OperationDockerAgentBrowsePut Authorization = "DockerAgentBrowsePut"
|
|
|
|
OperationDockerAgentBrowseRename Authorization = "DockerAgentBrowseRename"
|
|
|
|
|
|
|
|
OperationPortainerDockerHubInspect Authorization = "PortainerDockerHubInspect"
|
|
|
|
OperationPortainerDockerHubUpdate Authorization = "PortainerDockerHubUpdate"
|
|
|
|
OperationPortainerEndpointGroupCreate Authorization = "PortainerEndpointGroupCreate"
|
|
|
|
OperationPortainerEndpointGroupList Authorization = "PortainerEndpointGroupList"
|
|
|
|
OperationPortainerEndpointGroupDelete Authorization = "PortainerEndpointGroupDelete"
|
|
|
|
OperationPortainerEndpointGroupInspect Authorization = "PortainerEndpointGroupInspect"
|
|
|
|
OperationPortainerEndpointGroupUpdate Authorization = "PortainerEndpointGroupEdit"
|
|
|
|
OperationPortainerEndpointGroupAccess Authorization = "PortainerEndpointGroupAccess "
|
|
|
|
OperationPortainerEndpointList Authorization = "PortainerEndpointList"
|
|
|
|
OperationPortainerEndpointInspect Authorization = "PortainerEndpointInspect"
|
|
|
|
OperationPortainerEndpointCreate Authorization = "PortainerEndpointCreate"
|
|
|
|
OperationPortainerEndpointExtensionAdd Authorization = "PortainerEndpointExtensionAdd"
|
|
|
|
OperationPortainerEndpointJob Authorization = "PortainerEndpointJob"
|
|
|
|
OperationPortainerEndpointSnapshots Authorization = "PortainerEndpointSnapshots"
|
|
|
|
OperationPortainerEndpointSnapshot Authorization = "PortainerEndpointSnapshot"
|
|
|
|
OperationPortainerEndpointUpdate Authorization = "PortainerEndpointUpdate"
|
|
|
|
OperationPortainerEndpointUpdateAccess Authorization = "PortainerEndpointUpdateAccess"
|
|
|
|
OperationPortainerEndpointDelete Authorization = "PortainerEndpointDelete"
|
|
|
|
OperationPortainerEndpointExtensionRemove Authorization = "PortainerEndpointExtensionRemove"
|
|
|
|
OperationPortainerExtensionList Authorization = "PortainerExtensionList"
|
|
|
|
OperationPortainerExtensionInspect Authorization = "PortainerExtensionInspect"
|
|
|
|
OperationPortainerExtensionCreate Authorization = "PortainerExtensionCreate"
|
|
|
|
OperationPortainerExtensionUpdate Authorization = "PortainerExtensionUpdate"
|
|
|
|
OperationPortainerExtensionDelete Authorization = "PortainerExtensionDelete"
|
|
|
|
OperationPortainerMOTD Authorization = "PortainerMOTD"
|
|
|
|
OperationPortainerRegistryList Authorization = "PortainerRegistryList"
|
|
|
|
OperationPortainerRegistryInspect Authorization = "PortainerRegistryInspect"
|
|
|
|
OperationPortainerRegistryCreate Authorization = "PortainerRegistryCreate"
|
|
|
|
OperationPortainerRegistryConfigure Authorization = "PortainerRegistryConfigure"
|
|
|
|
OperationPortainerRegistryUpdate Authorization = "PortainerRegistryUpdate"
|
|
|
|
OperationPortainerRegistryUpdateAccess Authorization = "PortainerRegistryUpdateAccess"
|
|
|
|
OperationPortainerRegistryDelete Authorization = "PortainerRegistryDelete"
|
|
|
|
OperationPortainerResourceControlCreate Authorization = "PortainerResourceControlCreate"
|
|
|
|
OperationPortainerResourceControlUpdate Authorization = "PortainerResourceControlUpdate"
|
|
|
|
OperationPortainerResourceControlDelete Authorization = "PortainerResourceControlDelete"
|
|
|
|
OperationPortainerRoleList Authorization = "PortainerRoleList"
|
|
|
|
OperationPortainerRoleInspect Authorization = "PortainerRoleInspect"
|
|
|
|
OperationPortainerRoleCreate Authorization = "PortainerRoleCreate"
|
|
|
|
OperationPortainerRoleUpdate Authorization = "PortainerRoleUpdate"
|
|
|
|
OperationPortainerRoleDelete Authorization = "PortainerRoleDelete"
|
|
|
|
OperationPortainerScheduleList Authorization = "PortainerScheduleList"
|
|
|
|
OperationPortainerScheduleInspect Authorization = "PortainerScheduleInspect"
|
|
|
|
OperationPortainerScheduleFile Authorization = "PortainerScheduleFile"
|
|
|
|
OperationPortainerScheduleTasks Authorization = "PortainerScheduleTasks"
|
|
|
|
OperationPortainerScheduleCreate Authorization = "PortainerScheduleCreate"
|
|
|
|
OperationPortainerScheduleUpdate Authorization = "PortainerScheduleUpdate"
|
|
|
|
OperationPortainerScheduleDelete Authorization = "PortainerScheduleDelete"
|
|
|
|
OperationPortainerSettingsInspect Authorization = "PortainerSettingsInspect"
|
|
|
|
OperationPortainerSettingsUpdate Authorization = "PortainerSettingsUpdate"
|
|
|
|
OperationPortainerSettingsLDAPCheck Authorization = "PortainerSettingsLDAPCheck"
|
|
|
|
OperationPortainerStackList Authorization = "PortainerStackList"
|
|
|
|
OperationPortainerStackInspect Authorization = "PortainerStackInspect"
|
|
|
|
OperationPortainerStackFile Authorization = "PortainerStackFile"
|
|
|
|
OperationPortainerStackCreate Authorization = "PortainerStackCreate"
|
|
|
|
OperationPortainerStackMigrate Authorization = "PortainerStackMigrate"
|
|
|
|
OperationPortainerStackUpdate Authorization = "PortainerStackUpdate"
|
|
|
|
OperationPortainerStackDelete Authorization = "PortainerStackDelete"
|
|
|
|
OperationPortainerTagList Authorization = "PortainerTagList"
|
|
|
|
OperationPortainerTagCreate Authorization = "PortainerTagCreate"
|
|
|
|
OperationPortainerTagDelete Authorization = "PortainerTagDelete"
|
|
|
|
OperationPortainerTeamMembershipList Authorization = "PortainerTeamMembershipList"
|
|
|
|
OperationPortainerTeamMembershipCreate Authorization = "PortainerTeamMembershipCreate"
|
|
|
|
OperationPortainerTeamMembershipUpdate Authorization = "PortainerTeamMembershipUpdate"
|
|
|
|
OperationPortainerTeamMembershipDelete Authorization = "PortainerTeamMembershipDelete"
|
|
|
|
OperationPortainerTeamList Authorization = "PortainerTeamList"
|
|
|
|
OperationPortainerTeamInspect Authorization = "PortainerTeamInspect"
|
|
|
|
OperationPortainerTeamMemberships Authorization = "PortainerTeamMemberships"
|
|
|
|
OperationPortainerTeamCreate Authorization = "PortainerTeamCreate"
|
|
|
|
OperationPortainerTeamUpdate Authorization = "PortainerTeamUpdate"
|
|
|
|
OperationPortainerTeamDelete Authorization = "PortainerTeamDelete"
|
|
|
|
OperationPortainerTemplateList Authorization = "PortainerTemplateList"
|
|
|
|
OperationPortainerTemplateInspect Authorization = "PortainerTemplateInspect"
|
|
|
|
OperationPortainerTemplateCreate Authorization = "PortainerTemplateCreate"
|
|
|
|
OperationPortainerTemplateUpdate Authorization = "PortainerTemplateUpdate"
|
|
|
|
OperationPortainerTemplateDelete Authorization = "PortainerTemplateDelete"
|
|
|
|
OperationPortainerUploadTLS Authorization = "PortainerUploadTLS"
|
|
|
|
OperationPortainerUserList Authorization = "PortainerUserList"
|
|
|
|
OperationPortainerUserInspect Authorization = "PortainerUserInspect"
|
|
|
|
OperationPortainerUserMemberships Authorization = "PortainerUserMemberships"
|
|
|
|
OperationPortainerUserCreate Authorization = "PortainerUserCreate"
|
|
|
|
OperationPortainerUserUpdate Authorization = "PortainerUserUpdate"
|
|
|
|
OperationPortainerUserUpdatePassword Authorization = "PortainerUserUpdatePassword"
|
|
|
|
OperationPortainerUserDelete Authorization = "PortainerUserDelete"
|
|
|
|
OperationPortainerWebsocketExec Authorization = "PortainerWebsocketExec"
|
|
|
|
OperationPortainerWebhookList Authorization = "PortainerWebhookList"
|
|
|
|
OperationPortainerWebhookCreate Authorization = "PortainerWebhookCreate"
|
|
|
|
OperationPortainerWebhookDelete Authorization = "PortainerWebhookDelete"
|
|
|
|
|
2019-05-26 22:41:12 +00:00
|
|
|
OperationIntegrationStoridgeAdmin Authorization = "IntegrationStoridgeAdmin"
|
|
|
|
|
2019-05-24 06:04:58 +00:00
|
|
|
OperationDockerUndefined Authorization = "DockerUndefined"
|
|
|
|
OperationDockerAgentUndefined Authorization = "DockerAgentUndefined"
|
|
|
|
OperationPortainerUndefined Authorization = "PortainerUndefined"
|
|
|
|
|
|
|
|
EndpointResourcesAccess Authorization = "EndpointResourcesAccess"
|
|
|
|
)
|