[PD2] Client done except jwt token, login and register functions
This commit is contained in:
parent
c94831d0a2
commit
78031d8e70
16 changed files with 698 additions and 337 deletions
|
@ -31,6 +31,10 @@ type (
|
|||
Certificate []byte `json:"certificate"`
|
||||
}
|
||||
|
||||
StoreUserCert struct {
|
||||
Certificate []byte `json:"certificate"`
|
||||
}
|
||||
|
||||
AnswerGetUnreadMsgsInfo struct {
|
||||
Page int `json:"page"`
|
||||
NumPages int `json:"num_pages"`
|
||||
|
@ -59,8 +63,8 @@ type (
|
|||
}
|
||||
|
||||
PostLogin struct {
|
||||
UID string `json:"uid"`
|
||||
Password string `json:"password"`
|
||||
UID string `json:"uid"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
ReportError struct {
|
||||
|
@ -113,19 +117,24 @@ func NewMsgInfo(num int, fromUID string, subject []byte, timestamp time.Time) Ms
|
|||
}
|
||||
}
|
||||
|
||||
func NewPostRegister(UID string,Password string,Certificate []byte) PostRegister {
|
||||
return PostRegister{
|
||||
UID: UID,
|
||||
Password: Password,
|
||||
Certificate: Certificate,
|
||||
}
|
||||
func NewPostRegister(UID string, Password string, Certificate []byte) PostRegister {
|
||||
return PostRegister{
|
||||
UID: UID,
|
||||
Password: Password,
|
||||
Certificate: Certificate,
|
||||
}
|
||||
}
|
||||
func NewStoreUserCert(certificate []byte) StoreUserCert {
|
||||
return StoreUserCert{
|
||||
Certificate: certificate,
|
||||
}
|
||||
}
|
||||
|
||||
func NewPostLogin(UID string,Password string) PostLogin {
|
||||
return PostLogin{
|
||||
UID: UID,
|
||||
Password: Password,
|
||||
}
|
||||
func NewPostLogin(UID string, Password string) PostLogin {
|
||||
return PostLogin{
|
||||
UID: UID,
|
||||
Password: Password,
|
||||
}
|
||||
}
|
||||
|
||||
func NewAnswerGetMsg(fromUID, toUID string, subject []byte, body []byte, timestamp time.Time, last bool) AnswerGetMsg {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue