reader

package
v0.0.0-...-c98022d Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const FmtJson = "json"
View Source
const KeyHubMode = "hub.mode"
View Source
const KeyHubTopic = "hub.topic"

Variables

View Source
var ErrConflict = errors.New("conflict")
View Source
var ErrInternal = errors.New("internal failure")
View Source
var ErrNotFound = errors.New("not found")

Functions

func MakeCallbackUrl

func MakeCallbackUrl(urlBase string, chatId int64) string

Types

type Callback

type Callback struct {
	Url    string `json:"url"`
	Format string `json:"fmt"`
}

type Service

type Service interface {
	CreateCallback(ctx context.Context, subId, url string) (err error)
	GetCallback(ctx context.Context, subId, url string) (cb Callback, err error)
	DeleteCallback(ctx context.Context, subId, url string) (err error)
	ListByUrl(ctx context.Context, limit uint32, url, cursor string) (page []string, err error)
}

func NewService

func NewService(clientHttp *http.Client, uriBase string) Service

func NewServiceLogging

func NewServiceLogging(svc Service, log *slog.Logger) Service

Jump to

Keyboard shortcuts

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