/
mac_sync_basic.go
81 lines (64 loc) · 1.47 KB
/
mac_sync_basic.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// +build !pro
package crane
import (
"errors"
)
type MacSync interface {
ContainerName() string
Volume() string
Autostart() bool
Exists() bool
Running() bool
Start(debug bool)
Stop()
Status() string
}
type macSync struct {
RawVolume string
RawFlags []string `json:"flags" yaml:"flags"`
RawImage string `json:"image" yaml:"image"`
Uid int `json:"uid" yaml:"uid"`
Gid int `json:"gid" yaml:"gid"`
RawAutostart bool `json:"autostart" yaml:"autostart"`
configPath string
cName string
volume string
}
func (s *macSync) ContainerName() string {
return ""
}
func (s *macSync) Volume() string {
return ""
}
func (s *macSync) Autostart() bool {
return false
}
func (s *macSync) Exists() bool {
return false
}
func (s *macSync) Running() bool {
return false
}
func (s *macSync) Status() string {
return "-"
}
var proOnly = "Mac Sync is not available in the free version, please purchase the pro version: https://www.craneup.tech"
func (s *macSync) Start(debug bool) {
panic(StatusError{errors.New(proOnly), 69})
}
func (s *macSync) Stop() {
panic(StatusError{errors.New(proOnly), 69})
}
func startSync(volumeArg string, debugFlag bool) {
panic(StatusError{errors.New(proOnly), 69})
}
func stopSync(volumeArg string) {
panic(StatusError{errors.New(proOnly), 69})
}
func printSyncStatus() {
panic(StatusError{errors.New(proOnly), 69})
}
func isSyncPossible() bool {
printInfof("%s\n", proOnly)
return false
}