aboutsummaryrefslogtreecommitdiff
path: root/internal/remote/remote.go
blob: 7280c666351fe1a38c55f8b7af46c1d938f24599 (plain) (blame)
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
package remote

type Operation int

const (
	Pull Operation = iota
	Push
	Fetch
)

func (o Operation) String() string {
	switch o {
	case Pull:
		return "pull"
	case Push:
		return "push"
	case Fetch:
		return "fetch"
	default:
		return "unknown"
	}
}

func (o Operation) Verb() string {
	switch o {
	case Pull:
		return "Pulling"
	case Push:
		return "Pushing"
	case Fetch:
		return "Fetching"
	default:
		return "Operating"
	}
}

func (o Operation) PastTense() string {
	switch o {
	case Pull:
		return "Pulled"
	case Push:
		return "Pushed"
	case Fetch:
		return "Fetched"
	default:
		return "Completed"
	}
}

const All = "all"