registries

package
v0.0.0-...-02129f6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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 (j_registry JSONRegistry) FindInEvent(eventId string, webhook models.Webhook) (int, error)

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

type MapRegistry map[string]models.Webhooks

func CreateMapRegistry

func CreateMapRegistry() MapRegistry

implement interface methods

func (MapRegistry) AddToEvent

func (m_registry MapRegistry) AddToEvent(webhook models.Webhook, eventId string) error

func (MapRegistry) Find

func (m_registry MapRegistry) Find(webhook models.Webhook) (string, int)

func (MapRegistry) FindInEvent

func (m_registry MapRegistry) FindInEvent(eventId string, webhook models.Webhook) (int, error)

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL