github.com/s7techlab/cckit@v0.10.5/examples/token/service/burnable/burnable.validator.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: token/service/burnable/burnable.proto 3 4 package burnable 5 6 import ( 7 fmt "fmt" 8 proto "github.com/golang/protobuf/proto" 9 _ "github.com/mwitkow/go-proto-validators" 10 github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators" 11 _ "google.golang.org/genproto/googleapis/api/annotations" 12 _ "google.golang.org/protobuf/types/known/emptypb" 13 math "math" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 func (this *BurnRequest) Validate() error { 22 if this.Address == "" { 23 return github_com_mwitkow_go_proto_validators.FieldError("Address", fmt.Errorf(`value '%v' must not be an empty string`, this.Address)) 24 } 25 if !(this.Amount > 0) { 26 return github_com_mwitkow_go_proto_validators.FieldError("Amount", fmt.Errorf(`value '%v' must be greater than '0'`, this.Amount)) 27 } 28 return nil 29 } 30 func (this *BurnResponse) Validate() error { 31 return nil 32 } 33 func (this *Burned) Validate() error { 34 return nil 35 }