google_photo

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FETCH_ALL          = "all"
	FETCH_ALBUMS       = "albums"
	FETCH_ROOT         = "root"
	FETCH_SHARE_ALBUMS = "share_albums"
)

Variables

This section is empty.

Functions

This section is empty.

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"`
	ShowArchive  bool   `json:"show_archive"`
}

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 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) 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 Items

type Items struct {
	NextPageToken string      `json:"nextPageToken"`
	MediaItems    []MediaItem `json:"mediaItems,omitempty"`
	Albums        []MediaItem `json:"albums,omitempty"`
	SharedAlbums  []MediaItem `json:"sharedAlbums,omitempty"`
}

type MediaItem

type MediaItem struct {
	Id                string        `json:"id"`
	Title             string        `json:"title,omitempty"`
	BaseURL           string        `json:"baseUrl,omitempty"`
	CoverPhotoBaseUrl string        `json:"coverPhotoBaseUrl,omitempty"`
	MimeType          string        `json:"mimeType,omitempty"`
	FileName          string        `json:"filename,omitempty"`
	MediaMetadata     MediaMetadata `json:"mediaMetadata,omitempty"`
}

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