Sha256: 5004a4a15145a2a9d5948c509973970ddd997fb60f057dba35b516c8e0c55d5d

Contents?: true

Size: 484 Bytes

Versions: 8

Compression:

Stored size: 484 Bytes

Contents

<%- user_editable -%>
<%- package source_file.basename -%>

<%- source_file.types.select(&:store?).each do |model| -%>
<%-
      import "context"
      import "#{config.go_package}/model"
-%>
<%-   store_name = "#{model.name}Store" -%>
func (s *<%= store_name %>) Validate(ctx context.Context, m *model.<%= model.name %>) error {
	if err := m.Validate(ctx); err != nil {
		return err
	}
	if err := s.ValidateUniqueness(ctx, m); err != nil {
		return err
	}
	return nil
}

<%- end -%>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
goa_model_gen-0.9.0 lib/goa_model_gen/templates/store_validation.go.erb
goa_model_gen-0.8.4 lib/goa_model_gen/templates/store_validation.go.erb
goa_model_gen-0.8.3 lib/goa_model_gen/templates/store_validation.go.erb
goa_model_gen-0.8.2 lib/goa_model_gen/templates/store_validation.go.erb
goa_model_gen-0.8.1 lib/goa_model_gen/templates/store_validation.go.erb
goa_model_gen-0.8.0 lib/goa_model_gen/templates/store_validation.go.erb
goa_model_gen-0.7.1 lib/goa_model_gen/templates/store_validation.go.erb
goa_model_gen-0.7.0 lib/goa_model_gen/templates/store_validation.go.erb