-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcaws.go
More file actions
49 lines (37 loc) · 875 Bytes
/
caws.go
File metadata and controls
49 lines (37 loc) · 875 Bytes
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
40
41
42
43
44
45
46
47
48
49
package main
import (
"github.com/rivo/tview"
"github.com/seike460/caws/awsservice"
)
// Caws CawsCore
type Caws struct {
App *tview.Application
Flex *tview.Flex
LList *tview.List
MList *tview.List
RList *tview.List
}
func newCaws() Caws {
app := tview.NewApplication()
serviceList := tview.NewList()
serviceList.SetTitle("- AWS Service -").SetBorder(true)
mlist := tview.NewList()
mlist.SetTitle("- Target -").SetBorder(true)
rlist := tview.NewList()
rlist.SetTitle("- Objects -").SetBorder(true)
flex := tview.NewFlex().
AddItem(serviceList, 20, 0, true).
AddItem(mlist, 0, 1, false).
AddItem(rlist, 0, 2, false)
return Caws{
App: app,
Flex: flex,
LList: serviceList,
MList: mlist,
RList: rlist,
}
}
func setS3Service(caws Caws) {
s := awsservice.NewS3()
s.SetBucketsList(caws.MList, caws.LList, caws.RList, caws.App)
}