-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
108 lines (95 loc) · 1.89 KB
/
types.go
File metadata and controls
108 lines (95 loc) · 1.89 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
package main
import (
"html/template"
"time"
)
/*SecretType ...*/
type SecretType int
/*Enum user ...*/
const (
Text SecretType = 0
File SecretType = 1
)
/*Secret ...*/
type Secret struct {
//Secret Data for File
data []byte
//Type Text or File
ofType SecretType
//number of times valid
counter int
//Name of Secret
name string
//Password for Secret
pass string
//Two factor verification for User
twoFa string
//If Link is active or not
isActive bool
//If the Link has been visited but not jet retrived
visited bool
//Time of creation
createdOn time.Time
//How many minutes link should be valid
validFor int
}
/*Config user ...*/
type Config struct {
User string `json:"user"`
Password string `json:"password"`
Url string `json:"url"`
Logo string `json:"logo"`
Privacy string `json:"privacy"`
Mail string `json:"mail"`
}
/*ActiveLink active links ...*/
type ActiveLink struct {
Type string
Url template.URL
Count int
Name string
TwoFa string
State string
TimeLeft string
}
type pageData struct {
ActiveLinks []ActiveLink
Logo string
Footer template.HTML
}
type invalidPageData struct {
ActiveLinks []ActiveLink
Logo string
Footer template.HTML
Message string
}
type secretGetPageData struct {
Secret string
Tfa string
Logo string
Footer template.HTML
Pass template.HTML
}
type secretAuthData struct {
Secret string
Logo string
Footer template.HTML
}
type secretPreviewData struct {
Secret template.HTML
Url string
Logo string
Footer template.HTML
}
type secretPageHTMLData struct {
Secret template.HTML
Logo string
Footer template.HTML
}
type boolResponse struct {
Result bool `json:"result"`
}
type idRequest struct {
Id string `json:"Id"`
Tfa string `json:"Tfa"`
}