service

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReturnError

func ReturnError() string

Return a friendly error message

Types

type Chat

type Chat struct {
	Id             string     `json:"id"`
	TelegramChatId string     `json:"TelegramChatId"`
	TelegramUserId string     `json:"TelegramUserId"`
	Tags           string     `json:"Tags"`
	LastTimeParsed *time.Time `json:"LastTimeParsed"`
}

type ChatFeedsResponse added in v1.1.0

type ChatFeedsResponse struct {
	Feeds []string `json:"feeds"`
}

type ChatResponse

type ChatResponse struct {
	Chat Chat `json:"chat"`
}

type IOttoService

type IOttoService interface {
	InitChat(chatId string, userId string, tags []string) *Chat
	ListFeeds(chatId string) []string
}

func NewOttoService

func NewOttoService() IOttoService

Initiate an Otto service

type MocksOttoService

type MocksOttoService struct {
	mock.Mock
}

type OttoService

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

func (*OttoService) InitChat

func (s *OttoService) InitChat(chatId string, userId string, tags []string) *Chat

Create the chat in Otto DB

func (*OttoService) ListFeeds added in v1.1.0

func (s *OttoService) ListFeeds(chatId string) []string

Retrieve all feeds attached to a chatId

Jump to

Keyboard shortcuts

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