google_photo

package
v3.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: AGPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() driver.Driver

Types

type Addition

type Addition struct {
	driver.RootID
	RefreshToken string `json:"refresh_token" required:"true"`
	ClientID     string `json:"client_id" required:"true" default:"202264815644.apps.googleusercontent.com"`
	ClientSecret string `json:"client_secret" required:"true" default:"X4Z3ca8xfWDb1Voo-F9a7ZxJ"`
}

type Error

type Error struct {
	Error struct {
		Errors []struct {
			Domain       string `json:"domain"`
			Reason       string `json:"reason"`
			Message      string `json:"message"`
			LocationType string `json:"location_type"`
			Location     string `json:"location"`
		}
		Code    int    `json:"code"`
		Message string `json:"message"`
	} `json:"error"`
}

type Files

type Files struct {
	NextPageToken string      `json:"nextPageToken"`
	MediaItems    []MediaItem `json:"mediaItems"`
}

type GooglePhoto

type GooglePhoto struct {
	model.Storage
	Addition
	AccessToken string
}

func (*GooglePhoto) Config

func (d *GooglePhoto) Config() driver.Config

func (*GooglePhoto) Copy

func (d *GooglePhoto) Copy(ctx context.Context, srcObj, dstDir model.Obj) error

func (*GooglePhoto) Drop

func (d *GooglePhoto) Drop(ctx context.Context) error

func (*GooglePhoto) GetAddition

func (d *GooglePhoto) GetAddition() driver.Additional

func (*GooglePhoto) Init

func (d *GooglePhoto) Init(ctx context.Context, storage model.Storage) error
func (d *GooglePhoto) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*GooglePhoto) List

func (d *GooglePhoto) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

func (*GooglePhoto) MakeDir

func (d *GooglePhoto) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error

func (*GooglePhoto) Move

func (d *GooglePhoto) Move(ctx context.Context, srcObj, dstDir model.Obj) error

func (*GooglePhoto) Put

func (d *GooglePhoto) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error

func (*GooglePhoto) Remove

func (d *GooglePhoto) Remove(ctx context.Context, obj model.Obj) error

func (*GooglePhoto) Rename

func (d *GooglePhoto) Rename(ctx context.Context, srcObj model.Obj, newName string) error

type MediaItem

type MediaItem struct {
	Id            string        `json:"id"`
	BaseURL       string        `json:"baseUrl"`
	MimeType      string        `json:"mimeType"`
	FileName      string        `json:"filename"`
	MediaMetadata MediaMetadata `json:"mediaMetadata"`
}

type MediaMetadata

type MediaMetadata struct {
	CreationTime time.Time `json:"creationTime"`
	Width        string    `json:"width"`
	Height       string    `json:"height"`
	Photo        Photo     `json:"photo,omitempty"`
	Video        Video     `json:"video,omitempty"`
}

type Photo

type Photo struct {
}

type TokenError

type TokenError struct {
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
}

type Video

type Video struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL