Refactor character to types
This commit is contained in:
@@ -4,9 +4,9 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"go-eve-pi/esi"
|
||||
"go-eve-pi/types"
|
||||
wh "go-eve-pi/webhook"
|
||||
|
||||
logger "git.site.quack-lab.dev/dave/cylogger"
|
||||
@@ -23,18 +23,7 @@ type RouteHandler struct {
|
||||
|
||||
// SSOInterface defines the interface for SSO operations
|
||||
type SSOInterface interface {
|
||||
GetCharacter(ctx context.Context, characterName string) (Character, error)
|
||||
}
|
||||
|
||||
// Character represents a character with authentication info
|
||||
type Character struct {
|
||||
ID int64 `gorm:"primaryKey"`
|
||||
CharacterName string `gorm:"uniqueIndex"`
|
||||
AccessToken string
|
||||
RefreshToken string
|
||||
ExpiresAt time.Time
|
||||
UpdatedAt time.Time
|
||||
CreatedAt time.Time
|
||||
GetCharacter(ctx context.Context, characterName string) (types.Character, error)
|
||||
}
|
||||
|
||||
// NewRouteHandler creates a new route handler with dependencies
|
||||
|
||||
Reference in New Issue
Block a user