This commit is contained in:
CrazyMax
2020-06-07 22:04:31 +02:00
parent 29bd6e6e43
commit 7bff860650
58 changed files with 122 additions and 104 deletions

View File

@@ -4,6 +4,16 @@ updates:
directory: "/"
schedule:
interval: "daily"
time: "08:00"
timezone: "Europe/Paris"
labels:
- ":game_die: dependencies"
- ":robot: bot"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "08:00"
timezone: "Europe/Paris"
labels:
- ":game_die: dependencies"

10
.github/labels.yml vendored
View File

@@ -1,4 +1,4 @@
## https://github.com/crazy-max/ghaction-github-labeler
## more info https://github.com/crazy-max/ghaction-github-labeler
- # bot
name: ":robot: bot"
color: "69cde9"
@@ -59,10 +59,18 @@
name: ":thinking: needs more info"
color: "795548"
description: ""
- # pinned
name: ":pushpin: pinned"
color: "28008e"
description: ""
- # question
name: ":question: question"
color: "3f51b5"
description: ""
- # stale
name: ":skull: stale"
color: "237da0"
description: ""
- # upstream
name: ":eyes: upstream"
color: "fbca04"

View File

@@ -10,10 +10,10 @@ import (
"time"
"github.com/alecthomas/kong"
"github.com/crazy-max/diun/v3/internal/app"
"github.com/crazy-max/diun/v3/internal/config"
"github.com/crazy-max/diun/v3/internal/logging"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v4/internal/app"
"github.com/crazy-max/diun/v4/internal/config"
"github.com/crazy-max/diun/v4/internal/logging"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/rs/zerolog/log"
)

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/crazy-max/diun/v3
module github.com/crazy-max/diun/v4
go 1.13

View File

