Esempio n. 1
0
// Validate implements the api.Validator interface
func (m *RxMetadata) Validate() error {
	if m.Protocol == nil {
		return errors.NewErrInvalidArgument("Protocol", "can not be empty")
	}
	if err := api.Validate(m.Protocol); err != nil {
		return errors.NewErrInvalidArgument("Protocol", err.Error())
	}
	return nil
}
Esempio n. 2
0
// Validate implements the api.Validator interface
func (m *TxConfiguration) Validate() error {
	if m.Protocol == nil {
		return errors.New("RxMetadata.Protocol is nil")
	}
	return api.Validate(m.Protocol)
}