Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(services/onedrive): Move services onedrive back #922

Merged
merged 9 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,7 @@ updates:
directory: "/services/obs"
schedule:
interval: daily
- package-ecosystem: gomod
directory: "/services/onedrive"
schedule:
interval: daily
2 changes: 2 additions & 0 deletions services/onedrive/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage.*
bin/
43 changes: 43 additions & 0 deletions services/onedrive/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
SHELL := /bin/bash

-include Makefile.env

.PHONY: all check format lint build test generate tidy

help:
@echo "Please use \`make <target>\` where <target> is one of"
@echo " check to do static check"
@echo " build to create bin directory and build"
@echo " generate to generate code"
@echo " test to run test"

check: vet

format:
go fmt ./...

vet:
go vet ./...

generate:
@echo "generate code"
go generate ./...
go fmt ./...

build: tidy generate check
go build ./...

test:
go test -race -coverprofile=coverage.txt -covermode=atomic -v .
go tool cover -html="coverage.txt" -o "coverage.html"

integration_test:
go test -race -count=1 -covermode=atomic -v ./tests

tidy:
go mod tidy
go mod verify

clean:
@echo "clean generated files"
find . -type f -name 'generated.go' -delete
2 changes: 2 additions & 0 deletions services/onedrive/Makefile.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export STORAGE_ONEDRIVE_INTEGRATION_TEST=on
export STORAGE_ONEDRIVE_CREDENTIAL=file:<abs_path_of_credential>
9 changes: 9 additions & 0 deletions services/onedrive/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## onedrive

Microsoft [OneDrive] (formerly SkyDrive) is a file hosting service and synchronization service operated
by Microsoft as part of its web version of Office.
This project will use [OneDrive]'s native SDK to implement [go-storage]'s Storager interface,
enabling users to manipulate data in [OneDrive] through a unified interface.

[OneDrive]: https://www.microsoft.com/en-us/microsoft-365/onedrive/online-cloud-storage
[go-storage]: https://github.com/beyondstorage/go-storage/
6 changes: 6 additions & 0 deletions services/onedrive/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
Package onedrive provided support for Microsoft onedrive(https://www.microsoft.com/zh-cn/microsoft-365/onedrive/online-cloud-storage).
*/
package onedrive

//go:generate go run -tags tools go.beyondstorage.io/v5/cmd/definitions service.toml
Loading