@@ -5,15 +5,15 @@ import (
"sync/atomic"
"time"
"github.com/crazy-max/diun/v3/internal/config"
"github.com/crazy-max/diun/v3/internal/db"
"github.com/crazy-max/diun/v3/internal/logging"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/notif"
dockerPrd "github.com/crazy-max/diun/v3/internal/provider/docker"
filePrd "github.com/crazy-max/diun/v3/internal/provider/file"
swarmPrd "github.com/crazy-max/diun/v3/internal/provider/swarm"
"github.com/crazy-max/diun/v3/pkg/registry"
"github.com/crazy-max/diun/v4/internal/config"
"github.com/crazy-max/diun/v4/internal/db"
"github.com/crazy-max/diun/v4/internal/logging"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/notif"
dockerPrd "github.com/crazy-max/diun/v4/internal/provider/docker"
filePrd "github.com/crazy-max/diun/v4/internal/provider/file"
swarmPrd "github.com/crazy-max/diun/v4/internal/provider/swarm"
"github.com/crazy-max/diun/v4/pkg/registry"
"github.com/hako/durafmt"
"github.com/panjf2000/ants/v2"
"github.com/robfig/cron/v3"

View File

@@ -4,9 +4,9 @@ import (
"fmt"
"regexp"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/pkg/registry"
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/pkg/registry"
"github.com/crazy-max/diun/v4/pkg/utl"
"github.com/imdario/mergo"
"github.com/rs/zerolog/log"
)

View File

@@ -5,9 +5,9 @@ import (
"fmt"
"os"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/third_party/traefik/config/env"
"github.com/crazy-max/diun/v3/third_party/traefik/config/file"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/third_party/traefik/config/env"
"github.com/crazy-max/diun/v4/third_party/traefik/config/file"
"github.com/go-playground/validator/v10"
"github.com/pkg/errors"
)

View File

@@ -6,9 +6,9 @@ import (
"testing"
"time"
"github.com/crazy-max/diun/v3/internal/config"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/internal/config"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/pkg/utl"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

View File

@@ -5,7 +5,7 @@ import (
"reflect"
"time"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/rs/zerolog/log"
bolt "go.etcd.io/bbolt"
)

View File

@@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"github.com/crazy-max/diun/v3/pkg/registry"
"github.com/crazy-max/diun/v4/pkg/registry"
bolt "go.etcd.io/bbolt"
)

View File

@@ -6,7 +6,7 @@ import (
"os"
"time"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/sirupsen/logrus"

View File

@@ -1,7 +1,7 @@
package model
import (
"github.com/crazy-max/diun/v3/pkg/registry"
"github.com/crazy-max/diun/v4/pkg/registry"
)
// Job holds job configuration

View File

@@ -1,7 +1,7 @@
package model
import (
"github.com/crazy-max/diun/v3/pkg/registry"
"github.com/crazy-max/diun/v4/pkg/registry"
)
// NotifEntry represents a notification entry

View File

@@ -3,7 +3,7 @@ package model
import (
"time"
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/pkg/utl"
)
// NotifGotify holds gotify notification configuration details

View File

@@ -3,7 +3,7 @@ package model
import (
"net/mail"
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/pkg/utl"
"github.com/imdario/mergo"
"github.com/pkg/errors"
)

View File

@@ -3,7 +3,7 @@ package model
import (
"time"
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/pkg/utl"
)
// NotifRocketChat holds Rocket.Chat notification configuration details

View File

@@ -3,7 +3,7 @@ package model
import (
"time"
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/pkg/utl"
)
// NotifWebhook holds webhook notification configuration details

View File

@@ -1,7 +1,7 @@
package model
import (
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/pkg/utl"
)
// PrdDocker holds docker provider configuration

View File

@@ -1,7 +1,7 @@
package model
import (
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/pkg/utl"
)
// PrdSwarm holds swarm provider configuration

View File

@@ -3,7 +3,7 @@ package model
import (
"time"
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/pkg/utl"
)
// RegOpts holds registry options configuration

View File

@@ -1,7 +1,7 @@
package model
import (
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/pkg/utl"
)
// Watch holds data necessary for watch configuration

View File

@@ -5,9 +5,9 @@ import (
"fmt"
"time"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/notif/notifier"
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/notif/notifier"
"github.com/crazy-max/diun/v4/pkg/utl"
"github.com/opencontainers/go-digest"
"github.com/streadway/amqp"
)

View File

@@ -3,17 +3,17 @@ package notif
import (
"strings"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/notif/amqp"
"github.com/crazy-max/diun/v3/internal/notif/gotify"
"github.com/crazy-max/diun/v3/internal/notif/mail"
"github.com/crazy-max/diun/v3/internal/notif/notifier"
"github.com/crazy-max/diun/v3/internal/notif/rocketchat"
"github.com/crazy-max/diun/v3/internal/notif/script"
"github.com/crazy-max/diun/v3/internal/notif/slack"
"github.com/crazy-max/diun/v3/internal/notif/teams"
"github.com/crazy-max/diun/v3/internal/notif/telegram"
"github.com/crazy-max/diun/v3/internal/notif/webhook"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/notif/amqp"
"github.com/crazy-max/diun/v4/internal/notif/gotify"
"github.com/crazy-max/diun/v4/internal/notif/mail"
"github.com/crazy-max/diun/v4/internal/notif/notifier"
"github.com/crazy-max/diun/v4/internal/notif/rocketchat"
"github.com/crazy-max/diun/v4/internal/notif/script"
"github.com/crazy-max/diun/v4/internal/notif/slack"
"github.com/crazy-max/diun/v4/internal/notif/teams"
"github.com/crazy-max/diun/v4/internal/notif/telegram"
"github.com/crazy-max/diun/v4/internal/notif/webhook"
"github.com/rs/zerolog/log"
)

View File

@@ -11,8 +11,8 @@ import (
"strings"
"text/template"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/notif/notifier"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/notif/notifier"
)
// Client represents an active gotify notification object

View File

@@ -7,9 +7,9 @@ import (
"text/template"
"time"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/notif/notifier"
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/notif/notifier"
"github.com/crazy-max/diun/v4/pkg/utl"
"github.com/go-gomail/gomail"
"github.com/matcornic/hermes/v2"
"github.com/rs/zerolog/log"

View File

@@ -1,7 +1,7 @@
package notifier
import (
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v4/internal/model"
)
// Handler is a notifier interface

View File

@@ -11,8 +11,8 @@ import (
"text/template"
"time"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/notif/notifier"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/notif/notifier"
)
// Client represents an active rocketchat notification object

View File

@@ -7,8 +7,8 @@ import (
"os/exec"
"strings"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/notif/notifier"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/notif/notifier"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
)

View File

@@ -8,8 +8,8 @@ import (
"text/template"
"time"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/notif/notifier"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/notif/notifier"
"github.com/nlopes/slack"
)

View File

@@ -7,8 +7,8 @@ import (
"text/template"
"time"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/notif/notifier"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/notif/notifier"
)
// Client represents an active webhook notification object

View File

@@ -4,8 +4,8 @@ import (
"bytes"
"text/template"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/notif/notifier"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/notif/notifier"
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api"
)

View File

@@ -6,8 +6,8 @@ import (
"net/http"
"time"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/notif/notifier"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/notif/notifier"
"github.com/opencontainers/go-digest"
)

View File

@@ -5,7 +5,7 @@ import (
"strconv"
"strings"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v4/internal/model"
)
// ValidateContainerImage returns a standard image through Docker labels

View File

@@ -3,9 +3,9 @@ package docker
import (
"reflect"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/provider"
"github.com/crazy-max/diun/v3/pkg/docker"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/provider"
"github.com/crazy-max/diun/v4/pkg/docker"
"github.com/docker/docker/api/types/filters"
)

View File

@@ -1,8 +1,8 @@
package docker
import (
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/provider"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/provider"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)

View File

@@ -1,8 +1,8 @@
package file
import (
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/provider"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/provider"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)

View File

@@ -3,8 +3,8 @@ package file_test
import (
"testing"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/provider/file"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/provider/file"
"github.com/stretchr/testify/assert"
)

View File

@@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v4/internal/model"
"gopkg.in/yaml.v2"
)

View File

@@ -1,7 +1,7 @@
package provider
import (
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v4/internal/model"
)
// Handler is a provider interface

View File

@@ -3,9 +3,9 @@ package swarm
import (
"reflect"
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/provider"
"github.com/crazy-max/diun/v3/pkg/docker"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/provider"
"github.com/crazy-max/diun/v4/pkg/docker"
"github.com/docker/docker/api/types/filters"
)

View File

@@ -1,8 +1,8 @@
package swarm
import (
"github.com/crazy-max/diun/v3/internal/model"
"github.com/crazy-max/diun/v3/internal/provider"
"github.com/crazy-max/diun/v4/internal/model"
"github.com/crazy-max/diun/v4/internal/provider"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/crazy-max/diun/v3/pkg/registry"
"github.com/crazy-max/diun/v4/pkg/registry"
"github.com/stretchr/testify/assert"
)

View File

@@ -4,7 +4,7 @@ import (
"os"
"testing"
"github.com/crazy-max/diun/v3/pkg/registry"
"github.com/crazy-max/diun/v4/pkg/registry"
"github.com/stretchr/testify/assert"
)

View File

@@ -2,7 +2,7 @@ package registry
import (
"github.com/containers/image/v5/docker"
"github.com/crazy-max/diun/v3/pkg/utl"
"github.com/crazy-max/diun/v4/pkg/utl"
)
// Tags holds information about image tags.

View File

@@ -6,7 +6,7 @@ import (
"regexp"
"strings"
"github.com/crazy-max/diun/v3/third_party/traefik/config/parser"
"github.com/crazy-max/diun/v4/third_party/traefik/config/parser"
)
// DefaultNamePrefix is the default prefix for environment variable names.

View File

@@ -3,8 +3,8 @@ package env
import (
"testing"
"github.com/crazy-max/diun/v3/third_party/traefik/config/generator"
"github.com/crazy-max/diun/v3/third_party/traefik/config/parser"
"github.com/crazy-max/diun/v4/third_party/traefik/config/generator"
"github.com/crazy-max/diun/v4/third_party/traefik/config/parser"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

View File

@@ -4,7 +4,7 @@ import (
"reflect"
"strings"
"github.com/crazy-max/diun/v3/third_party/traefik/config/parser"
"github.com/crazy-max/diun/v4/third_party/traefik/config/parser"
)
// FindPrefixedEnvVars finds prefixed environment variables.

View File

@@ -2,7 +2,7 @@
package file
import (
"github.com/crazy-max/diun/v3/third_party/traefik/config/parser"
"github.com/crazy-max/diun/v4/third_party/traefik/config/parser"
)
// Decode decodes the given configuration file into the given element.

View File

@@ -7,7 +7,7 @@ import (
"reflect"
"strings"
"github.com/crazy-max/diun/v3/third_party/traefik/config/parser"
"github.com/crazy-max/diun/v4/third_party/traefik/config/parser"
"gopkg.in/yaml.v2"
)

View File

@@ -3,7 +3,7 @@ package file
import (
"testing"
"github.com/crazy-max/diun/v3/third_party/traefik/config/parser"
"github.com/crazy-max/diun/v4/third_party/traefik/config/parser"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

View File

@@ -7,7 +7,7 @@ import (
"strconv"
"strings"
"github.com/crazy-max/diun/v3/third_party/traefik/config/parser"
"github.com/crazy-max/diun/v4/third_party/traefik/config/parser"
)
func decodeRawToNode(data map[string]interface{}, rootName string, filters ...string) (*parser.Node, error) {

View File

@@ -3,7 +3,7 @@ package file
import (
"testing"
"github.com/crazy-max/diun/v3/third_party/traefik/config/parser"
"github.com/crazy-max/diun/v4/third_party/traefik/config/parser"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

View File

@@ -4,7 +4,7 @@ package generator
import (
"reflect"
"github.com/crazy-max/diun/v3/third_party/traefik/config/parser"
"github.com/crazy-max/diun/v4/third_party/traefik/config/parser"
)
type initializer interface {

View File

@@ -3,7 +3,7 @@ package generator
import (
"testing"
"github.com/crazy-max/diun/v3/third_party/traefik/config/parser"
"github.com/crazy-max/diun/v4/third_party/traefik/config/parser"
"github.com/stretchr/testify/assert"
)

View File

@@ -7,7 +7,7 @@ import (
"strings"
"time"
"github.com/crazy-max/diun/v3/third_party/traefik/types"
"github.com/crazy-max/diun/v4/third_party/traefik/types"
)
type initializer interface {

View File

@@ -5,7 +5,7 @@ import (
"testing"
"time"
"github.com/crazy-max/diun/v3/third_party/traefik/types"
"github.com/crazy-max/diun/v4/third_party/traefik/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

View File

@@ -8,7 +8,7 @@ import (
"strings"
"time"
"github.com/crazy-max/diun/v3/third_party/traefik/types"
"github.com/crazy-max/diun/v4/third_party/traefik/types"
)
const defaultPtrValue = "false"

View File

@@ -5,7 +5,7 @@ import (
"testing"
"time"
"github.com/crazy-max/diun/v3/third_party/traefik/types"
"github.com/crazy-max/diun/v4/third_party/traefik/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)