Documentation
¶
Overview ¶
Package gogledrive provides some easy to use functionalities about the google drive such as searching for assets and downloading files. It uses the Google oAuth Client which can be generated from: https://console.developers.google.com/apis/credentials
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gogledrive ¶
type Gogledrive struct {
// contains filtered or unexported fields
}
func New ¶
func New(credentialsFile string) (*Gogledrive, error)
New returns a new instance of gogledrive's. It uses the provided credentialsFile to connect to Google OAuth service.
func (*Gogledrive) GetFile ¶
func (gdrive *Gogledrive) GetFile(fileID string) ([]byte, error)
GetFile returns a byte[] with the contents of the fileID provided
func (*Gogledrive) SearchFiles ¶
func (gdrive *Gogledrive) SearchFiles(filters ListFilter) (map[string]string, error)
SearchFiles returns a map where key is the file name and value is the FileId that retrieves as search results based on the provided ListFilter
type ListFilter ¶
ListFilter provides the available filters for feedind the SearchFiles() Use mimeType = 'application/vnd.google-apps.folder' to list folders