CI / test (pull_request) Successful in 4s
This introduces deduplicated per-user image/3D asset records linked into feature properties, adds visibility-controlled download routing, and wires local S3-compatible storage with automatic bucket bootstrap in Docker Compose. Made-with: Cursor
33 lines
1.1 KiB
Go
33 lines
1.1 KiB
Go
package store
|
|
|
|
import "time"
|
|
|
|
type Store interface {
|
|
UpsertUser(user User)
|
|
GetUser(publicKey string) (User, error)
|
|
CreateChallenge(ch Challenge) error
|
|
GetChallenge(nonce string) (Challenge, error)
|
|
MarkChallengeUsed(nonce string) error
|
|
SaveSession(session Session)
|
|
GetSession(token string) (Session, error)
|
|
SaveInvitation(inv Invitation) error
|
|
GetInvitation(jti string) (Invitation, error)
|
|
IncrementInvitationUsage(jti string) error
|
|
SaveCollection(c Collection)
|
|
ListCollectionsByOwner(owner string) []Collection
|
|
GetCollection(id string) (Collection, error)
|
|
DeleteCollection(id string) error
|
|
SaveFeature(f Feature)
|
|
ListFeaturesByCollection(collectionID string) []Feature
|
|
GetFeature(featureID string) (Feature, error)
|
|
DeleteFeature(featureID string) error
|
|
SaveAsset(a Asset)
|
|
GetAsset(assetID string) (Asset, error)
|
|
GetAssetByOwnerChecksumExt(ownerKey, checksum, ext string) (Asset, error)
|
|
SetAssetPublic(assetID string, isPublic bool) error
|
|
LinkAssetToFeature(featureID, assetID, name, description string) error
|
|
UnlinkAssetFromFeature(featureID, assetID string) error
|
|
ListAssetsByFeature(featureID string) []FeatureAsset
|
|
PruneExpired(now time.Time)
|
|
}
|