1.2 KiB
1.2 KiB
pkg/
Core domain logic and shared infrastructure.
Patterns
- 1:1 mapping with YouTube API resources.
- Structure:
<resource>.go+<resource>_test.go+BUILD.bazel(auto-generated bybazel run //:gazelle— do NOT edit manually). - Domain packages depend on
auth/andcommon/.
Testing
- Table-driven tests.
- Real
youtube.Servicewithhttptest.NewServer. - Global state (envs) carefully managed/restored.
- See docs/HOW_TO_TEST.md for details.
Packages
| Package | Description |
|---|---|
auth/ |
Authentication service |
common/ |
Shared types |
utils/ |
Generic helpers |
Resource Packages
Each maps 1:1 to a YouTube API resource:
abuseReport/, activity/, caption/, channel/, channelBanner/, channelSection/, comment/, commentThread/, i18nLanguage/, i18nRegion/, liveBroadcast/, liveChatBan/, liveChatMessage/, liveChatModerator/, liveStream/, member/, membershipsLevel/, playlist/, playlistImage/, playlistItem/, search/, subscription/, superChatEvent/, thirdPartyLink/, thumbnail/, video/, videoAbuseReportReason/, videoCategory/, watermark/