github.com/aeternity/aepp-sdk-go/v4@v4.0.1/swagguard/node/models/pow.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package models 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 strfmt "github.com/go-openapi/strfmt" 10 11 "github.com/go-openapi/errors" 12 "github.com/go-openapi/validate" 13 ) 14 15 // Pow pow 16 // swagger:model Pow 17 type Pow []uint32 18 19 // Validate validates this pow 20 func (m Pow) Validate(formats strfmt.Registry) error { 21 var res []error 22 23 iPowSize := int64(len(m)) 24 25 if err := validate.MinItems("", "body", iPowSize, 42); err != nil { 26 return err 27 } 28 29 if err := validate.MaxItems("", "body", iPowSize, 42); err != nil { 30 return err 31 } 32 33 if len(res) > 0 { 34 return errors.CompositeValidationError(res...) 35 } 36 return nil 37 }