// Copyright (c) 2024 Mattermost Community Enterprise // Registration of Push Proxy implementation package push_proxy import ( "github.com/mattermost/mattermost/server/public/model" "github.com/mattermost/mattermost/server/public/shared/mlog" "github.com/mattermost/mattermost/server/v8/einterfaces" ) // PushProxyFactory is a function type that creates a PushProxyInterface type PushProxyFactory func(config func() *model.Config, logger mlog.LoggerIFace) einterfaces.PushProxyInterface // NewPushProxyFactory returns a factory function for creating PushProxy interfaces func NewPushProxyFactory() PushProxyFactory { return func(config func() *model.Config, logger mlog.LoggerIFace) einterfaces.PushProxyInterface { cfg := &PushProxyConfig{ Config: config, Logger: logger, } return NewPushProxyInterface(cfg) } } // CreatePushProxyInterface creates a new PushProxy interface directly func CreatePushProxyInterface(config func() *model.Config, logger mlog.LoggerIFace) einterfaces.PushProxyInterface { cfg := &PushProxyConfig{ Config: config, Logger: logger, } return NewPushProxyInterface(cfg) }