api

package
v0.0.0-...-3f02e82 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type By

type By struct {
	Application User `json:"application"`
	User        User `json:"user"`
}

By type

type Children

type Children struct {
	Value []Item `json:"value"`
}

Children type

func GetChildren

func GetChildren() (Children, error)

GetChildren List children under the Drive

type Drive

type Drive struct {
	ID        string `json:"id"`
	DriveType string `json:"driveType"`
	Owner     Owner  `json:"owner"`
	Quota     Quota  `json:"quota"`
}

Drive type

func GetDrive

func GetDrive() (*Drive, error)

GetDrive return the drive information

type Error

type Error struct {
	Code       string     `json:"code"`
	Message    string     `json:"message"`
	InnerError InnerError `json:"innererror"`
}

Error type

type Folder

type Folder struct {
	ChildCount int `json:"childCount"`
}

Folder type

type InnerError

type InnerError struct {
	Code string `json:"code"`
}

InnerError type

type Item

type Item struct {
	ID                   string    `json:"id"`
	Name                 string    `json:"name"`
	ETag                 string    `json:"eTag"`
	CTag                 string    `json:"cTag"`
	CreatedBy            By        `json:"createdBy"`
	CreatedDateTime      time.Time `json:"createdDateTime"`
	LastModifiedBy       By        `json:"lastModifiedBy"`
	LastModifiedDateTime time.Time `json:"lastModifiedDateTime"`
	Size                 int       `json:"size"`
	WebURL               string    `json:"webUrl"`
	ParentReference      Parent    `json:"parentReference"`
	Folder               Folder    `json:"folder"`
}

Item type

func GetRoot

func GetRoot() (Item, error)

GetRoot gets the root folder for the user's default Drive

type Owner

type Owner struct {
	User User `json:"user"`
}

Owner type

type Parent

type Parent struct {
	DriveID string `json:"driveId"`
	ID      string `json:"id"`
	Path    string `json:"path"`
}

Parent type

type Quota

type Quota struct {
	Deleted   int    `json:"deleted"`
	Remaining int    `json:"remaining"`
	State     string `json:"state"`
	Total     int    `json:"total"`
	Used      int    `json:"used"`
}

Quota type

type User

type User struct {
	DisplayName string `json:"displayName"`
	ID          string `json:"id"`
}

User type

Jump to

Keyboard shortcuts

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