Sha256: 667540fe0700dbaf31dfc9ca6b2f6b818735ab405eb79df13e6d8ad137812157
Contents?: true
Size: 673 Bytes
Versions: 11
Compression:
Stored size: 673 Bytes
Contents
# frozen_string_literal: true module WaterDrop module Contracts # Contract with validation rules for validating that all the message options that # we provide to producer ale valid and usable # @note Does not validate message itself as it is not our concern class MessageOptions < Dry::Validation::Contract params do required(:topic).filled(:str?, format?: TOPIC_REGEXP) optional(:key).maybe(:str?, :filled?) optional(:partition).filled(:int?, gteq?: 0) optional(:partition_key).maybe(:str?, :filled?) optional(:create_time).maybe(:time?) optional(:headers).maybe(:hash?) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems