Don't export types unnecessarily.
This commit is contained in:
parent
4ea25ec327
commit
efa5a09820
@ -39,7 +39,7 @@ func setAltSig(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
var request SetAltSigRequest
|
||||
var request setAltSigRequest
|
||||
if err := binding.JSON.BindBody(reqBytes, &request); err != nil {
|
||||
log.Warnf("%s: Bad request (clientIP=%s): %v", funcName, c.ClientIP(), err)
|
||||
sendErrorWithMsg(err.Error(), errBadRequest, c)
|
||||
@ -100,7 +100,7 @@ func setAltSig(c *gin.Context) {
|
||||
sigStr := c.GetHeader("VSP-Client-Signature")
|
||||
|
||||
// Send success response to client.
|
||||
res, resSig := sendJSONResponse(SetAltSigResponse{
|
||||
res, resSig := sendJSONResponse(setAltSigResponse{
|
||||
Timestamp: time.Now().Unix(),
|
||||
Request: reqBytes,
|
||||
}, c)
|
||||
|
||||
@ -171,7 +171,7 @@ func TestSetAltSig(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
ticketHash := randString(64, hexCharset)
|
||||
req := &SetAltSigRequest{
|
||||
req := &setAltSigRequest{
|
||||
Timestamp: time.Now().Unix(),
|
||||
TicketHash: ticketHash,
|
||||
TicketHex: randString(504, hexCharset),
|
||||
|
||||
@ -72,7 +72,7 @@ type ticketStatusResponse struct {
|
||||
Request []byte `json:"request"`
|
||||
}
|
||||
|
||||
type SetAltSigRequest struct {
|
||||
type setAltSigRequest struct {
|
||||
Timestamp int64 `json:"timestamp" binding:"required"`
|
||||
TicketHash string `json:"tickethash" binding:"required"`
|
||||
TicketHex string `json:"tickethex" binding:"required"`
|
||||
@ -80,7 +80,7 @@ type SetAltSigRequest struct {
|
||||
AltSigAddress string `json:"altsigaddress" binding:"required"`
|
||||
}
|
||||
|
||||
type SetAltSigResponse struct {
|
||||
type setAltSigResponse struct {
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Request []byte `json:"request"`
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user