Skip to content

Commit

Permalink
oof, remove hints
Browse files Browse the repository at this point in the history
  • Loading branch information
sudorandom committed Aug 17, 2024
1 parent 2abe8a5 commit cc6fa53
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 69 deletions.
11 changes: 0 additions & 11 deletions gen_bytes.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
package fauxrpc

import (
"buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
"github.com/brianvoe/gofakeit/v7"
"google.golang.org/protobuf/reflect/protoreflect"
)

type BytesHints struct {
Rules *validate.BytesRules
FirstName bool
LastName bool
Name bool
UUID bool
URL bool
Version bool
}

func generateBytesSimple() []byte {
return []byte(gofakeit.HipsterSentence(3))
}
Expand Down
4 changes: 0 additions & 4 deletions gen_fixed32.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type Fixed32Hints struct {
Rules *validate.Fixed32Rules
}

func GenerateFixed32(fd protoreflect.FieldDescriptor) uint32 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down
4 changes: 0 additions & 4 deletions gen_fixedint64.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type Fixed64Hints struct {
Rules *validate.Fixed64Rules
}

func GenerateFixed64(fd protoreflect.FieldDescriptor) uint64 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down
4 changes: 0 additions & 4 deletions gen_float32.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type Float32Hints struct {
Rules *validate.FloatRules
}

func GenerateFloat32(fd protoreflect.FieldDescriptor) float32 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down
4 changes: 0 additions & 4 deletions gen_float64.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type Float64Hints struct {
Rules *validate.DoubleRules
}

func GenerateFloat64(fd protoreflect.FieldDescriptor) float64 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down
4 changes: 0 additions & 4 deletions gen_int32.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type Int32Hints struct {
Rules *validate.Int32Rules
}

func GenerateInt32(fd protoreflect.FieldDescriptor) int32 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down
4 changes: 0 additions & 4 deletions gen_int64.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type Int64Hints struct {
Rules *validate.Int64Rules
}

func GenerateInt64(fd protoreflect.FieldDescriptor) int64 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down
4 changes: 0 additions & 4 deletions gen_sfixed64.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type SFixed64Hints struct {
Rules *validate.SFixed64Rules
}

func GenerateSFixed64(fd protoreflect.FieldDescriptor) int64 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down
4 changes: 0 additions & 4 deletions gen_sfixedint32.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type SFixedInt32Hints struct {
Rules *validate.SFixed32Rules
}

func GenerateSFixedInt32(fd protoreflect.FieldDescriptor) int32 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down
4 changes: 0 additions & 4 deletions gen_sint32.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type SInt32Hints struct {
Rules *validate.SInt32Rules
}

func GenerateSInt32(fd protoreflect.FieldDescriptor) int32 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down
4 changes: 0 additions & 4 deletions gen_sint64.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type SInt64Hints struct {
Rules *validate.SInt64Rules
}

func GenerateSInt64(fd protoreflect.FieldDescriptor) int64 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down
10 changes: 0 additions & 10 deletions gen_strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type StringHints struct {
Rules *validate.StringRules
FirstName bool
LastName bool
Name bool
UUID bool
URL bool
Version bool
}

func randInt64GeometricDist(p float64) int64 {
return int64(math.Floor(math.Log(gofakeit.Float64()) / math.Log(1.0-p)))
}
Expand Down
4 changes: 0 additions & 4 deletions gen_uint32.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type UInt32Hints struct {
Rules *validate.UInt32Rules
}

func GenerateUInt32(fd protoreflect.FieldDescriptor) uint32 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down
4 changes: 0 additions & 4 deletions gen_uint64.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
)

type UInt64Hints struct {
Rules *validate.UInt64Rules
}

func GenerateUInt64(fd protoreflect.FieldDescriptor) uint64 {
constraints := getResolver().ResolveFieldConstraints(fd)
if constraints == nil {
Expand Down

0 comments on commit cc6fa53

Please sign in to comment.