github.com/bingoohuang/gg@v0.0.0-20240325092523-45da7dee9335/pkg/yaml/validate.go (about)

     1  package yaml
     2  
     3  // StructValidator need to implement Struct method only
     4  // ( see https://pkg.go.dev/github.com/go-playground/validator/v10#Validate.Struct )
     5  type StructValidator interface {
     6  	Struct(interface{}) error
     7  }
     8  
     9  // FieldError need to implement StructField method only
    10  // ( see https://pkg.go.dev/github.com/go-playground/validator/v10#FieldError )
    11  type FieldError interface {
    12  	StructField() string
    13  }