Documentation
¶
Index ¶
- Constants
- type BatchReq
- type BatchResp
- type GraphClient
- func (client *GraphClient) BatchDo(reqs []BatchReq) ([]BatchResp, error)
- func (client *GraphClient) CreateFolder(parentId, name string) (*DriveItem, error)
- func (client *GraphClient) CreateFolderRecursive(path string) (*DriveItem, error)
- func (client *GraphClient) DeleteItem(itemId string) error
- func (client *GraphClient) Do(req *http.Request) (*http.Response, error)
- func (client *GraphClient) DownloadFile(itemId string) ([]byte, error)
- func (client *GraphClient) GetDrive() (*[]Drive, error)
- func (client *GraphClient) GetItem(path, filename string) (*DriveItem, error)
- func (client *GraphClient) ListAllFiles(root string, length int) ([]DriveItem, error)
- func (client *GraphClient) ListFiles(path string, length int, nextUrl string) (*[]DriveItem, error)
- func (client *GraphClient) MakeShareLink(item string) (string, error)
- func (client *GraphClient) MoveItem(itemId, targetId string) error
- func (client *GraphClient) NewRequest(method, url string, data []byte) (*http.Request, error)
- func (client *GraphClient) NewRequestJson(method, url string, data interface{}) (*http.Request, error)
- func (client *GraphClient) NewRequestWithBuffer(method, url string, data io.Reader) (*http.Request, error)
- func (client *GraphClient) ReadData(resp *http.Response) ([]byte, error)
- func (client *GraphClient) UploadFile(path string, filename string, data []byte) error
- func (client *GraphClient) UploadLargeFile(path, filename string, data []byte) error
Constants ¶
View Source
const AuthUrl string = "https://login.microsoftonline.com/%s/oauth2/v2.0/authorize"
View Source
const RootUrl string = "https://graph.microsoft.com/v1.0"
View Source
const TokenUrl string = "https://login.microsoftonline.com/%s/oauth2/v2.0/token"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GraphClient ¶
func NewExistedGraphClient ¶
func NewExistedGraphClient(onedrive *OneDrive, ctx context.Context) *GraphClient
func NewGraphClient ¶
func (*GraphClient) BatchDo ¶
func (client *GraphClient) BatchDo(reqs []BatchReq) ([]BatchResp, error)
func (*GraphClient) CreateFolder ¶
func (client *GraphClient) CreateFolder(parentId, name string) (*DriveItem, error)
func (*GraphClient) CreateFolderRecursive ¶
func (client *GraphClient) CreateFolderRecursive(path string) (*DriveItem, error)
func (*GraphClient) DeleteItem ¶
func (client *GraphClient) DeleteItem(itemId string) error
func (*GraphClient) DownloadFile ¶
func (client *GraphClient) DownloadFile(itemId string) ([]byte, error)
func (*GraphClient) GetDrive ¶
func (client *GraphClient) GetDrive() (*[]Drive, error)
func (*GraphClient) GetItem ¶
func (client *GraphClient) GetItem(path, filename string) (*DriveItem, error)
func (*GraphClient) ListAllFiles ¶
func (client *GraphClient) ListAllFiles(root string, length int) ([]DriveItem, error)
func (*GraphClient) ListFiles ¶
func (client *GraphClient) ListFiles(path string, length int, nextUrl string) (*[]DriveItem, error)
func (*GraphClient) MakeShareLink ¶
func (client *GraphClient) MakeShareLink(item string) (string, error)
func (*GraphClient) MoveItem ¶
func (client *GraphClient) MoveItem(itemId, targetId string) error
func (*GraphClient) NewRequest ¶
func (*GraphClient) NewRequestJson ¶
func (client *GraphClient) NewRequestJson(method, url string, data interface{}) (*http.Request, error)
func (*GraphClient) NewRequestWithBuffer ¶
func (*GraphClient) ReadData ¶
func (client *GraphClient) ReadData(resp *http.Response) ([]byte, error)
func (*GraphClient) UploadFile ¶
func (client *GraphClient) UploadFile(path string, filename string, data []byte) error
UploadFile limit: 4MB
func (*GraphClient) UploadLargeFile ¶
func (client *GraphClient) UploadLargeFile(path, filename string, data []byte) error
Directories
¶
| Path | Synopsis |
|---|---|
|
Package quickxorhash provides the quickXorHash algorithm which is a quick, simple non-cryptographic hash algorithm that works by XORing the bytes in a circular-shifting fashion.
|
Package quickxorhash provides the quickXorHash algorithm which is a quick, simple non-cryptographic hash algorithm that works by XORing the bytes in a circular-shifting fashion. |
Click to show internal directories.
Click to hide internal directories.