services

package
v0.0.0-...-ee3e9ce Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	Name() string
	Poll(result chan ServiceUpdate)
	WebhookRoute() *WebhookRoute
}

type ServiceManager

type ServiceManager struct {
	Services []Service
	Updates  chan ServiceUpdate
}

func (*ServiceManager) Init

func (m *ServiceManager) Init()

func (*ServiceManager) PollAll

func (m *ServiceManager) PollAll()

func (*ServiceManager) RegisterService

func (m *ServiceManager) RegisterService(service Service)

type ServiceUpdate

type ServiceUpdate struct {
	Service    string
	Identifier string
	Data       interface{}
}

type TwitchData

type TwitchData struct {
	Status string
}

type TwitchService

type TwitchService struct{}

func (*TwitchService) Name

func (s *TwitchService) Name() string

func (*TwitchService) Poll

func (s *TwitchService) Poll(result chan ServiceUpdate)

func (*TwitchService) WebhookRoute

func (s *TwitchService) WebhookRoute() *WebhookRoute

type WebhookRoute

type WebhookRoute struct {
	Handler func(ctx *context.Context, result chan ServiceUpdate)
}

Jump to

Keyboard shortcuts

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