-
Notifications
You must be signed in to change notification settings - Fork 0
/
gcp.go
39 lines (31 loc) · 826 Bytes
/
gcp.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// ro - Copyright (c) Victhor Sartório, 2020-. All rights reserved.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package gcp
import (
"github.com/vsartor/ro/donna"
"github.com/vsartor/ro/weems"
)
var logger weems.Logger
func initGcp() {
logger = weems.NewLogger("gcp")
}
func Cmd() {
initGcp()
donna.ForgetDispatch()
donna.ExpectDispatch("cluster", "Create a Dataproc cluster.")
donna.ExpectDispatch("upload", "Upload a file or directory to a bucket.")
command, ok := donna.NextArg()
if !ok {
donna.DisplayDispatchHelp()
}
switch command {
case "cluster":
clusterCmd()
case "upload":
uploadCmd()
default:
donna.DisplayDispatchHelp()
}
}