Documentation
¶
Index ¶
- type JSONRegistry
- func (j_registry JSONRegistry) AddToEvent(webhook models.Webhook, eventId string) error
- func (j_registry JSONRegistry) Find(webhook models.Webhook) (string, int)
- func (j_registry JSONRegistry) FindInEvent(eventId string, webhook models.Webhook) (int, error)
- func (j_registry JSONRegistry) GetHooksForEvent(eventId string) models.Webhooks
- func (j_registry JSONRegistry) ListEvents() []string
- func (j_registry JSONRegistry) RemoveFromEvent(webhook models.Webhook, eventId string) error
- type MapRegistry
- func (m_registry MapRegistry) AddToEvent(webhook models.Webhook, eventId string) error
- func (m_registry MapRegistry) Find(webhook models.Webhook) (string, int)
- func (m_registry MapRegistry) FindInEvent(eventId string, webhook models.Webhook) (int, error)
- func (m_registry MapRegistry) GetHooksForEvent(eventId string) models.Webhooks
- func (m_registry MapRegistry) ListEvents() []string
- func (m_registry MapRegistry) RemoveFromEvent(webhook models.Webhook, eventId string) error
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONRegistry ¶
type JSONRegistry struct {
Registry MapRegistry
FilePath string
}
func CreateJSONRegistryFromJSONData ¶
func CreateJSONRegistryFromJSONData(data string) JSONRegistry
func CreateJSONRegistryFromJSONFile ¶
func CreateJSONRegistryFromJSONFile(filename string) JSONRegistry
func CreateJSONRegistryFromMapRegistry ¶
func CreateJSONRegistryFromMapRegistry(mapregistry MapRegistry) JSONRegistry
func CreateNewJSONRegistry ¶
func CreateNewJSONRegistry(filepath string) JSONRegistry
implement interface methods
func (JSONRegistry) AddToEvent ¶
func (j_registry JSONRegistry) AddToEvent(webhook models.Webhook, eventId string) error
func (JSONRegistry) Find ¶
func (j_registry JSONRegistry) Find(webhook models.Webhook) (string, int)
func (JSONRegistry) FindInEvent ¶
func (JSONRegistry) GetHooksForEvent ¶
func (j_registry JSONRegistry) GetHooksForEvent(eventId string) models.Webhooks
func (JSONRegistry) ListEvents ¶
func (j_registry JSONRegistry) ListEvents() []string
func (JSONRegistry) RemoveFromEvent ¶
func (j_registry JSONRegistry) RemoveFromEvent(webhook models.Webhook, eventId string) error
type MapRegistry ¶
func (MapRegistry) AddToEvent ¶
func (m_registry MapRegistry) AddToEvent(webhook models.Webhook, eventId string) error
func (MapRegistry) FindInEvent ¶
func (MapRegistry) GetHooksForEvent ¶
func (m_registry MapRegistry) GetHooksForEvent(eventId string) models.Webhooks
func (MapRegistry) ListEvents ¶
func (m_registry MapRegistry) ListEvents() []string
func (MapRegistry) RemoveFromEvent ¶
func (m_registry MapRegistry) RemoveFromEvent(webhook models.Webhook, eventId string) error
type Registry ¶
type Registry interface {
AddToEvent(webhook models.Webhook, eventId string) error
RemoveFromEvent(webhook models.Webhook, eventId string) error
GetHooksForEvent(eventId string) models.Webhooks
Find(webhook models.Webhook) (string, int)
FindInEvent(eventId string, webhook models.Webhook) (int, error)
ListEvents() []string
}
Click to show internal directories.
Click to hide internal directories.