mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
refactor(api): refactor base import path (#2788)
* refactor(api): refactor base import path * fix(build-system): update build_binary_devops * fix(build-system): fix build_binary_devops for linux * fix(build-system): fix build_binary_devops for Windows
This commit is contained in:
parent
0c7d69eb17
commit
14845a4a53
184 changed files with 372 additions and 373 deletions
|
@ -6,24 +6,24 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/dockerhub"
|
"github.com/portainer/portainer/api/bolt/dockerhub"
|
||||||
"github.com/portainer/portainer/bolt/endpoint"
|
"github.com/portainer/portainer/api/bolt/endpoint"
|
||||||
"github.com/portainer/portainer/bolt/endpointgroup"
|
"github.com/portainer/portainer/api/bolt/endpointgroup"
|
||||||
"github.com/portainer/portainer/bolt/extension"
|
"github.com/portainer/portainer/api/bolt/extension"
|
||||||
"github.com/portainer/portainer/bolt/migrator"
|
"github.com/portainer/portainer/api/bolt/migrator"
|
||||||
"github.com/portainer/portainer/bolt/registry"
|
"github.com/portainer/portainer/api/bolt/registry"
|
||||||
"github.com/portainer/portainer/bolt/resourcecontrol"
|
"github.com/portainer/portainer/api/bolt/resourcecontrol"
|
||||||
"github.com/portainer/portainer/bolt/schedule"
|
"github.com/portainer/portainer/api/bolt/schedule"
|
||||||
"github.com/portainer/portainer/bolt/settings"
|
"github.com/portainer/portainer/api/bolt/settings"
|
||||||
"github.com/portainer/portainer/bolt/stack"
|
"github.com/portainer/portainer/api/bolt/stack"
|
||||||
"github.com/portainer/portainer/bolt/tag"
|
"github.com/portainer/portainer/api/bolt/tag"
|
||||||
"github.com/portainer/portainer/bolt/team"
|
"github.com/portainer/portainer/api/bolt/team"
|
||||||
"github.com/portainer/portainer/bolt/teammembership"
|
"github.com/portainer/portainer/api/bolt/teammembership"
|
||||||
"github.com/portainer/portainer/bolt/template"
|
"github.com/portainer/portainer/api/bolt/template"
|
||||||
"github.com/portainer/portainer/bolt/user"
|
"github.com/portainer/portainer/api/bolt/user"
|
||||||
"github.com/portainer/portainer/bolt/version"
|
"github.com/portainer/portainer/api/bolt/version"
|
||||||
"github.com/portainer/portainer/bolt/webhook"
|
"github.com/portainer/portainer/api/bolt/webhook"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package dockerhub
|
package dockerhub
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package endpoint
|
package endpoint
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package endpointgroup
|
package endpointgroup
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package extension
|
package extension
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Itob returns an 8-byte big endian representation of v.
|
// Itob returns an 8-byte big endian representation of v.
|
||||||
|
|
|
@ -2,8 +2,8 @@ package migrator
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/user"
|
"github.com/portainer/portainer/api/bolt/user"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (m *Migrator) updateAdminUserToDBVersion1() error {
|
func (m *Migrator) updateAdminUserToDBVersion1() error {
|
||||||
|
|
|
@ -2,8 +2,8 @@ package migrator
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (m *Migrator) updateResourceControlsToDBVersion2() error {
|
func (m *Migrator) updateResourceControlsToDBVersion2() error {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package migrator
|
package migrator
|
||||||
|
|
||||||
import "github.com/portainer/portainer"
|
import "github.com/portainer/portainer/api"
|
||||||
|
|
||||||
func (m *Migrator) updateEndpointsToVersion11() error {
|
func (m *Migrator) updateEndpointsToVersion11() error {
|
||||||
legacyEndpoints, err := m.endpointService.Endpoints()
|
legacyEndpoints, err := m.endpointService.Endpoints()
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
"github.com/portainer/portainer/bolt/stack"
|
"github.com/portainer/portainer/api/bolt/stack"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (m *Migrator) updateEndpointsToVersion12() error {
|
func (m *Migrator) updateEndpointsToVersion12() error {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package migrator
|
package migrator
|
||||||
|
|
||||||
import "github.com/portainer/portainer"
|
import "github.com/portainer/portainer/api"
|
||||||
|
|
||||||
func (m *Migrator) updateSettingsToVersion13() error {
|
func (m *Migrator) updateSettingsToVersion13() error {
|
||||||
legacySettings, err := m.settingsService.Settings()
|
legacySettings, err := m.settingsService.Settings()
|
||||||
|
|
|
@ -3,7 +3,7 @@ package migrator
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (m *Migrator) updateSettingsToDBVersion15() error {
|
func (m *Migrator) updateSettingsToDBVersion15() error {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package migrator
|
package migrator
|
||||||
|
|
||||||
import "github.com/portainer/portainer"
|
import "github.com/portainer/portainer/api"
|
||||||
|
|
||||||
func (m *Migrator) updateSettingsToDBVersion3() error {
|
func (m *Migrator) updateSettingsToDBVersion3() error {
|
||||||
legacySettings, err := m.settingsService.Settings()
|
legacySettings, err := m.settingsService.Settings()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package migrator
|
package migrator
|
||||||
|
|
||||||
import "github.com/portainer/portainer"
|
import "github.com/portainer/portainer/api"
|
||||||
|
|
||||||
func (m *Migrator) updateEndpointsToDBVersion4() error {
|
func (m *Migrator) updateEndpointsToDBVersion4() error {
|
||||||
legacyEndpoints, err := m.endpointService.Endpoints()
|
legacyEndpoints, err := m.endpointService.Endpoints()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package migrator
|
package migrator
|
||||||
|
|
||||||
import "github.com/portainer/portainer"
|
import "github.com/portainer/portainer/api"
|
||||||
|
|
||||||
func (m *Migrator) updateEndpointsToVersion8() error {
|
func (m *Migrator) updateEndpointsToVersion8() error {
|
||||||
legacyEndpoints, err := m.endpointService.Endpoints()
|
legacyEndpoints, err := m.endpointService.Endpoints()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package migrator
|
package migrator
|
||||||
|
|
||||||
import "github.com/portainer/portainer"
|
import "github.com/portainer/portainer/api"
|
||||||
|
|
||||||
func (m *Migrator) updateEndpointsToVersion9() error {
|
func (m *Migrator) updateEndpointsToVersion9() error {
|
||||||
legacyEndpoints, err := m.endpointService.Endpoints()
|
legacyEndpoints, err := m.endpointService.Endpoints()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package migrator
|
package migrator
|
||||||
|
|
||||||
import "github.com/portainer/portainer"
|
import "github.com/portainer/portainer/api"
|
||||||
|
|
||||||
func (m *Migrator) updateEndpointsToVersion10() error {
|
func (m *Migrator) updateEndpointsToVersion10() error {
|
||||||
legacyEndpoints, err := m.endpointService.Endpoints()
|
legacyEndpoints, err := m.endpointService.Endpoints()
|
||||||
|
|
|
@ -2,16 +2,16 @@ package migrator
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/endpoint"
|
"github.com/portainer/portainer/api/bolt/endpoint"
|
||||||
"github.com/portainer/portainer/bolt/endpointgroup"
|
"github.com/portainer/portainer/api/bolt/endpointgroup"
|
||||||
"github.com/portainer/portainer/bolt/extension"
|
"github.com/portainer/portainer/api/bolt/extension"
|
||||||
"github.com/portainer/portainer/bolt/resourcecontrol"
|
"github.com/portainer/portainer/api/bolt/resourcecontrol"
|
||||||
"github.com/portainer/portainer/bolt/settings"
|
"github.com/portainer/portainer/api/bolt/settings"
|
||||||
"github.com/portainer/portainer/bolt/stack"
|
"github.com/portainer/portainer/api/bolt/stack"
|
||||||
"github.com/portainer/portainer/bolt/template"
|
"github.com/portainer/portainer/api/bolt/template"
|
||||||
"github.com/portainer/portainer/bolt/user"
|
"github.com/portainer/portainer/api/bolt/user"
|
||||||
"github.com/portainer/portainer/bolt/version"
|
"github.com/portainer/portainer/api/bolt/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package registry
|
package registry
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package resourcecontrol
|
package resourcecontrol
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package schedule
|
package schedule
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package settings
|
package settings
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package stack
|
package stack
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package tag
|
package tag
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package team
|
package team
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package teammembership
|
package teammembership
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package template
|
package template
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package user
|
package user
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package webhook
|
package webhook
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt/internal"
|
"github.com/portainer/portainer/api/bolt/internal"
|
||||||
|
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,7 +3,7 @@ package cli
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"gopkg.in/alecthomas/kingpin.v2"
|
"gopkg.in/alecthomas/kingpin.v2"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package main // import "github.com/portainer/portainer"
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
@ -6,20 +6,20 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/bolt"
|
"github.com/portainer/portainer/api/bolt"
|
||||||
"github.com/portainer/portainer/cli"
|
"github.com/portainer/portainer/api/cli"
|
||||||
"github.com/portainer/portainer/cron"
|
"github.com/portainer/portainer/api/cron"
|
||||||
"github.com/portainer/portainer/crypto"
|
"github.com/portainer/portainer/api/crypto"
|
||||||
"github.com/portainer/portainer/docker"
|
"github.com/portainer/portainer/api/docker"
|
||||||
"github.com/portainer/portainer/exec"
|
"github.com/portainer/portainer/api/exec"
|
||||||
"github.com/portainer/portainer/filesystem"
|
"github.com/portainer/portainer/api/filesystem"
|
||||||
"github.com/portainer/portainer/git"
|
"github.com/portainer/portainer/api/git"
|
||||||
"github.com/portainer/portainer/http"
|
"github.com/portainer/portainer/api/http"
|
||||||
"github.com/portainer/portainer/http/client"
|
"github.com/portainer/portainer/api/http/client"
|
||||||
"github.com/portainer/portainer/jwt"
|
"github.com/portainer/portainer/api/jwt"
|
||||||
"github.com/portainer/portainer/ldap"
|
"github.com/portainer/portainer/api/ldap"
|
||||||
"github.com/portainer/portainer/libcompose"
|
"github.com/portainer/portainer/api/libcompose"
|
||||||
|
|
||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EndpointSyncJobRunner is used to run a EndpointSyncJob
|
// EndpointSyncJobRunner is used to run a EndpointSyncJob
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ScriptExecutionJobRunner is used to run a ScriptExecutionJob
|
// ScriptExecutionJobRunner is used to run a ScriptExecutionJob
|
||||||
|
|
|
@ -3,7 +3,7 @@ package cron
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SnapshotJobRunner is used to run a SnapshotJob
|
// SnapshotJobRunner is used to run a SnapshotJob
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package cron
|
package cron
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/robfig/cron"
|
"github.com/robfig/cron"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/crypto"
|
"github.com/portainer/portainer/api/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -12,8 +12,8 @@ import (
|
||||||
"github.com/docker/docker/api/types/network"
|
"github.com/docker/docker/api/types/network"
|
||||||
"github.com/docker/docker/api/types/strslice"
|
"github.com/docker/docker/api/types/strslice"
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/archive"
|
"github.com/portainer/portainer/api/archive"
|
||||||
)
|
)
|
||||||
|
|
||||||
// JobService represents a service that handles the execution of jobs
|
// JobService represents a service that handles the execution of jobs
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"github.com/docker/docker/api/types"
|
"github.com/docker/docker/api/types"
|
||||||
"github.com/docker/docker/api/types/filters"
|
"github.com/docker/docker/api/types/filters"
|
||||||
"github.com/docker/docker/client"
|
"github.com/docker/docker/client"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
func snapshot(cli *client.Client) (*portainer.Snapshot, error) {
|
func snapshot(cli *client.Client) (*portainer.Snapshot, error) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package docker
|
package docker
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Snapshotter represents a service used to create endpoint snapshots
|
// Snapshotter represents a service used to create endpoint snapshots
|
||||||
|
|
|
@ -11,8 +11,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/orcaman/concurrent-map"
|
"github.com/orcaman/concurrent-map"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/client"
|
"github.com/portainer/portainer/api/http/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
var extensionDownloadBaseURL = "https://portainer-io-assets.sfo2.digitaloceanspaces.com/extensions/"
|
var extensionDownloadBaseURL = "https://portainer-io-assets.sfo2.digitaloceanspaces.com/extensions/"
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"path"
|
"path"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SwarmStackManager represents a service for managing stacks.
|
// SwarmStackManager represents a service for managing stacks.
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"encoding/pem"
|
"encoding/pem"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/archive"
|
"github.com/portainer/portainer/api/archive"
|
||||||
|
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type authenticatePayload struct {
|
type authenticatePayload struct {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/asaskevich/govalidator"
|
"github.com/asaskevich/govalidator"
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type oauthPayload struct {
|
type oauthPayload struct {
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/proxy"
|
"github.com/portainer/portainer/api/http/proxy"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type dockerhubUpdatePayload struct {
|
type dockerhubUpdatePayload struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
func hideFields(dockerHub *portainer.DockerHub) {
|
func hideFields(dockerHub *portainer.DockerHub) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type endpointGroupCreatePayload struct {
|
type endpointGroupCreatePayload struct {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DELETE request on /api/endpoint_groups/:id
|
// DELETE request on /api/endpoint_groups/:id
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GET request on /api/endpoint_groups/:id
|
// GET request on /api/endpoint_groups/:id
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GET request on /api/endpoint_groups
|
// GET request on /api/endpoint_groups
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type endpointGroupUpdatePayload struct {
|
type endpointGroupUpdatePayload struct {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type endpointGroupUpdateAccessPayload struct {
|
type endpointGroupUpdateAccessPayload struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handler is the HTTP handler used to handle endpoint group operations.
|
// Handler is the HTTP handler used to handle endpoint group operations.
|
||||||
|
|
|
@ -3,9 +3,9 @@ package endpointproxy
|
||||||
import (
|
import (
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/proxy"
|
"github.com/portainer/portainer/api/http/proxy"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handler is the HTTP handler used to proxy requests to external APIs.
|
// Handler is the HTTP handler used to proxy requests to external APIs.
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
|
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
|
@ -9,9 +9,9 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/crypto"
|
"github.com/portainer/portainer/api/crypto"
|
||||||
"github.com/portainer/portainer/http/client"
|
"github.com/portainer/portainer/api/http/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type endpointCreatePayload struct {
|
type endpointCreatePayload struct {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DELETE request on /api/endpoints/:id
|
// DELETE request on /api/endpoints/:id
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type endpointExtensionAddPayload struct {
|
type endpointExtensionAddPayload struct {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DELETE request on /api/endpoints/:id/extensions/:extensionType
|
// DELETE request on /api/endpoints/:id/extensions/:extensionType
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GET request on /api/endpoints/:id
|
// GET request on /api/endpoints/:id
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type endpointJobFromFilePayload struct {
|
type endpointJobFromFilePayload struct {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GET request on /api/endpoints
|
// GET request on /api/endpoints
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// POST request on /api/endpoints/:id/snapshot
|
// POST request on /api/endpoints/:id/snapshot
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// POST request on /api/endpoints/snapshot
|
// POST request on /api/endpoints/snapshot
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/client"
|
"github.com/portainer/portainer/api/http/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type endpointUpdatePayload struct {
|
type endpointUpdatePayload struct {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type endpointUpdateAccessPayload struct {
|
type endpointUpdateAccessPayload struct {
|
||||||
|
|
|
@ -2,9 +2,9 @@ package endpoints
|
||||||
|
|
||||||
import (
|
import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/proxy"
|
"github.com/portainer/portainer/api/http/proxy"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type extensionCreatePayload struct {
|
type extensionCreatePayload struct {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DELETE request on /api/extensions/:id
|
// DELETE request on /api/extensions/:id
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/client"
|
"github.com/portainer/portainer/api/http/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GET request on /api/extensions/:id
|
// GET request on /api/extensions/:id
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GET request on /api/extensions?store=<store>
|
// GET request on /api/extensions?store=<store>
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type extensionUpdatePayload struct {
|
type extensionUpdatePayload struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handler is the HTTP handler used to handle extension operations.
|
// Handler is the HTTP handler used to handle extension operations.
|
||||||
|
|
|
@ -4,28 +4,28 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/portainer/portainer/http/handler/auth"
|
"github.com/portainer/portainer/api/http/handler/auth"
|
||||||
"github.com/portainer/portainer/http/handler/dockerhub"
|
"github.com/portainer/portainer/api/http/handler/dockerhub"
|
||||||
"github.com/portainer/portainer/http/handler/endpointgroups"
|
"github.com/portainer/portainer/api/http/handler/endpointgroups"
|
||||||
"github.com/portainer/portainer/http/handler/endpointproxy"
|
"github.com/portainer/portainer/api/http/handler/endpointproxy"
|
||||||
"github.com/portainer/portainer/http/handler/endpoints"
|
"github.com/portainer/portainer/api/http/handler/endpoints"
|
||||||
"github.com/portainer/portainer/http/handler/extensions"
|
"github.com/portainer/portainer/api/http/handler/extensions"
|
||||||
"github.com/portainer/portainer/http/handler/file"
|
"github.com/portainer/portainer/api/http/handler/file"
|
||||||
"github.com/portainer/portainer/http/handler/motd"
|
"github.com/portainer/portainer/api/http/handler/motd"
|
||||||
"github.com/portainer/portainer/http/handler/registries"
|
"github.com/portainer/portainer/api/http/handler/registries"
|
||||||
"github.com/portainer/portainer/http/handler/resourcecontrols"
|
"github.com/portainer/portainer/api/http/handler/resourcecontrols"
|
||||||
"github.com/portainer/portainer/http/handler/schedules"
|
"github.com/portainer/portainer/api/http/handler/schedules"
|
||||||
"github.com/portainer/portainer/http/handler/settings"
|
"github.com/portainer/portainer/api/http/handler/settings"
|
||||||
"github.com/portainer/portainer/http/handler/stacks"
|
"github.com/portainer/portainer/api/http/handler/stacks"
|
||||||
"github.com/portainer/portainer/http/handler/status"
|
"github.com/portainer/portainer/api/http/handler/status"
|
||||||
"github.com/portainer/portainer/http/handler/tags"
|
"github.com/portainer/portainer/api/http/handler/tags"
|
||||||
"github.com/portainer/portainer/http/handler/teammemberships"
|
"github.com/portainer/portainer/api/http/handler/teammemberships"
|
||||||
"github.com/portainer/portainer/http/handler/teams"
|
"github.com/portainer/portainer/api/http/handler/teams"
|
||||||
"github.com/portainer/portainer/http/handler/templates"
|
"github.com/portainer/portainer/api/http/handler/templates"
|
||||||
"github.com/portainer/portainer/http/handler/upload"
|
"github.com/portainer/portainer/api/http/handler/upload"
|
||||||
"github.com/portainer/portainer/http/handler/users"
|
"github.com/portainer/portainer/api/http/handler/users"
|
||||||
"github.com/portainer/portainer/http/handler/webhooks"
|
"github.com/portainer/portainer/api/http/handler/webhooks"
|
||||||
"github.com/portainer/portainer/http/handler/websocket"
|
"github.com/portainer/portainer/api/http/handler/websocket"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handler is a collection of all the service handlers.
|
// Handler is a collection of all the service handlers.
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handler is the HTTP handler used to handle MOTD operations.
|
// Handler is the HTTP handler used to handle MOTD operations.
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/crypto"
|
"github.com/portainer/portainer/api/crypto"
|
||||||
"github.com/portainer/portainer/http/client"
|
"github.com/portainer/portainer/api/http/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
type motdResponse struct {
|
type motdResponse struct {
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/proxy"
|
"github.com/portainer/portainer/api/http/proxy"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
func hideFields(registry *portainer.Registry) {
|
func hideFields(registry *portainer.Registry) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// request on /api/registries/:id/v2
|
// request on /api/registries/:id/v2
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type registryConfigurePayload struct {
|
type registryConfigurePayload struct {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type registryCreatePayload struct {
|
type registryCreatePayload struct {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DELETE request on /api/registries/:id
|
// DELETE request on /api/registries/:id
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GET request on /api/registries/:id
|
// GET request on /api/registries/:id
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GET request on /api/registries
|
// GET request on /api/registries
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type registryUpdatePayload struct {
|
type registryUpdatePayload struct {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type registryUpdateAccessPayload struct {
|
type registryUpdateAccessPayload struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handler is the HTTP handler used to handle resource control operations.
|
// Handler is the HTTP handler used to handle resource control operations.
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
type resourceControlCreatePayload struct {
|
type resourceControlCreatePayload struct {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DELETE request on /api/resource_controls/:id
|
// DELETE request on /api/resource_controls/:id
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
type resourceControlUpdatePayload struct {
|
type resourceControlUpdatePayload struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/http/security"
|
"github.com/portainer/portainer/api/http/security"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handler is the HTTP handler used to handle schedule operations.
|
// Handler is the HTTP handler used to handle schedule operations.
|
||||||
|
|
|
@ -10,8 +10,8 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
"github.com/portainer/portainer/cron"
|
"github.com/portainer/portainer/api/cron"
|
||||||
)
|
)
|
||||||
|
|
||||||
type scheduleCreateFromFilePayload struct {
|
type scheduleCreateFromFilePayload struct {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (handler *Handler) scheduleDelete(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
|
func (handler *Handler) scheduleDelete(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
type scheduleFileResponse struct {
|
type scheduleFileResponse struct {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/portainer/libhttp/response"
|
"github.com/portainer/libhttp/response"
|
||||||
"github.com/portainer/portainer"
|
"github.com/portainer/portainer/api"
|
||||||
|
|
||||||
httperror "github.com/portainer/libhttp/error"
|
httperror "github.com/portainer/libhttp/error"
|
||||||
"github.com/portainer/libhttp/request"
|
"github.com/portainer/libhttp/request"
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue