Seperate API from UI

This commit is contained in:
video-prize-ranch
2023-01-01 15:12:03 -05:00
parent e03abd0ab9
commit a3feae6b30
11 changed files with 79 additions and 58 deletions

21
api/client.go Normal file
View File

@@ -0,0 +1,21 @@
package api
import (
"time"
"github.com/patrickmn/go-cache"
)
type Client struct {
ClientID string
Cache *cache.Cache
}
func NewClient(clientId string) (*Client) {
client := Client{
ClientID: clientId,
Cache: cache.New(15*time.Minute, 15*time.Minute),
}
return &client
}