diff options
| -rw-r--r-- | drive/share.go | 2 | ||||
| -rw-r--r-- | gdrive.go | 5 | ||||
| -rw-r--r-- | handlers_drive.go | 1 | 
3 files changed, 8 insertions, 0 deletions
| diff --git a/drive/share.go b/drive/share.go index 69b9c7d..e942c17 100644 --- a/drive/share.go +++ b/drive/share.go @@ -13,6 +13,7 @@ type ShareArgs struct {  	Role         string  	Type         string  	Email        string +	Domain       string  	Discoverable bool  } @@ -22,6 +23,7 @@ func (self *Drive) Share(args ShareArgs) error {  		Role:               args.Role,  		Type:               args.Type,  		EmailAddress:       args.Email, +		Domain:             args.Domain,  	}  	_, err := self.service.Permissions.Create(args.FileId, permission).Do() @@ -380,6 +380,11 @@ func main() {  						Patterns:    []string{"--email"},  						Description: "The email address of the user or group to share the file with. Requires 'user' or 'group' as type",  					}, +					cli.StringFlag{ +						Name:        "domain", +						Patterns:    []string{"--domain"}, +						Description: "The name of Google Apps domain. Requires 'domain' as type", +					},					  					cli.BoolFlag{  						Name:        "discoverable",  						Patterns:    []string{"--discoverable"}, diff --git a/handlers_drive.go b/handlers_drive.go index c89b8c2..516feff 100644 --- a/handlers_drive.go +++ b/handlers_drive.go @@ -241,6 +241,7 @@ func shareHandler(ctx cli.Context) {  		Role:         args.String("role"),  		Type:         args.String("type"),  		Email:        args.String("email"), +		Domain:       args.String("domain"),  		Discoverable: args.Bool("discoverable"),  	})  	checkErr(err) | 
