package producer import ( "context" "joybuywork/internal/service/queue/types" "github.com/Shopify/sarama" ) type OplatformOther struct { ctx context.Context topic string } func NewOplatformOther(ctx context.Context) OplatformOther { return OplatformOther{ ctx: ctx, topic: types.OplatformOtherTopic, } } func (p OplatformOther) OpoCampaignHelpOk(data types.OpoCampaignHelpOk, headers ...sarama.RecordHeader) { _ = AP.Produce(p.ctx, p.topic, types.OpoCampaignHelpOkKey, data, headers...) } func (p OplatformOther) OpoCampaignCondOk(data types.OpoCampaignCondOk, headers ...sarama.RecordHeader) { _ = AP.Produce(p.ctx, p.topic, types.OpoCampaignCondOkKey, data, headers...) } func (p OplatformOther) OpoCampaignDelete(data types.OpoCampaignDelete, headers ...sarama.RecordHeader) { _ = AP.Produce(p.ctx, p.topic, types.OpoCampaignDeleteKey, data, headers...) } func (p OplatformOther) OpoCampaignPush(data types.OpoCampaignPush, headers ...sarama.RecordHeader) { _ = AP.Produce(p.ctx, p.topic, types.OpoCampaignPushKey, data, headers...) }