room

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName = "room_service"

Variables

View Source
var (
	ErrEmptyBroadcast = errors.New("room don't have broadcast feeds")
	ErrNotFoundFeeds  = errors.New("feeds not found")
)

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) AddToBroadcast

func (p *Plugin) AddToBroadcast(ctx context.Context, id int64, feeds []string) error

func (*Plugin) AddToBroadcastByHost

func (p *Plugin) AddToBroadcastByHost(ctx context.Context, id int64, host string) error

func (*Plugin) ChatMemberUpdated

func (p *Plugin) ChatMemberUpdated(ctx context.Context, chat tgbotapi.Chat, deleted bool, permissions ...models.RoomPermission) error

func (*Plugin) DeleteFromBroadcast

func (p *Plugin) DeleteFromBroadcast(ctx context.Context, id int64, feeds []string) error

func (*Plugin) DeleteFromBroadcastByHost

func (p *Plugin) DeleteFromBroadcastByHost(ctx context.Context, id int64, host string) error

func (*Plugin) Init

func (p *Plugin) Init(
	log *zap.Logger,
	roomStorage storage.RoomStorage,
	feedStorage storage.FeedStorage,
	sender tgbotsender.TelegramSender,
) error

func (*Plugin) Name

func (p *Plugin) Name() string

Name returns user-friendly plugin name

type Service

type Service interface {
	ChatMemberUpdated(ctx context.Context, chat tgbotapi.Chat, deleted bool, permissions ...models.RoomPermission) error
	AddToBroadcastByHost(ctx context.Context, id int64, host string) error
	DeleteFromBroadcastByHost(ctx context.Context, id int64, host string) error
	AddToBroadcast(ctx context.Context, id int64, feeds []string) error
	DeleteFromBroadcast(ctx context.Context, id int64, feeds []string) error
}

Jump to

Keyboard shortcuts

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