Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Add go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
fionera committed Oct 15, 2019
1 parent dd3cbd3 commit 1eba794
Show file tree
Hide file tree
Showing 25 changed files with 178 additions and 30 deletions.
5 changes: 1 addition & 4 deletions api/drive/teamdrive.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import (
)

func (a *Api) CreateTeamDrive(name string) (*drive.Drive, error) {
id, err := uuid.NewV4()
if err != nil {
return nil, err
}
id := uuid.NewV4()

teamDrive, err := a.drive.Drives.Create(id.String(), &drive.Drive{
Name: name,
Expand Down
10 changes: 5 additions & 5 deletions cmd/assign/address/address.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package address

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/admin"
"github.com/fionera/TeamDriveManager/api/drive"
"github.com/fionera/TeamDriveManager/api/iam"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)

func NewAssignAddressCmd() cli.Command {
return cli.Command{
Name: "address",
Usage: "Assign an address to a specified teamdrive",
Action: CmdAssignAddress,
Flags: []cli.Flag{},
Name: "address",
Usage: "Assign an address to a specified teamdrive",
Action: CmdAssignAddress,
Flags: []cli.Flag{},
UsageText: "<TEAMDRIVE> <ADDRESS>",
}
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/assign/assign.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package group

import (
"github.com/codegangsta/cli"
. "github.com/fionera/TeamDriveManager/cmd"
assignAddress "github.com/fionera/TeamDriveManager/cmd/assign/address"
assignGroup "github.com/fionera/TeamDriveManager/cmd/assign/group"
assignServiceAccount "github.com/fionera/TeamDriveManager/cmd/assign/serviceaccount"
"github.com/urfave/cli"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/assign/group/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package group
import (
"crypto/sha256"
"fmt"
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/admin"
"github.com/fionera/TeamDriveManager/api/drive"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
drive2 "google.golang.org/api/drive/v3"
"google.golang.org/api/googleapi"
"gopkg.in/AlecAivazis/survey.v1"
Expand Down
2 changes: 1 addition & 1 deletion cmd/assign/serviceaccount/serviceaccount.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package serviceaccount

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/admin"
"github.com/fionera/TeamDriveManager/api/iam"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
gIAM "google.golang.org/api/iam/v1"
"gopkg.in/AlecAivazis/survey.v1"
"os"
Expand Down
2 changes: 1 addition & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cmd

import (
"github.com/codegangsta/cli"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"os"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/combinations/combinations.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package combinations

import (
"github.com/codegangsta/cli"
. "github.com/fionera/TeamDriveManager/cmd"
"github.com/urfave/cli"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/combinations/project_accounts_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"encoding/base64"
"fmt"
"github.com/Jeffail/gabs"
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/cloudresourcemanager"
"github.com/fionera/TeamDriveManager/api/iam"
"github.com/fionera/TeamDriveManager/api/servicemanagement"
"github.com/fionera/TeamDriveManager/cmd/assign/serviceaccount"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"gopkg.in/AlecAivazis/survey.v1"
"io/ioutil"
"os"
Expand Down
2 changes: 1 addition & 1 deletion cmd/create/create.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package create

import (
"github.com/codegangsta/cli"
. "github.com/fionera/TeamDriveManager/cmd"
"github.com/urfave/cli"

createGroup "github.com/fionera/TeamDriveManager/cmd/create/group"
createProject "github.com/fionera/TeamDriveManager/cmd/create/project"
Expand Down
2 changes: 1 addition & 1 deletion cmd/create/group/group.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package project

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/admin"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/create/project/project.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package project

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/cloudresourcemanager"
"github.com/fionera/TeamDriveManager/api/servicemanagement"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)

func NewCommand() cli.Command {
Expand Down
2 changes: 1 addition & 1 deletion cmd/create/serviceaccount/serviceaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package serviceaccount
import (
"encoding/base64"
"github.com/Jeffail/gabs"
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/cloudresourcemanager"
"github.com/fionera/TeamDriveManager/api/iam"
"github.com/fionera/TeamDriveManager/api/servicemanagement"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"io/ioutil"
"os"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/create/teamdrive/teamdrive.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package teamdrive

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/drive"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)

func NewCommand() cli.Command {
Expand Down
2 changes: 1 addition & 1 deletion cmd/delete/delete.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package create

import (
"github.com/codegangsta/cli"
. "github.com/fionera/TeamDriveManager/cmd"
deleteProject "github.com/fionera/TeamDriveManager/cmd/delete/project"
deleteServiceaccount "github.com/fionera/TeamDriveManager/cmd/delete/serviceaccount"
"github.com/urfave/cli"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/delete/project/project.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package teamdrive

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/cloudresourcemanager"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"gopkg.in/AlecAivazis/survey.v1"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/delete/serviceaccount/serviceaccount.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package serviceaccount

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/cloudresourcemanager"
"github.com/fionera/TeamDriveManager/api/iam"
"github.com/fionera/TeamDriveManager/api/servicemanagement"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
iam2 "google.golang.org/api/iam/v1"
"sync"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/list/group/group.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package teamdrive

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/admin"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/list/list.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package create

import (
"github.com/codegangsta/cli"
. "github.com/fionera/TeamDriveManager/cmd"
listGroups "github.com/fionera/TeamDriveManager/cmd/list/group"
listProjects "github.com/fionera/TeamDriveManager/cmd/list/project"
listServiceAccounts "github.com/fionera/TeamDriveManager/cmd/list/serviceaccount"
listTeamDrives "github.com/fionera/TeamDriveManager/cmd/list/teamdrive"
"github.com/urfave/cli"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/list/member/member.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package teamdrive

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/admin"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)

func NewCommand() cli.Command {
Expand Down
2 changes: 1 addition & 1 deletion cmd/list/project/project.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package teamdrive

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/cloudresourcemanager"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/list/serviceaccount/serviceaccount.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package teamdrive

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/iam"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)

func NewCommand() cli.Command {
Expand Down
2 changes: 1 addition & 1 deletion cmd/list/teamdrive/teamdrive.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package teamdrive

import (
"github.com/codegangsta/cli"
"github.com/fionera/TeamDriveManager/api"
"github.com/fionera/TeamDriveManager/api/drive"
. "github.com/fionera/TeamDriveManager/config"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"gopkg.in/AlecAivazis/survey.v1"
"strings"
)
Expand Down
15 changes: 15 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module github.com/fionera/TeamDriveManager

go 1.13

require (
github.com/Jeffail/gabs v1.4.0
github.com/mitchellh/go-homedir v1.1.0
github.com/pkg/errors v0.8.1
github.com/satori/go.uuid v1.2.0
github.com/sirupsen/logrus v1.4.2
github.com/urfave/cli v1.22.1
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
google.golang.org/api v0.11.0
gopkg.in/AlecAivazis/survey.v1 v1.8.7
)
Loading

0 comments on commit 1eba794

Please sign in to comment.