CreateObject creates an LFS object record in database.
(ctx context.Context, repoID int64, oid lfsutil.OID, size int64, storage lfsutil.Storage)
| 32 | |
| 33 | // CreateObject creates an LFS object record in database. |
| 34 | func (s *LFSStore) CreateObject(ctx context.Context, repoID int64, oid lfsutil.OID, size int64, storage lfsutil.Storage) error { |
| 35 | object := &LFSObject{ |
| 36 | RepoID: repoID, |
| 37 | OID: oid, |
| 38 | Size: size, |
| 39 | Storage: storage, |
| 40 | } |
| 41 | return s.db.WithContext(ctx).Create(object).Error |
| 42 | } |
| 43 | |
| 44 | type ErrLFSObjectNotExist struct { |
| 45 | args errutil.Args |