Summary
Add the foundational infrastructure for Google Drive support, including the OAuth scope, API client package, and parent command registration.
Scope
This issue establishes the patterns that all subsequent Drive commands will follow.
Tasks
1. Add OAuth Scope
2. Create Drive API Client Package (internal/drive/)
3. Create Command Package (internal/cmd/drive/)
4. Register Command
Data Types
type File struct {
ID string `json:"id"`
Name string `json:"name"`
MimeType string `json:"mimeType"`
Size int64 `json:"size,omitempty"`
CreatedTime time.Time `json:"createdTime,omitempty"`
ModifiedTime time.Time `json:"modifiedTime,omitempty"`
Parents []string `json:"parents,omitempty"`
Owners []string `json:"owners,omitempty"`
WebViewLink string `json:"webViewLink,omitempty"`
Shared bool `json:"shared"`
}
Interface
type DriveClientInterface interface {
ListFiles(query string, pageSize int64) ([]*File, error)
GetFile(fileID string) (*File, error)
DownloadFile(fileID string, mimeType string) ([]byte, error)
ExportFile(fileID string, exportMimeType string) ([]byte, error)
}
Acceptance Criteria
Blocked By
None - this is the foundation issue
Blocks
Summary
Add the foundational infrastructure for Google Drive support, including the OAuth scope, API client package, and parent command registration.
Scope
This issue establishes the patterns that all subsequent Drive commands will follow.
Tasks
1. Add OAuth Scope
drive.DriveReadonlyScopetoAllScopesininternal/auth/auth.gogoogle.golang.org/api/drive/v32. Create Drive API Client Package (
internal/drive/)interfaces.go- DefineDriveClientInterfaceclient.go- Drive service wrapper withNewClient(ctx)factoryfiles.go- File data types and parsing helpers3. Create Command Package (
internal/cmd/drive/)drive.go- Parent command withfilesaliasoutput.go- Shared output helpers (printJSON, ClientFactory)4. Register Command
AddCommand()ininternal/cmd/root/root.goData Types
Interface
Acceptance Criteria
gro driveshows help with available subcommandsgro filesworks as aliasmake verifypassesBlocked By
None - this is the foundation issue
Blocks