/
type.go
71 lines (61 loc) · 2.36 KB
/
type.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
package pasetobackend
import (
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
)
type Admin struct {
Email string `json:"email" bson:"email"`
Password string `json:"password" bson:"password"`
Role string `json:"role,omitempty" bson:"role,omitempty"`
Token string `json:"token,omitempty" bson:"token,omitempty"`
Private string `json:"private,omitempty" bson:"private,omitempty"`
Public string `json:"public,omitempty" bson:"public,omitempty"`
}
type Credential struct {
Status bool `json:"status" bson:"status"`
Token string `json:"token,omitempty" bson:"token,omitempty"`
Message string `json:"message,omitempty" bson:"message,omitempty"`
}
type Response struct {
Status bool `json:"status" bson:"status"`
Message string `json:"message" bson:"message"`
Data interface{} `json:"data" bson:"data"`
}
type Payload struct {
Admin string `json:"admin"`
Hp string `json:"hp"`
Role string `json:"role"`
Exp time.Time `json:"exp"`
Iat time.Time `json:"iat"`
Nbf time.Time `json:"nbf"`
}
// type Crawling struct {
// ID primitive.ObjectID `bson:"_id,omitempty" `
// Created_at string `json:"created_at" bson:"created_at"`
// Full_text string `json:"full_text" bson:"full_text"`
// Username string `json:"username" bson:"username"`
// Location string `json:"location" bson:"location"`
// }
type Hp struct {
ID primitive.ObjectID `bson:"_id,omitempty" `
Nomorid int `json:"nomorid" bson:"nomorid"`
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
Image string `json:"image" bson:"image"`
Status bool `json:"status" bson:"status"`
}
type About struct {
ID int `json:"id" bson:"id"`
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
Image string `json:"image" bson:"image"`
Status bool `json:"status" bson:"status"`
}
// type Contact struct {
// ID int `json:"id" bson:"id"`
// FullName string `json:"fullname" bson:"fullname"`
// Email string `json:"email" bson:"email"`
// Phone string `json:"phone" bson:"phone"`
// Message string `json:"image" bson:"image"`
// Status bool `json:"status" bson:"status"`
// }