Versions in this module Expand all Collapse all v0 v0.1.11 Nov 17, 2022 Changes in this version type AuthToken + Label string + TokenHash string type DFERecord + DealUUID string v0.1.10 Oct 22, 2022 v0.1.9 Sep 12, 2022 v0.1.8 Jul 29, 2022 Changes in this version type Content + Filename string v0.1.7 Jul 21, 2022 v0.1.6 Jul 21, 2022 v0.1.5 Jul 21, 2022 v0.1.4 Jul 18, 2022 v0.1.3 Jul 9, 2022 v0.1.2 Jun 29, 2022 v0.1.1 Jun 24, 2022 v0.1.1-alpha Jun 18, 2022 v0.1.0 Jun 8, 2022 v0.0.1 Jun 8, 2022 Changes in this version + var ErrNotFiltered = errors.New("actions requires query to be filtered, but no filters were applied") + type AuthToken struct + Expiry time.Time + Token string + User UserID + type AuthTokensQuery struct + DB *gorm.DB + func NewAuthTokensQuery(db *gorm.DB) *AuthTokensQuery + func (q *AuthTokensQuery) Create(authToken AuthToken) error + type ClaimedInvite struct + ClaimedBy string + Code string + Username string + type Collection struct + CreatedAt time.Time + Description string + ID CollectionID + Name string + UUID string + UserID UserID + type CollectionID uint + type CollectionRef struct + Collection CollectionID + Content ContentID + CreatedAt time.Time + ID CollectionRefID + type CollectionRefID uint + type CollectionRefsQuery struct + DB *gorm.DB + func NewCollectionRefsQuery(db *gorm.DB) *CollectionRefsQuery + func (q *CollectionRefsQuery) Create(collectionRef CollectionRef) error + type CollectionsQuery struct + DB *gorm.DB + func NewCollectionsQuery(db *gorm.DB) *CollectionsQuery + func (q *CollectionsQuery) Get() (Collection, error) + func (q *CollectionsQuery) WithUUID(uuid string) *CollectionsQuery + func (q *CollectionsQuery) WithUserID(userID uint) *CollectionsQuery + type Content struct + Active bool + Aggregate bool + AggregatedIn ContentID + Cid util.DbCID + CreatedAt time.Time + DeletedAt gorm.DeletedAt + Description string + Failed bool + ID uint + Location string + Name string + Offloaded bool + PinMeta string + Pinning bool + Replication int + Size int64 + Type util.ContentType + UpdatedAt time.Time + UserID UserID + type ContentID uint + type ContentsQuery struct + DB *gorm.DB + func NewContentsQuery(db *gorm.DB) *ContentsQuery + func (q *ContentsQuery) Count() (int64, error) + func (q *ContentsQuery) CreateAll(contents []Content) error + func (q *ContentsQuery) Delete() error + func (q *ContentsQuery) Get() (Content, error) + func (q *ContentsQuery) GetAll() ([]Content, error) + func (q *ContentsQuery) Limit(limit int) *ContentsQuery + func (q *ContentsQuery) Offset(offset int) *ContentsQuery + func (q *ContentsQuery) OrderByCreationDate(order DBSortOrder) *ContentsQuery + func (q *ContentsQuery) OrderByID(order DBSortOrder) *ContentsQuery + func (q *ContentsQuery) WithActive(active bool) *ContentsQuery + func (q *ContentsQuery) WithAggregate(aggregate bool) *ContentsQuery + func (q *ContentsQuery) WithAggregatedIn(contentID uint) *ContentsQuery + func (q *ContentsQuery) WithCid(cid gocid.Cid) *ContentsQuery + func (q *ContentsQuery) WithCids(cids []gocid.Cid) *ContentsQuery + func (q *ContentsQuery) WithID(id uint) *ContentsQuery + func (q *ContentsQuery) WithUserID(userID uint) *ContentsQuery + type DBMgr struct + DB *gorm.DB + func NewDBMgr(dbval string) (*DBMgr, error) + func (mgr *DBMgr) AuthTokens() *AuthTokensQuery + func (mgr *DBMgr) CollectionRefs() *CollectionRefsQuery + func (mgr *DBMgr) Collections() *CollectionsQuery + func (mgr *DBMgr) Contents() *ContentsQuery + func (mgr *DBMgr) DFERecords() *DFERecordsQuery + func (mgr *DBMgr) Deals() *DealsQuery + func (mgr *DBMgr) InviteCodes() *InviteCodesQuery + func (mgr *DBMgr) MinerStorageAsks() *MinerStorageAsksQuery + func (mgr *DBMgr) ObjRefs() *ObjRefsQuery + func (mgr *DBMgr) Objects() *ObjectsQuery + func (mgr *DBMgr) PieceCommRecords() *PieceCommRecordsQuery + func (mgr *DBMgr) ProposalRecords() *ProposalRecordsQuery + func (mgr *DBMgr) RetrievalFailureRecords() *RetrievalFailureRecordsQuery + func (mgr *DBMgr) RetrievalSuccessRecords() *RetrievalSuccessRecordsQuery + func (mgr *DBMgr) Shuttles() *ShuttlesQuery + func (mgr *DBMgr) StorageMiners() *StorageMinersQuery + func (mgr *DBMgr) Users() *UsersQuery + type DBSortOrder int + const OrderAscending + const OrderDescending + type DFERecord struct + Content uint + Message string + Miner string + MinerVersion string + Phase string + type DFERecordsQuery struct + DB *gorm.DB + func NewDFERecordsQuery(db *gorm.DB) *DFERecordsQuery + func (q *DFERecordsQuery) Count() (int64, error) + func (q *DFERecordsQuery) WithContent(contentID uint) *DFERecordsQuery + type Deal struct + Content uint + DTChan string + DealID int64 + Failed bool + FailedAt time.Time + Miner string + OnChainAt time.Time + PropCid util.DbCID + SealedAt time.Time + TransferFinished time.Time + TransferStarted time.Time + Verified bool + type DealID uint + type DealsQuery struct + DB *gorm.DB + func NewDealsQuery(db *gorm.DB) *DealsQuery + func (q *DealsQuery) Count() (int64, error) + func (q *DealsQuery) Get() (Deal, error) + func (q *DealsQuery) GetAll() ([]Deal, error) + func (q *DealsQuery) WithContentID(contentID uint) *DealsQuery + func (q *DealsQuery) WithContentIDs(contentIDs []uint) *DealsQuery + func (q *DealsQuery) WithDealOnChain(valid bool) *DealsQuery + func (q *DealsQuery) WithFailed(failed bool) *DealsQuery + func (q *DealsQuery) WithID(id uint) *DealsQuery + func (q *DealsQuery) WithPropCid(propCid gocid.Cid) *DealsQuery + type InviteCode struct + ClaimedBy uint + Code string + CreatedBy uint + type InviteCodeID uint + type InviteCodesQuery struct + DB *gorm.DB + func NewInviteCodesQuery(db *gorm.DB) *InviteCodesQuery + func (q *InviteCodesQuery) Create(invite InviteCode) error + func (q *InviteCodesQuery) GetClaimedInvites() ([]ClaimedInvite, error) + type MinerStorageAsk struct + MaxPieceSize abi.PaddedPieceSize + MinPieceSize abi.PaddedPieceSize + Miner string + Price string + VerifiedPrice string + type MinerStorageAskID uint + type MinerStorageAsksQuery struct + DB *gorm.DB + func NewMinerStorageAsksQuery(db *gorm.DB) *MinerStorageAsksQuery + type ObjRef struct + Content ContentID + ID ObjRefID + Object ObjectID + Offloaded uint + type ObjRefID uint + type ObjRefStats struct + Bandwidth int64 + TotalReads int64 + type ObjRefsQuery struct + DB *gorm.DB + func NewObjRefsQuery(db *gorm.DB) *ObjRefsQuery + func (q *ObjRefsQuery) Delete() error + func (q *ObjRefsQuery) GetStats() (ObjRefStats, error) + func (q *ObjRefsQuery) WithContentID(contentID uint) *ObjRefsQuery + func (q *ObjRefsQuery) WithPinID(pinID uint) *ObjRefsQuery + type Object struct + Cid util.DbCID + ID ObjectID + LastAccess time.Time + Reads int + Size int + type ObjectID uint + type ObjectsQuery struct + DB *gorm.DB + func NewObjectsQuery(db *gorm.DB) *ObjectsQuery + func (q *ObjectsQuery) Count() (int64, error) + func (q *ObjectsQuery) DeleteUnreferenced(ids []uint) error + func (q *ObjectsQuery) Exists() (bool, error) + func (q *ObjectsQuery) WithCid(cid gocid.Cid) *ObjectsQuery + type PieceCommRecord struct + Data util.DbCID + Piece util.DbCID + Size abi.UnpaddedPieceSize + type PieceCommRecordsQuery struct + DB *gorm.DB + func NewPieceCommRecordsQuery(db *gorm.DB) *PieceCommRecordsQuery + type ProposalRecord struct + Data []byte + PropCid util.DbCID + type ProposalRecordsQuery struct + DB *gorm.DB + func NewProposalRecordsQuery(db *gorm.DB) *ProposalRecordsQuery + func (q *ProposalRecordsQuery) Get() (ProposalRecord, error) + func (q *ProposalRecordsQuery) WithPropCid(cid gocid.Cid) *ProposalRecordsQuery + type RetrievalFailureRecord struct + Cid util.DbCID + Content ContentID + Message string + Miner string + Phase string + type RetrievalFailureRecordID uint + type RetrievalFailureRecordsQuery struct + DB *gorm.DB + func NewRetrievalFailureRecordsQuery(db *gorm.DB) *RetrievalFailureRecordsQuery + func (q *RetrievalFailureRecordsQuery) Count() (int64, error) + type RetrievalSuccessRecord struct + AskPrice string + AverageSpeed uint64 + Cid util.DbCID + CreatedAt time.Time + DurationMs int64 + ID uint + Miner string + NumPayments int + Peer string + Size uint64 + TotalPayment string + type RetrievalSuccessRecordID uint + type RetrievalSuccessRecordsQuery struct + DB *gorm.DB + func NewRetrievalSuccessRecordsQuery(db *gorm.DB) *RetrievalSuccessRecordsQuery + func (q *RetrievalSuccessRecordsQuery) Count() (int64, error) + type Shuttle struct + Handle string + Host string + Open bool + PeerID string + Priority int + Private bool + type ShuttleID uint + type ShuttlesQuery struct + DB *gorm.DB + func NewShuttlesQuery(db *gorm.DB) *ShuttlesQuery + type StorageMiner struct + Address util.DbAddr + Location string + Name string + Owner UserID + Suspended bool + SuspendedReason string + Version string + type StorageMinerID uint + type StorageMinersQuery struct + DB *gorm.DB + func NewStorageMinersQuery(db *gorm.DB) *StorageMinersQuery + func (q *StorageMinersQuery) Count() (int64, error) + func (q *StorageMinersQuery) Delete() error + func (q *StorageMinersQuery) Get() (StorageMiner, error) + func (q *StorageMinersQuery) GetAll() ([]StorageMiner, error) + func (q *StorageMinersQuery) SetName(name string) error + func (q *StorageMinersQuery) WithAddress(addr address.Address) *StorageMinersQuery + type User struct + Address util.DbAddr + Flags int + PassHash string + Perm int + StorageDisabled bool + UUID string + UserEmail string + Username string + type UserID uint + type UsersQuery struct + DB *gorm.DB + func NewUsersQuery(db *gorm.DB) *UsersQuery + func (q *UsersQuery) Count() (int64, error) + func (q *UsersQuery) Create(user User) error + func (q *UsersQuery) Exists() (bool, error) + func (q *UsersQuery) ExpectDelete() error + func (q *UsersQuery) Get() (User, error) + func (q *UsersQuery) WithID(id uint) *UsersQuery + func (q *UsersQuery) WithUsername(username string) *UsersQuery