mirror of
https://github.com/elyby/chrly.git
synced 2025-05-31 14:11:51 +05:30
#1: Pull queue into struct, add storage interface
This commit is contained in:
19
api/mojang/queue/storage.go
Normal file
19
api/mojang/queue/storage.go
Normal 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) {
|
||||
}
|
Reference in New Issue
Block a user