Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

refactor: update module name #385

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
bin/*
dist/*
teler.yaml
.scannerwork/
.scannerwork/
/teler.app
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN go mod download

COPY . .
RUN CGO_ENABLED=0 go build -ldflags \
"-s -w -X teler.app/common.Version=${VERSION}" \
"-s -w -X github.com/kitabisa/teler/common.Version=${VERSION}" \
-o ./bin/teler .

FROM alpine:latest
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ help:
build:
@echo "--- Building ${APP_NAME} ${VERSION}"
@echo "GOPATH=${GOPATH}"
go build -ldflags "-s -w -X teler.app/common.Version=${VERSION}" -buildvcs=false -o ./bin/${APP_NAME} .
go build -ldflags "-s -w -X github.com/kitabisa/teler/common.Version=${VERSION}" -buildvcs=false -o ./bin/${APP_NAME} .

build-all:
@echo "--- Cross-platform build ${APP_NAME} ${VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion common/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package common
import (
"os"

"teler.app/pkg/parsers"
"github.com/kitabisa/teler/pkg/parsers"
)

// Options contains the configuration options
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module teler.app
module github.com/kitabisa/teler

go 1.18

Expand Down
6 changes: 3 additions & 3 deletions internal/alert/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package alert
import (
"reflect"

"teler.app/common"
"teler.app/pkg/matchers"
"teler.app/pkg/utils"
"github.com/kitabisa/teler/common"
"github.com/kitabisa/teler/pkg/matchers"
"github.com/kitabisa/teler/pkg/utils"
)

// New will initialize notification provider & send threat alerts
Expand Down
2 changes: 1 addition & 1 deletion internal/alert/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"

"github.com/bwmarrin/discordgo"
"teler.app/pkg/errors"
"github.com/kitabisa/teler/pkg/errors"
)

// token can be webhook URL if webhooked is true
Expand Down
2 changes: 1 addition & 1 deletion internal/alert/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"

tg "github.com/go-telegram-bot-api/telegram-bot-api"
"teler.app/pkg/errors"
"github.com/kitabisa/teler/pkg/errors"
)

//go:embed template/*.tmpl
Expand Down
4 changes: 2 additions & 2 deletions internal/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"strconv"

"github.com/goji/httpauth"
"github.com/kitabisa/teler/common"
"github.com/kitabisa/teler/pkg/errors"
"github.com/projectdiscovery/gologger"
"github.com/r3labs/sse/v2"
"goji.io"
"goji.io/pat"
"teler.app/common"
"teler.app/pkg/errors"
)

// Run SSE
Expand Down
2 changes: 1 addition & 1 deletion internal/event/server.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package event

import (
"github.com/kitabisa/teler/common"
"github.com/r3labs/sse/v2"
"teler.app/common"
)

type server struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/runner/banner.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package runner

import (
"github.com/kitabisa/teler/common"
"github.com/projectdiscovery/gologger"
"teler.app/common"
)

// showBanner is used to show the banner to the user
Expand Down
4 changes: 2 additions & 2 deletions internal/runner/cache.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package runner

import (
"github.com/kitabisa/teler/pkg/cache"
"github.com/kitabisa/teler/pkg/errors"
"github.com/projectdiscovery/gologger"
"teler.app/pkg/cache"
"teler.app/pkg/errors"
)

func rmCache() {
Expand Down
6 changes: 3 additions & 3 deletions internal/runner/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"reflect"

"teler.app/common"
"teler.app/pkg/errors"
"teler.app/pkg/logs"
"github.com/kitabisa/teler/common"
"github.com/kitabisa/teler/pkg/errors"
"github.com/kitabisa/teler/pkg/logs"
)

func log(options *common.Options, data map[string]string) {
Expand Down
6 changes: 3 additions & 3 deletions internal/runner/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"reflect"
"strconv"

"github.com/kitabisa/teler/common"
"github.com/kitabisa/teler/pkg/errors"
"github.com/kitabisa/teler/pkg/metrics"
"github.com/projectdiscovery/gologger"
"github.com/prometheus/client_golang/prometheus/promhttp"
"teler.app/common"
"teler.app/pkg/errors"
"teler.app/pkg/metrics"
)

func metric(options *common.Options) {
Expand Down
8 changes: 4 additions & 4 deletions internal/runner/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"os"
"strings"

"teler.app/common"
"teler.app/pkg/cache"
"teler.app/pkg/errors"
"teler.app/pkg/requests"
"github.com/kitabisa/teler/common"
"github.com/kitabisa/teler/pkg/cache"
"github.com/kitabisa/teler/pkg/errors"
"github.com/kitabisa/teler/pkg/requests"
)

// ParseOptions will parse args/opts
Expand Down
12 changes: 6 additions & 6 deletions internal/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ import (
"os/signal"

"github.com/kitabisa/tailpipe"
"github.com/kitabisa/teler/common"
"github.com/kitabisa/teler/internal/alert"
"github.com/kitabisa/teler/internal/event"
"github.com/kitabisa/teler/pkg/errors"
"github.com/kitabisa/teler/pkg/metrics"
"github.com/kitabisa/teler/pkg/teler"
"github.com/logrusorgru/aurora"
"github.com/panjf2000/ants/v2"
"github.com/projectdiscovery/gologger"
"github.com/remeh/sizedwaitgroup"
"github.com/satyrius/gonx"
"teler.app/common"
"teler.app/internal/alert"
"teler.app/internal/event"
"teler.app/pkg/errors"
"teler.app/pkg/metrics"
"teler.app/pkg/teler"
)

// New read & pass stdin log
Expand Down
10 changes: 5 additions & 5 deletions internal/runner/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"reflect"
"strings"

"github.com/kitabisa/teler/common"
"github.com/kitabisa/teler/pkg/errors"
"github.com/kitabisa/teler/pkg/matchers"
"github.com/kitabisa/teler/pkg/parsers"
"github.com/kitabisa/teler/pkg/utils"
"gopkg.in/validator.v2"
"teler.app/common"
"teler.app/pkg/errors"
"teler.app/pkg/matchers"
"teler.app/pkg/parsers"
"teler.app/pkg/utils"
)

func validate(options *common.Options) {
Expand Down
2 changes: 1 addition & 1 deletion internal/runner/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"teler.app/common"
"github.com/kitabisa/teler/common"
)

func showVersion() {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package main

import (
"github.com/kitabisa/teler/internal/runner"
"github.com/projectdiscovery/gologger"
"github.com/projectdiscovery/gologger/levels"
"go.uber.org/automaxprocs/maxprocs"
"teler.app/internal/runner"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/kirsle/configdir"
"teler.app/pkg/errors"
"github.com/kitabisa/teler/pkg/errors"
)

// Cache defines resources cache file informations
Expand Down
1 change: 1 addition & 0 deletions pkg/errors/abort.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package errors
Expand Down
1 change: 1 addition & 0 deletions pkg/errors/abort_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package errors
Expand Down
2 changes: 1 addition & 1 deletion pkg/logs/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"fmt"

"teler.app/common"
"github.com/kitabisa/teler/common"
)

// File write detected threats into it
Expand Down
2 changes: 1 addition & 1 deletion pkg/logs/zinc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"io"
"net/http"

e "teler.app/pkg/errors"
e "github.com/kitabisa/teler/pkg/errors"
)

// Zinc logs insertion
Expand Down
2 changes: 1 addition & 1 deletion pkg/matchers/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"teler.app/pkg/errors"
"github.com/kitabisa/teler/pkg/errors"
)

func errValidate(key string) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/matchers/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"teler.app/pkg/errors"
"github.com/kitabisa/teler/pkg/errors"
)

func TestIsLogformat(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package metrics
import (
"strings"

"github.com/kitabisa/teler/common"
"github.com/prometheus/client_golang/prometheus"
"teler.app/common"
)

// PrometheusInsert logs into metrics
Expand Down
8 changes: 4 additions & 4 deletions pkg/requests/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"time"

"github.com/briandowns/spinner"
"teler.app/common"
"teler.app/pkg/cache"
"teler.app/pkg/errors"
"teler.app/resource"
"github.com/kitabisa/teler/common"
"github.com/kitabisa/teler/pkg/cache"
"github.com/kitabisa/teler/pkg/errors"
"github.com/kitabisa/teler/resource"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pkg/teler/teler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"net/http"
"net/url"

"github.com/kitabisa/teler/common"
"github.com/kitabisa/teler/pkg/matchers"
"github.com/satyrius/gonx"
"github.com/valyala/fastjson"
"teler.app/common"
"teler.app/pkg/matchers"
)

// Analyze logs from threat resources
Expand Down
6 changes: 3 additions & 3 deletions pkg/teler/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"reflect"
"unicode/utf8"

"teler.app/common"
"teler.app/pkg/matchers"
"teler.app/resource"
"github.com/kitabisa/teler/common"
"github.com/kitabisa/teler/pkg/matchers"
"github.com/kitabisa/teler/resource"
)

func getDatasets() {
Expand Down
2 changes: 1 addition & 1 deletion teler.example.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# To write log format, see https://teler.app/configuration/log-format
# To write log format, see https://github.com/kitabisa/teler/configuration/log-format
log_format: |
$remote_addr $remote_user - [$time_local] "$request_method $request_uri $request_protocol"
$status $body_bytes_sent "$http_referer" "$http_user_agent"
Expand Down
Loading