2fas-server/internal/api/browser_extension/domain/browser_extension.go

27 lines
514 B
Go
Raw Normal View History

2022-12-31 10:22:38 +01:00
package domain
import (
"github.com/google/uuid"
"gorm.io/gorm"
)
type BrowserExtension struct {
gorm.Model
Id uuid.UUID `gorm:"primarykey"`
Name string
BrowserName string
BrowserVersion string
PublicKey string
}
func NewBrowserExtension() *BrowserExtension {
return &BrowserExtension{}
}
type BrowserExtensionRepository interface {
Save(extension *BrowserExtension) error
Update(extension *BrowserExtension) error
FindById(id uuid.UUID) (*BrowserExtension, error)
}