Files
Andriy Oblivantsev 59c9a719e0
CI / test (push) Successful in 3s
Add public GeoJSON features API and load public 3D objects on maps.
Expose GET /v1/features/public (optional kind filter) and update Leaflet/MapLibre demos to render all public 3D assets globally, while still merging owner collections after login.

Made-with: Cursor
2026-03-02 22:21:21 +00:00

35 lines
1.2 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
SaveUserLogin(ul UserLogin)
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
ListFeaturesAll() []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)
}