Documentation ¶
Index ¶
- func File(gfile *drive.File) *basefs.File
- func New(core *core.Core) core.DriverFS
- type Config
- type Service
- func (s *Service) Changes() ([]*basefs.Change, error)
- func (s *Service) Create(parent *basefs.File, name string, isDir bool) (*basefs.File, error)
- func (s *Service) Delete(file *basefs.File) error
- func (s *Service) DownloadTo(w io.Writer, file *basefs.File) error
- func (s *Service) ListAll() ([]*basefs.File, error)
- func (s *Service) Move(file *basefs.File, newParent *basefs.File, name string) (*basefs.File, error)
- func (s *Service) StatFS(op *fuseops.StatFSOp) error
- func (s *Service) Upload(reader io.Reader, file *basefs.File) (*basefs.File, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { ClientSecret struct { ClientID string `json:"client_id" yaml:"client_id"` ClientSecret string `json:"client_secret" yaml:"client_secret"` } `json:"client_secret" yaml:"client_secret"` Auth *oauth2.Token `json:"auth" yaml:"auth"` Mime map[string]string `json:"mime" yaml:"mime"` Options struct { Safemode bool } }
Config gdrive.yaml config file structure
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service gdrive service information
func NewService ¶
NewService creates and initializes a new GDrive service
func (*Service) DownloadTo ¶
DownloadTo from gdrive to a writer
func (*Service) Move ¶
func (s *Service) Move(file *basefs.File, newParent *basefs.File, name string) (*basefs.File, error)
Move a file in drive
Click to show internal directories.
Click to hide internal directories.