storage

package
v0.0.0-...-5f2f827 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	GetChatState(chatID int64) *entity.ChatState
	SetChatState(chatID int64, update *entity.ChatStateUpdate) (*entity.ChatState, error)
	GetSubscription(subID string) (*entity.Subscription, error)
	CreateSubscription(chatID int64, name string) (*entity.Subscription, error)
	UpdateSubscription(subID string, subUpdate *entity.SubscriptionUpdate) (*entity.Subscription, error)
	DeleteSubscription(subID string) error
	GetSubscriptions(chatID int64) []entity.Subscription
	GetEventSubscribers(location entity.EventData) (chatIDs []int64, err error)
}

type Service

type Service interface {
	GetChatState(chatID int64) *entity.ChatState
	SetChatState(chatID int64, update *entity.ChatStateUpdate) (*entity.ChatState, error)
	CreateSubscription(chatID int64, name string) (*entity.Subscription, error)
	GetSubscription(subID string) (*entity.Subscription, error)
	UpdateSubscription(subID string, subUpdate *entity.SubscriptionUpdate) (*entity.Subscription, error)
	DeleteSubscription(subID string) error
	GetSubscriptions(chatID int64) []entity.Subscription
	GetEventSubscribers(location entity.EventData) (chatIDs []int64, err error)

	SetAwaitUserInput(chatID int64, awaitInput string) error
}

func NewService

func NewService(r Repository) Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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