Skip to content

Commit 7654f65

Browse files
Move go proto to pkg/proto, add .gitattributes
1 parent 98745f7 commit 7654f65

32 files changed

+61
-59
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pkg/proto/** linguist-vendored
2+
front/src/proto/** linguist-vendored

cmd/client/cli/add.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
"github.com/c4t-but-s4d/neo/v2/internal/client"
2121
"github.com/c4t-but-s4d/neo/v2/pkg/archive"
22-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
22+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
2323
)
2424

2525
type addCLI struct {

cmd/client/cli/tail.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/spf13/cobra"
99

1010
"github.com/c4t-but-s4d/neo/v2/internal/client"
11-
logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs"
11+
logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs"
1212
)
1313

1414
type tailCLI struct {

cmd/client/cli/update.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
"github.com/c4t-but-s4d/neo/v2/internal/client"
1414

15-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
15+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
1616
)
1717

1818
type updateCLI struct {

cmd/client/cli/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/samber/lo"
77

8-
"github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
8+
"github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
99
)
1010

1111
func isBinary(data []byte) bool {

cmd/server/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ import (
2828
"github.com/c4t-but-s4d/neo/v2/pkg/mu"
2929
"github.com/c4t-but-s4d/neo/v2/pkg/neohttp"
3030
"github.com/c4t-but-s4d/neo/v2/pkg/neosync"
31-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
32-
fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver"
33-
logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs"
31+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
32+
fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver"
33+
logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs"
3434
)
3535

3636
func main() {

internal/client/client.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"google.golang.org/grpc"
1111

1212
"github.com/c4t-but-s4d/neo/v2/pkg/filestream"
13-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
14-
fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver"
15-
logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs"
13+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
14+
fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver"
15+
logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs"
1616
)
1717

1818
func New(cc grpc.ClientConnInterface, id string) *Client {

internal/config/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"google.golang.org/protobuf/types/known/durationpb"
99

10-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
10+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
1111
)
1212

1313
type ExploitsConfig struct {

internal/exploit/cache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"sync"
55
"time"
66

7-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
7+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
88
)
99

1010
func NewCache() *Cache {

internal/exploit/cache_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/google/go-cmp/cmp/cmpopts"
88
"google.golang.org/protobuf/testing/protocmp"
99

10-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
10+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
1111
)
1212

1313
func TestCache_Diff(t *testing.T) {

internal/exploit/runner.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/c4t-but-s4d/neo/v2/internal/models"
2222
"github.com/c4t-but-s4d/neo/v2/internal/queue"
2323
"github.com/c4t-but-s4d/neo/v2/pkg/joblogger"
24-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
24+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
2525
)
2626

2727
var (

internal/exploit/storage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
"github.com/c4t-but-s4d/neo/v2/internal/client"
1414
"github.com/c4t-but-s4d/neo/v2/pkg/archive"
15-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
15+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
1616
)
1717

1818
func NewStorage(cache *Cache, exploitDir string, client *client.Client) *Storage {

internal/exploit/storage_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/stretchr/testify/require"
1515

1616
"github.com/c4t-but-s4d/neo/v2/pkg/archive"
17-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
17+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
1818
)
1919

2020
func mockStorage() (*Storage, func() error) {

internal/server/exploits/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
serverConfig "github.com/c4t-but-s4d/neo/v2/internal/server/config"
1515
"github.com/c4t-but-s4d/neo/v2/pkg/gstream"
1616
"github.com/c4t-but-s4d/neo/v2/pkg/hostbucket"
17+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
1718
"github.com/c4t-but-s4d/neo/v2/pkg/pubsub"
18-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
1919
)
2020

2121
func New(cfg *serverConfig.Config, storage *CachedStorage) *Server {

internal/server/exploits/server_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414

1515
"github.com/c4t-but-s4d/neo/v2/internal/server/config"
1616
"github.com/c4t-but-s4d/neo/v2/pkg/hostbucket"
17-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
18-
fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver"
17+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
18+
fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver"
1919
)
2020

2121
func testServer(t *testing.T) (*Server, func()) {

internal/server/exploits/storage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
bolt "go.etcd.io/bbolt"
1111
"google.golang.org/protobuf/proto"
1212

13-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
13+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
1414
)
1515

1616
const (

internal/server/exploits/storage_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"google.golang.org/protobuf/proto"
1313
"google.golang.org/protobuf/testing/protocmp"
1414

15-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
16-
fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver"
15+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
16+
fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver"
1717
)
1818

1919
func testDB() (*bolt.DB, func()) {

internal/server/fs/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
serverConfig "github.com/c4t-but-s4d/neo/v2/internal/server/config"
1313
"github.com/c4t-but-s4d/neo/v2/internal/server/utils"
1414
"github.com/c4t-but-s4d/neo/v2/pkg/filestream"
15-
fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver"
15+
fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver"
1616
)
1717

1818
func New(cfg *serverConfig.Config) (*Server, error) {

internal/server/logs/logline.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/mitchellh/mapstructure"
88

9-
logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs"
9+
logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs"
1010
)
1111

1212
func NewLogLineFromValues(vals map[string]interface{}) (*LogLine, error) {

internal/server/logs/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/c4t-but-s4d/neo/v2/internal/server/common"
1111
"github.com/c4t-but-s4d/neo/v2/internal/server/utils"
1212
"github.com/c4t-but-s4d/neo/v2/pkg/gstream"
13-
logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs"
13+
logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs"
1414
)
1515

1616
const (

pkg/filestream/filestream.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"io"
77

8-
fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver"
8+
fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver"
99
)
1010

1111
const (

pkg/filestream/filestream_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/google/go-cmp/cmp"
1212
"github.com/stretchr/testify/require"
1313

14-
fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver"
14+
fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver"
1515
)
1616

1717
type failedReadWriter struct {

pkg/hostbucket/hostbucket.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"github.com/google/go-cmp/cmp"
77
"github.com/google/go-cmp/cmp/cmpopts"
88

9+
epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits"
910
"github.com/c4t-but-s4d/neo/v2/pkg/rendezvous"
10-
epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits"
1111
)
1212

1313
func New(teams map[string]string) *HostBucket {

pkg/joblogger/logger.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/sirupsen/logrus"
99

1010
"github.com/c4t-but-s4d/neo/v2/internal/logger"
11-
logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs"
11+
logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs"
1212
)
1313

1414
// 1 MB.

pkg/joblogger/sender.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/sirupsen/logrus"
1010

1111
"github.com/c4t-but-s4d/neo/v2/internal/client"
12-
logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs"
12+
logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs"
1313
)
1414

1515
const (

proto/go/exploits/api.pb.go pkg/proto/exploits/api.pb.go

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

proto/go/fileserver/api.pb.go pkg/proto/fileserver/api.pb.go

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

proto/go/logs/api.pb.go pkg/proto/logs/api.pb.go

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

proto/buf.gen.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ version: v1
22
managed:
33
enabled: true
44
go_package_prefix:
5-
default: github.com/c4t-but-s4d/neo/v2/proto/go
5+
default: github.com/c4t-but-s4d/neo/v2/pkg/proto
66
plugins:
77
# Go
88
- name: go
9-
out: go
9+
out: ../pkg/proto
1010
opt:
1111
- paths=source_relative
1212
- name: go-grpc
13-
out: go
13+
out: ../pkg/proto
1414
opt:
1515
- paths=source_relative
1616

0 commit comments

Comments
 (0)