Documentation
¶
Index ¶
- Constants
- type DataItem
- type DataProperty
- type Service
- func (s *Service) CleanupLoop()
- func (s *Service) IsDatabaseIgnored(notionID string) bool
- func (s *Service) ListDatabases() []string
- func (s *Service) QueryDatabase(notionID string, updateMapIfSuccess bool) ([]DataItem, error)
- func (s *Service) QueryDatabaseCached(notionID string) ([]DataItem, error)
- func (s *Service) Start()
- func (s *Service) Stop()
Constants ¶
View Source
const IgnoreDatabaseDuration = 5 * time.Minute
IgnoreDatabaseDuration define how often we can try to pull unknown databases when database pull fails
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataItem ¶
type DataItem struct {
ID string `json:"id"`
Properties []DataProperty `json:"properties"`
LastUpdated time.Time `json:"last_updated"`
}
type DataProperty ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewDataService ¶
func (*Service) CleanupLoop ¶
func (s *Service) CleanupLoop()
func (*Service) IsDatabaseIgnored ¶
func (*Service) ListDatabases ¶
The Notion has deprecated the List databases endpoint. So there is no option to list them. Instead of List, we construct list of the databases map in the Service struct. Object is added to the database map when requested for a first time.
func (*Service) QueryDatabase ¶
func (*Service) QueryDatabaseCached ¶
Click to show internal directories.
Click to hide internal directories.