Documentation ¶
Index ¶
- func RegisterGoogleHTTPRoutes(srv Server, service *Service, jwtKey []byte, authClient *auth.Client)
- func TestRepository(t *testing.T, repo UserRepository)
- type AuthUser
- type DriveFile
- type DriveService
- type DriveServiceFactory
- type GDriveService
- func (ds *GDriveService) CreateFile(name, typ, folderID string, data []byte) (DriveFile, error)
- func (ds *GDriveService) CreateFolder(name string) (string, error)
- func (ds *GDriveService) GetFolderID(name string) (string, error)
- func (ds *GDriveService) ListFiles(folderID, name string) ([]DriveFile, string, error)
- func (ds *GDriveService) UserHasAllowedDrive() (bool, error)
- type GoogleLoginRequest
- type InmemRepository
- type Server
- type Service
- type User
- type UserClient
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestRepository ¶
func TestRepository(t *testing.T, repo UserRepository)
Types ¶
type DriveService ¶
type DriveService interface { UserHasAllowedDrive() (bool, error) GetFolderID(name string) (string, error) ListFiles(folderID string, pageToken string) ([]DriveFile, string, error) CreateFile(name, typ, folderID string, data []byte) (DriveFile, error) CreateFolder(name string) (string, error) }
func NewGDriveService ¶
func NewGDriveService(client *http.Client) (DriveService, error)
type DriveServiceFactory ¶
type DriveServiceFactory func(*http.Client) (DriveService, error)
type GDriveService ¶
type GDriveService struct {
// contains filtered or unexported fields
}
func (*GDriveService) CreateFile ¶
func (ds *GDriveService) CreateFile(name, typ, folderID string, data []byte) (DriveFile, error)
func (*GDriveService) CreateFolder ¶
func (ds *GDriveService) CreateFolder(name string) (string, error)
func (*GDriveService) GetFolderID ¶
func (ds *GDriveService) GetFolderID(name string) (string, error)
func (*GDriveService) ListFiles ¶
func (ds *GDriveService) ListFiles(folderID, name string) ([]DriveFile, string, error)
func (*GDriveService) UserHasAllowedDrive ¶
func (ds *GDriveService) UserHasAllowedDrive() (bool, error)
type GoogleLoginRequest ¶
type InmemRepository ¶
type InmemRepository struct {
// contains filtered or unexported fields
}
func NewInmemRepository ¶
func NewInmemRepository() *InmemRepository
func (InmemRepository) GetByGoogleID ¶
func (r InmemRepository) GetByGoogleID(googleID string) (User, error)
func (*InmemRepository) Upsert ¶
func (r *InmemRepository) Upsert(user User) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo UserRepository, configPath string, dsf DriveServiceFactory, userClient *UserClient) (*Service, error)
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
func NewUserClient ¶
func NewUserClient(client *auth.Client) *UserClient
Source Files ¶
Click to show internal directories.
Click to hide internal directories.