added basic notion client

This commit is contained in:
Felipe M 2022-08-14 00:03:54 +02:00
parent 4016f13afe
commit f62e5e2f92
Signed by: fmartingr
GPG Key ID: 716BC147715E716F
2 changed files with 16 additions and 0 deletions

13
internal/notion/client.go Normal file
View File

@ -0,0 +1,13 @@
package notion
import notion "github.com/dstotijn/go-notion"
type NotionClient struct {
Client *notion.Client
}
func NewNotionClient(integrationToken string) *NotionClient {
return &NotionClient{
Client: notion.NewClient(integrationToken),
}
}

View File

@ -46,6 +46,9 @@ type ServerConfig struct {
Port int `env:"HTTP_PORT,default=8080"`
}
LogLevel string `env:"LOG_LEVEL,default=info"`
Notion struct {
IntegrationToken string `env:"NOTION_INTEGRATION_TOKEN"`
}
}
func ParseServerConfiguration(ctx context.Context, logger *zap.Logger) *ServerConfig {