fead: expand archive options

add an option to select how to archive the entries
add an option for what entries to archive
change the concurrentcy limit to a semaphore instead of a ticker
This commit is contained in:
Alexander Navarro 2024-12-20 14:59:43 -03:00
parent 1788241cd5
commit b0506c3eab
9 changed files with 99 additions and 72 deletions

View file

@ -1,6 +1,8 @@
package service
import "fmt"
import (
"fmt"
)
type ServiceOption string
@ -8,11 +10,21 @@ const (
ServiceLinkding ServiceOption = "linkding"
)
type ServiceArchiveMethod string
const (
ServiceArchiveMethodSeen = "seen"
ServiceArchiveMethodArchive = "archive"
ServiceArchiveMethodBoth = "both"
)
type ServiceConfig struct {
Service ServiceOption
Host string
User string
Token string
Service ServiceOption
Host string
User string
Token string
Method ServiceArchiveMethod
MaxRequests uint8
}
type Service interface {