generated from alecodes/base-template
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:
parent
1788241cd5
commit
b0506c3eab
9 changed files with 99 additions and 72 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue