syncer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilGithubClient = errors.New("github client cannot be nil")
	ErrNilNotionClient = errors.New("notion client cannot be nil")
)

Functions

This section is empty.

Types

type RequiredProperty

type RequiredProperty struct {
	PropertyName string
	PropertyType notionapi.PropertyType
}

RequiredProperty represents a required property for the notion database

type Syncer

type Syncer struct {
	// contains filtered or unexported fields
}

func New

func New(githubClient *github.Client, notionClient *notionapi.Client) (*Syncer, error)

New creates a new Syncer instance with the given github and notion clients

func (*Syncer) SyncStars

func (s *Syncer) SyncStars(ctx context.Context, notionDatabaseID string) error

SyncStars syncs the github stars with the notion database This method will: 1. Get all the starred repos from github 2. Get all the pages from the notion database 3. Compare the two lists and create/delete the notion pages accordingly

Jump to

Keyboard shortcuts

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