#1: Pull queue into struct, add storage interface

This commit is contained in:
ErickSkrauch
2019-04-15 02:52:00 +03:00
parent 879a33344b
commit fd4e5eb9ca
2 changed files with 40 additions and 14 deletions

View File

@@ -0,0 +1,19 @@
package queue
import "github.com/elyby/chrly/api/mojang"
type Storage interface {
Get(username string) *mojang.SignedTexturesResponse
Set(textures *mojang.SignedTexturesResponse)
}
// NilStorage used for testing purposes
type NilStorage struct {
}
func (*NilStorage) Get(username string) *mojang.SignedTexturesResponse {
return nil
}
func (*NilStorage) Set(textures *mojang.SignedTexturesResponse) {
}