Skip to content

Commit

Permalink
[build] Move validators to internal (cloudprober#590)
Browse files Browse the repository at this point in the history
  • Loading branch information
manugarg authored Oct 20, 2023
1 parent 5a30656 commit 8f3ff5f
Show file tree
Hide file tree
Showing 39 changed files with 1,146 additions and 1,132 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strings"
"time"

configpb "github.com/cloudprober/cloudprober/internal/validators/http/proto"
"github.com/cloudprober/cloudprober/logger"
configpb "github.com/cloudprober/cloudprober/validators/http/proto"
)

// Validator implements a validator for HTTP responses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"testing"
"time"

configpb "github.com/cloudprober/cloudprober/internal/validators/http/proto"
"github.com/cloudprober/cloudprober/logger"
configpb "github.com/cloudprober/cloudprober/validators/http/proto"
"google.golang.org/protobuf/proto"
)

Expand Down
319 changes: 319 additions & 0 deletions internal/validators/http/proto/config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package cloudprober.validators.http;

option go_package = "github.com/cloudprober/cloudprober/validators/http/proto";
option go_package = "github.com/cloudprober/cloudprober/internal/validators/http/proto";

// HTTP validator configuration. For HTTP validator to succeed, all conditions
// specified in the validator should succeed. Note that failures conditions are
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package integrity
import (
"fmt"

configpb "github.com/cloudprober/cloudprober/internal/validators/integrity/proto"
"github.com/cloudprober/cloudprober/logger"
"github.com/cloudprober/cloudprober/probes/probeutils"
configpb "github.com/cloudprober/cloudprober/validators/integrity/proto"
)

// Validator implements an integrity validator.
Expand Down Expand Up @@ -76,7 +76,7 @@ func (v *Validator) Validate(responseBody []byte) (bool, error) {
}

// PatternNumBytesValidator returns a data integrity validator with number of
/// pattern bytes set to patternNumbBytes.
// / pattern bytes set to patternNumbBytes.
func PatternNumBytesValidator(patternNumbBytes int32, l *logger.Logger) (*Validator, error) {
v := &Validator{}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"strings"
"testing"

configpb "github.com/cloudprober/cloudprober/internal/validators/integrity/proto"
"github.com/cloudprober/cloudprober/logger"
configpb "github.com/cloudprober/cloudprober/validators/integrity/proto"
)

func TestInvalidConfig(t *testing.T) {
Expand Down
Loading

0 comments on commit 8f3ff5f

Please sign in to comment.