Documentation ¶
Index ¶
- Constants
- func FullScope() string
- func ParseTime(tstr string) (time.Time, error)
- func ReadOnlyScope() string
- type DriveService
- func (ds *DriveService) About(fields ...googleapi.Field) (*drive.About, error)
- func (ds *DriveService) Download(id string, path string) (int64, error)
- func (ds *DriveService) Get(id string) (*drive.File, error)
- func (ds *DriveService) GetByName(name string, folder bool, trashed bool, fileFields string) (*drive.File, error)
- func (ds *DriveService) GetByQuery(q *Query, fileFields string) (*drive.File, error)
- func (ds *DriveService) List(pageSize int64, parentId string, fileFields string) (*drive.FileList, error)
- func (ds *DriveService) ListAll(parentId string, fileFields string) ([]*drive.File, error)
- func (ds *DriveService) SearchAll(q *Query, fileFields string) ([]*drive.File, error)
- func (ds *DriveService) SearchFolder(parentId string, query *Query, fileFields string) ([]*drive.File, error)
- type Query
- func (q *Query) And() *Query
- func (q *Query) Contains(value string) *Query
- func (q *Query) Eq(value string) *Query
- func (q *Query) Err() *googleapi.Error
- func (q *Query) In(value string) *Query
- func (q *Query) IsEmpty() bool
- func (q *Query) MimeType() *Query
- func (q *Query) Name() *Query
- func (q *Query) Not() *Query
- func (q *Query) NotEq(value string) *Query
- func (q *Query) Or() *Query
- func (q *Query) Parents() *Query
- func (q *Query) Reset()
- func (q *Query) String() string
- func (q *Query) TrashedEq(b bool) *Query
Constants ¶
View Source
const ( ErrorBadRequest = 400 ErrorInvalidCredentials = 401 ErrorLimitExceeded = 403 ErrorFileNotFound = 404 ErrorTooManyRequests = 429 ErrorBackendError = 500 ErrorUnknownError = 501 )
View Source
const ( False = "false" True = "true" Jpeg = "image/jpeg" Gif = "image/gif" Png = "image/png" Folder = "application/vnd.google-apps.folder" Sheet = "application/vnd.google-apps.spreadsheet" Doc = "application/vnd.google-apps.document" Present = "application/vnd.google-apps.presentation" )
Common mime types
View Source
const ( InitState = iota TermState OpState NotState )
Variables ¶
This section is empty.
Functions ¶
func ReadOnlyScope ¶
func ReadOnlyScope() string
Types ¶
type DriveService ¶
type DriveService struct { Root *drive.File // contains filtered or unexported fields }
func NewDriveService ¶
func (*DriveService) About ¶
func (ds *DriveService) About(fields ...googleapi.Field) (*drive.About, error)
func (*DriveService) Download ¶
func (ds *DriveService) Download(id string, path string) (int64, error)
func (*DriveService) Get ¶
func (ds *DriveService) Get(id string) (*drive.File, error)
func (*DriveService) GetByQuery ¶
func (ds *DriveService) GetByQuery(q *Query, fileFields string) (*drive.File, error)
func (*DriveService) List ¶
func (ds *DriveService) List(pageSize int64, parentId string, fileFields string) (*drive.FileList, error)
func (*DriveService) ListAll ¶
func (ds *DriveService) ListAll(parentId string, fileFields string) ([]*drive.File, error)
func (*DriveService) SearchAll ¶
func (ds *DriveService) SearchAll(q *Query, fileFields string) ([]*drive.File, error)
func (*DriveService) SearchFolder ¶
func (ds *DriveService) SearchFolder(parentId string, query *Query, fileFields string) ([]*drive.File, error)
Click to show internal directories.
Click to hide internal directories.