Skip to content

Commit

Permalink
rename core => internal
Browse files Browse the repository at this point in the history
mikrotik bugfix
  • Loading branch information
TheFireMike committed Jun 9, 2021
1 parent a7efb0e commit 747239d
Show file tree
Hide file tree
Showing 129 changed files with 202 additions and 175 deletions.
2 changes: 1 addition & 1 deletion api/rate_limiter.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api

import (
"github.com/inexio/thola/core/tholaerr"
"github.com/inexio/thola/internal/tholaerr"
"github.com/labstack/echo/v4"
"github.com/rs/zerolog/log"
"github.com/spf13/viper"
Expand Down
6 changes: 3 additions & 3 deletions api/request_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"crypto/subtle"
"fmt"
"github.com/inexio/thola/api/statistics"
"github.com/inexio/thola/core/database"
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/core/tholaerr"
"github.com/inexio/thola/internal/database"
"github.com/inexio/thola/internal/request"
"github.com/inexio/thola/internal/tholaerr"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/rs/zerolog/log"
Expand Down
2 changes: 1 addition & 1 deletion cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"fmt"
"github.com/inexio/go-monitoringplugin"
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/check_cpu_load.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/check_disk.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/check_hardware_health.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/check_identify.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cmd

import (
"github.com/inexio/thola/core/device"
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/core/utility"
"github.com/inexio/thola/internal/device"
"github.com/inexio/thola/internal/request"
"github.com/inexio/thola/internal/utility"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"log"
Expand Down
2 changes: 1 addition & 1 deletion cmd/check_interface_metrics.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/check_memory_usage.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/check_sbc.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/check_server.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/check_snmp.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/check_thola_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/check_ups.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/identify.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmd

import (
"fmt"
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/read_available_components.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/read_count_interfaces.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/read_cpu_load.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/read_disk.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/read_hardware_health.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/read_interfaces.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/read_memory_usage.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/read_sbc.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/read_server.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/read_ups.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ package cmd
import (
"context"
"fmt"
"github.com/inexio/thola/core/database"
"github.com/inexio/thola/core/parser"
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/doc"
"github.com/inexio/thola/internal/database"
"github.com/inexio/thola/internal/parser"
"github.com/inexio/thola/internal/request"
"github.com/pkg/errors"
"github.com/rs/xid"
"github.com/rs/zerolog"
Expand Down
4 changes: 2 additions & 2 deletions cmd/root_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ package cmd
import (
"context"
"fmt"
"github.com/inexio/thola/core/parser"
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/doc"
"github.com/inexio/thola/internal/parser"
"github.com/inexio/thola/internal/request"
"github.com/pkg/errors"
"github.com/rs/xid"
"github.com/rs/zerolog"
Expand Down
8 changes: 4 additions & 4 deletions cmd/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package cmd
import (
"context"
"fmt"
"github.com/inexio/thola/core/network"
"github.com/inexio/thola/core/parser"
"github.com/inexio/thola/core/request"
"github.com/inexio/thola/core/utility"
"github.com/inexio/thola/internal/network"
"github.com/inexio/thola/internal/parser"
"github.com/inexio/thola/internal/request"
"github.com/inexio/thola/internal/utility"
"github.com/rs/zerolog/log"
"github.com/spf13/viper"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package codecommunicator
import (
"context"
"fmt"
"github.com/inexio/thola/core/device"
"github.com/inexio/thola/core/network"
"github.com/inexio/thola/internal/device"
"github.com/inexio/thola/internal/network"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"github.com/shopspring/decimal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package codecommunicator

import (
"context"
"github.com/inexio/thola/core/device"
"github.com/inexio/thola/internal/device"
"github.com/pkg/errors"
"regexp"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package codecommunicator
import (
"context"
"fmt"
"github.com/inexio/thola/core/communicator/communicator"
"github.com/inexio/thola/core/device"
"github.com/inexio/thola/core/tholaerr"
"github.com/inexio/thola/internal/communicator/communicator"
"github.com/inexio/thola/internal/device"
"github.com/inexio/thola/internal/tholaerr"
"github.com/pkg/errors"
)

Expand All @@ -17,7 +17,7 @@ type codeCommunicator struct {
// GetCodeCommunicator returns the code communicator for the given device class
func GetCodeCommunicator(deviceClass communicator.Communicator, parentNetworkDeviceCommunicator communicator.Communicator) (communicator.Functions, error) {
if deviceClass == nil {
return nil, errors.New("device class is nil")
return nil, errors.New("device class is empty")
}
var base = codeCommunicator{
deviceClass: deviceClass,
Expand All @@ -44,7 +44,7 @@ func GetCodeCommunicator(deviceClass communicator.Communicator, parentNetworkDev
case "timos":
return &timosCommunicator{base}, nil
}
return nil, tholaerr.NewNotFoundError(fmt.Sprintf("no communicator found for device class identifier '%s'", classIdentifier))
return nil, tholaerr.NewNotFoundError(fmt.Sprintf("no code communicator found for device class identifier '%s'", classIdentifier))
}

func (c *codeCommunicator) GetVendor(_ context.Context) (string, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package codecommunicator
import (
"context"
"fmt"
"github.com/inexio/thola/core/device"
"github.com/inexio/thola/core/network"
"github.com/inexio/thola/internal/device"
"github.com/inexio/thola/internal/network"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"strings"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package codecommunicator

import (
"context"
"github.com/inexio/thola/core/device"
"github.com/inexio/thola/core/network"
"github.com/inexio/thola/internal/device"
"github.com/inexio/thola/internal/network"
"github.com/pkg/errors"
"math"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package codecommunicator
import (
"context"
"fmt"
"github.com/inexio/thola/core/device"
"github.com/inexio/thola/core/network"
"github.com/inexio/thola/internal/device"
"github.com/inexio/thola/internal/network"
"github.com/pkg/errors"
"strconv"
"strings"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package codecommunicator
import (
"context"
"fmt"
"github.com/inexio/thola/core/device"
"github.com/inexio/thola/core/network"
"github.com/inexio/thola/internal/device"
"github.com/inexio/thola/internal/network"
"github.com/pkg/errors"
"strconv"
"strings"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package codecommunicator
import (
"context"
"fmt"
"github.com/inexio/thola/core/device"
"github.com/inexio/thola/core/network"
"github.com/inexio/thola/internal/device"
"github.com/inexio/thola/internal/network"
"github.com/pkg/errors"
"strconv"
"strings"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package codecommunicator

import (
"context"
"github.com/inexio/thola/core/network"
"github.com/inexio/thola/internal/network"
"github.com/pkg/errors"
"strconv"
)
Expand Down
Loading

0 comments on commit 747239d

Please sign in to comment.