Documentation ¶
Index ¶
- Variables
- func QueryNotionUser(client *notionapi.Client, username string, timeout time.Duration) (notionapi.User, error)
- type CalendarRepository
- type NotionRepository
- func (r *NotionRepository) GetNotes(page *notionapi.Page, searchTimeStart time.Time, headingName string, ...)
- func (r *NotionRepository) GetPages() (output []notionapi.Page, err error)
- func (r *NotionRepository) GetTasks(cfg *config.Config, sc *models.SearchConfig) (doneTasks models.Tasks, todayTasks models.Tasks, err error)
- func (r *NotionRepository) SearchHeading(blockID notionapi.BlockID, searchTime time.Time, name string) (notionapi.Block, error)
- func (r *NotionRepository) SearchNotes(blockID notionapi.BlockID, searchTime time.Time) ([]string, error)
- type Repository
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
Types ¶
type CalendarRepository ¶
type CalendarRepository struct { Name string Service *calendar.Service Cfg *config.GoogleCalendarConfig }
func NewCalendarRepository ¶
func NewCalendarRepository(name string, cfg *config.GoogleCalendarConfig) (*CalendarRepository, error)
type NotionRepository ¶
type NotionRepository struct { Client *notionapi.Client Cfg *config.NotionConfig Name string }
func NewNotionRepository ¶
func NewNotionRepository(name string, cfg *config.NotionConfig) (*NotionRepository, error)
func (*NotionRepository) GetNotes ¶
func (r *NotionRepository) GetNotes(page *notionapi.Page, searchTimeStart time.Time, headingName string, taskCh chan models.Task, wg *sync.WaitGroup, done chan struct{})
GetNotes
func (*NotionRepository) GetPages ¶
func (r *NotionRepository) GetPages() (output []notionapi.Page, err error)
GetPages returns pages from database which has property Assign equals to user
func (*NotionRepository) GetTasks ¶
func (r *NotionRepository) GetTasks(cfg *config.Config, sc *models.SearchConfig) (doneTasks models.Tasks, todayTasks models.Tasks, err error)
func (*NotionRepository) SearchHeading ¶
func (*NotionRepository) SearchNotes ¶
type Repository ¶
type Repository interface {
GetTasks(cfg config.Config, sc models.SearchConfig)
}
Click to show internal directories.
Click to hide internal directories.