30 lines
555 B
Go
30 lines
555 B
Go
package types
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
"gorm.io/gorm"
|
|
"stereo.cat/backend/internal/auth/client"
|
|
)
|
|
|
|
type Route struct {
|
|
Path string
|
|
Method string
|
|
Exec func(cfg *StereoConfig) gin.HandlerFunc
|
|
}
|
|
|
|
type StereoConfig struct {
|
|
ImagePath string
|
|
Router *gin.Engine
|
|
Client client.Client
|
|
Database *gorm.DB
|
|
JWTSecret string
|
|
}
|
|
|
|
type File struct {
|
|
ID string `gorm:"primaryKey"`
|
|
Path string `gorm:"not null;index"`
|
|
Owner string `gorm:"not null;index"`
|
|
CreatedAt time.Time `gorm:"autoCreateTime"`
|
|
}
|