Don't export types unnecessarily.

This commit is contained in:
jholdstock 2021-11-11 12:49:07 +00:00 committed by Jamie Holdstock
parent 4ea25ec327
commit efa5a09820
3 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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),

View File

@ -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"`
}