Documentation
¶
Index ¶
- Variables
- type BucketsService
- func (s *BucketsService) AddScope(ctx context.Context, bucket string, req bucketapi.AddBucketScopeRequest) error
- func (s *BucketsService) Delete(ctx context.Context, bucket string) error
- func (s *BucketsService) List(ctx context.Context) (bucketapi.BucketsResponse, error)
- func (s *BucketsService) Put(ctx context.Context, req bucketapi.PutBucketRequest) error
- type DRSPage
- type DRSService
- func (s *DRSService) BatchGetObjectsByHash(ctx context.Context, hashes []string) (DRSPage, error)
- func (s *DRSService) DeleteObject(ctx context.Context, objectID string, deleteStorageData bool) error
- func (s *DRSService) DeleteRecordsByHash(ctx context.Context, hash string) error
- func (s *DRSService) GetAccessURL(ctx context.Context, objectID, accessID string) (drsapi.AccessURL, error)
- func (s *DRSService) GetObject(ctx context.Context, objectID string) (drsapi.DrsObject, error)
- func (s *DRSService) GetProjectSample(ctx context.Context, projectID string, limit int) (DRSPage, error)
- func (s *DRSService) ListObjects(ctx context.Context, limit, page int) (DRSPage, error)
- func (s *DRSService) ListObjectsAfter(ctx context.Context, limit int, start string) (DRSPage, error)
- func (s *DRSService) ListObjectsByProject(ctx context.Context, projectID string, limit, page int) (DRSPage, error)
- func (s *DRSService) ListObjectsByProjectAfter(ctx context.Context, projectID string, limit int, start string) (DRSPage, error)
- func (s *DRSService) RegisterObjects(ctx context.Context, req drsapi.RegisterObjectsJSONRequestBody) (drsapi.N201ObjectsCreated, error)
- func (s *DRSService) Resolve(ctx context.Context, id string) (*transfer.ResolvedObject, error)
- func (s *DRSService) UpdateObjectAccessMethods(ctx context.Context, objectID string, accessMethods []drsapi.AccessMethod) (drsapi.DrsObject, error)
- type DataService
- func (d *DataService) CanonicalObjectURL(signedURL, bucketHint, fallbackDID string) (string, error)
- func (d *DataService) CompleteMultipartUpload(ctx context.Context, key, uploadID string, ...) error
- func (d *DataService) Delete(ctx context.Context, guid string) error
- func (d *DataService) DeleteFile(ctx context.Context, guid string) (string, error)
- func (d *DataService) Download(ctx context.Context, signedURL string, rangeStart, rangeEnd *int64) (*http.Response, error)
- func (d *DataService) DownloadURL(ctx context.Context, did string, expiresIn int, redirect bool) (internalapi.InternalSignedURL, error)
- func (d *DataService) GetMultipartUploadURL(ctx context.Context, key, uploadID string, partNum int32, bucket string) (string, error)
- func (d *DataService) GetRangeReader(ctx context.Context, guid string, offset, length int64) (io.ReadCloser, error)
- func (d *DataService) GetReader(ctx context.Context, guid string) (io.ReadCloser, error)
- func (d *DataService) GetWriter(ctx context.Context, guid string) (io.WriteCloser, error)
- func (d *DataService) InitMultipartUpload(ctx context.Context, guid, filename, bucket string) (string, string, error)
- func (d *DataService) InitMultipartUploadWithMetadata(ctx context.Context, guid, filename, bucket string, ...) (string, string, error)
- func (d *DataService) Logger() transfer.TransferLogger
- func (d *DataService) MultipartComplete(ctx context.Context, guid string, uploadID string, ...) error
- func (d *DataService) MultipartInit(ctx context.Context, guid string) (string, error)
- func (d *DataService) MultipartPart(ctx context.Context, guid string, uploadID string, partNum int, body io.Reader) (string, error)
- func (d *DataService) Name() string
- func (d *DataService) ResolveDownloadURL(ctx context.Context, guid string, accessID string) (string, error)
- func (d *DataService) ResolveUploadURL(ctx context.Context, guid, filename string, metadata common.FileMetadata, ...) (string, error)
- func (d *DataService) Stat(ctx context.Context, guid string) (*transfer.ObjectMetadata, error)
- func (d *DataService) Upload(ctx context.Context, url string, body io.Reader, size int64) error
- func (d *DataService) UploadBlank(ctx context.Context, req internalapi.InternalUploadBlankRequest) (internalapi.InternalUploadBlankOutput, error)
- func (d *DataService) UploadBulk(ctx context.Context, req internalapi.InternalUploadBulkRequest) (internalapi.InternalUploadBulkOutput, error)
- func (d *DataService) UploadPart(ctx context.Context, url string, body io.Reader, size int64) (string, error)
- func (d *DataService) UploadURL(ctx context.Context, req UploadURLRequest) (internalapi.InternalSignedURL, error)
- func (d *DataService) Validate(ctx context.Context, bucket string) error
- type DeleteByQueryOptions
- type HealthService
- type IndexService
- func (s *IndexService) BulkDocuments(ctx context.Context, dids []string) ([]internalapi.InternalRecordResponse, error)
- func (s *IndexService) BulkHashes(ctx context.Context, req internalapi.BulkHashesRequest) (internalapi.ListRecordsResponse, error)
- func (s *IndexService) BulkSHA256Validity(ctx context.Context, req internalapi.BulkSHA256ValidityRequest) (map[string]bool, error)
- func (s *IndexService) Create(ctx context.Context, rec internalapi.InternalRecord) (internalapi.InternalRecordResponse, error)
- func (s *IndexService) CreateBulk(ctx context.Context, req internalapi.BulkCreateRequest) (internalapi.ListRecordsResponse, error)
- func (s *IndexService) Delete(ctx context.Context, did string) error
- func (s *IndexService) DeleteBulk(ctx context.Context, req internalapi.BulkHashesRequest) (int, error)
- func (s *IndexService) DeleteByQuery(ctx context.Context, opts DeleteByQueryOptions) (internalapi.DeleteByQueryResponse, error)
- func (s *IndexService) Get(ctx context.Context, did string) (internalapi.InternalRecordResponse, error)
- func (s *IndexService) GetByHash(ctx context.Context, hash string) (internalapi.ListRecordsResponse, error)
- func (s *IndexService) List(ctx context.Context, opts ListRecordsOptions) (internalapi.ListRecordsResponse, error)
- func (s *IndexService) RemoveControlledAccess(ctx context.Context, did, resource string) (internalapi.InternalRecordResponse, error)
- func (s *IndexService) SHA256Validity(ctx context.Context, values []string) (map[string]bool, error)
- func (s *IndexService) Update(ctx context.Context, did string, rec internalapi.InternalRecord) (internalapi.InternalRecordResponse, error)
- func (s *IndexService) Upsert(ctx context.Context, did, objectURL, fileName string, size int64, ...) error
- type LFSService
- func (s *LFSService) Batch(ctx context.Context, op lfsapi.BatchRequestOperation, ...) (*lfsapi.BatchResponse, error)
- func (s *LFSService) StageMetadata(ctx context.Context, candidates []lfsapi.DrsObjectCandidate, ttl *int64) (int32, error)
- func (s *LFSService) Verify(ctx context.Context, oid string, size int64) error
- type ListRecordsOptions
- type MetricsFilesOptions
- type MetricsService
- func (s *MetricsService) File(ctx context.Context, objectID string) (metricsapi.FileUsage, error)
- func (s *MetricsService) Files(ctx context.Context, opts MetricsFilesOptions) ([]metricsapi.FileUsage, error)
- func (s *MetricsService) Summary(ctx context.Context, opts MetricsSummaryOptions) (metricsapi.FileUsageSummary, error)
- func (s *MetricsService) TransferBreakdown(ctx context.Context, opts TransferMetricsOptions) (TransferBreakdownResponse, error)
- func (s *MetricsService) TransferSummary(ctx context.Context, opts TransferMetricsOptions) (models.TransferAttributionSummary, error)
- type MetricsSummaryOptions
- type SyfonClient
- type TransferBreakdownResponse
- type TransferMetricsOptions
- type UploadURLRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoRecordsForHash = errors.New("no records found for hash")
View Source
var ErrObjectNotFound = errors.New("drs object not found")
Functions ¶
This section is empty.
Types ¶
type BucketsService ¶
type BucketsService struct {
// contains filtered or unexported fields
}
func NewBucketsService ¶
func NewBucketsService(gen bucketapi.ClientWithResponsesInterface) *BucketsService
func (*BucketsService) AddScope ¶
func (s *BucketsService) AddScope(ctx context.Context, bucket string, req bucketapi.AddBucketScopeRequest) error
func (*BucketsService) Delete ¶
func (s *BucketsService) Delete(ctx context.Context, bucket string) error
func (*BucketsService) List ¶
func (s *BucketsService) List(ctx context.Context) (bucketapi.BucketsResponse, error)
func (*BucketsService) Put ¶
func (s *BucketsService) Put(ctx context.Context, req bucketapi.PutBucketRequest) error
type DRSService ¶
type DRSService struct {
// contains filtered or unexported fields
}
func NewDRSService ¶
func NewDRSService(gen drsapi.ClientWithResponsesInterface, index *IndexService) *DRSService
func (*DRSService) BatchGetObjectsByHash ¶
func (*DRSService) DeleteObject ¶ added in v0.2.8
func (*DRSService) DeleteRecordsByHash ¶
func (s *DRSService) DeleteRecordsByHash(ctx context.Context, hash string) error
func (*DRSService) GetAccessURL ¶
func (*DRSService) GetProjectSample ¶
func (*DRSService) ListObjects ¶
func (*DRSService) ListObjectsAfter ¶ added in v0.3.0
func (*DRSService) ListObjectsByProject ¶
func (*DRSService) ListObjectsByProjectAfter ¶ added in v0.3.0
func (*DRSService) RegisterObjects ¶
func (s *DRSService) RegisterObjects(ctx context.Context, req drsapi.RegisterObjectsJSONRequestBody) (drsapi.N201ObjectsCreated, error)
func (*DRSService) Resolve ¶
func (s *DRSService) Resolve(ctx context.Context, id string) (*transfer.ResolvedObject, error)
Resolve implements transfer.Resolver by fetching object metadata from the DRS API.
func (*DRSService) UpdateObjectAccessMethods ¶ added in v0.3.0
func (s *DRSService) UpdateObjectAccessMethods(ctx context.Context, objectID string, accessMethods []drsapi.AccessMethod) (drsapi.DrsObject, error)
type DataService ¶
type DataService struct {
// contains filtered or unexported fields
}
func NewDataService ¶
func NewDataService(gen internalapi.ClientWithResponsesInterface, r request.Requester, l *logs.Gen3Logger, drs *DRSService) *DataService
func (*DataService) CanonicalObjectURL ¶
func (d *DataService) CanonicalObjectURL(signedURL, bucketHint, fallbackDID string) (string, error)
func (*DataService) CompleteMultipartUpload ¶
func (d *DataService) CompleteMultipartUpload(ctx context.Context, key, uploadID string, parts []internalapi.InternalMultipartPart, bucket string) error
func (*DataService) DeleteFile ¶
func (*DataService) DownloadURL ¶
func (d *DataService) DownloadURL(ctx context.Context, did string, expiresIn int, redirect bool) (internalapi.InternalSignedURL, error)
func (*DataService) GetMultipartUploadURL ¶
func (*DataService) GetRangeReader ¶
func (d *DataService) GetRangeReader(ctx context.Context, guid string, offset, length int64) (io.ReadCloser, error)
func (*DataService) GetReader ¶
func (d *DataService) GetReader(ctx context.Context, guid string) (io.ReadCloser, error)
func (*DataService) GetWriter ¶
func (d *DataService) GetWriter(ctx context.Context, guid string) (io.WriteCloser, error)
func (*DataService) InitMultipartUpload ¶
func (*DataService) InitMultipartUploadWithMetadata ¶ added in v0.3.0
func (d *DataService) InitMultipartUploadWithMetadata(ctx context.Context, guid, filename, bucket string, metadata common.FileMetadata) (string, string, error)
func (*DataService) Logger ¶
func (d *DataService) Logger() transfer.TransferLogger
func (*DataService) MultipartComplete ¶
func (d *DataService) MultipartComplete(ctx context.Context, guid string, uploadID string, parts []transfer.MultipartPart) error
func (*DataService) MultipartInit ¶
func (*DataService) MultipartPart ¶
func (*DataService) Name ¶
func (d *DataService) Name() string
func (*DataService) ResolveDownloadURL ¶
func (*DataService) ResolveUploadURL ¶
func (d *DataService) ResolveUploadURL(ctx context.Context, guid, filename string, metadata common.FileMetadata, bucket string) (string, error)
func (*DataService) Stat ¶
func (d *DataService) Stat(ctx context.Context, guid string) (*transfer.ObjectMetadata, error)
func (*DataService) UploadBlank ¶
func (d *DataService) UploadBlank(ctx context.Context, req internalapi.InternalUploadBlankRequest) (internalapi.InternalUploadBlankOutput, error)
func (*DataService) UploadBulk ¶
func (d *DataService) UploadBulk(ctx context.Context, req internalapi.InternalUploadBulkRequest) (internalapi.InternalUploadBulkOutput, error)
func (*DataService) UploadPart ¶
func (*DataService) UploadURL ¶
func (d *DataService) UploadURL(ctx context.Context, req UploadURLRequest) (internalapi.InternalSignedURL, error)
type DeleteByQueryOptions ¶
type HealthService ¶
type HealthService struct {
// contains filtered or unexported fields
}
func NewHealthService ¶
func NewHealthService(r request.Requester) *HealthService
type IndexService ¶
type IndexService struct {
// contains filtered or unexported fields
}
func NewIndexService ¶
func NewIndexService(gen internalapi.ClientWithResponsesInterface, r request.Requester) *IndexService
func (*IndexService) BulkDocuments ¶
func (s *IndexService) BulkDocuments(ctx context.Context, dids []string) ([]internalapi.InternalRecordResponse, error)
func (*IndexService) BulkHashes ¶
func (s *IndexService) BulkHashes(ctx context.Context, req internalapi.BulkHashesRequest) (internalapi.ListRecordsResponse, error)
func (*IndexService) BulkSHA256Validity ¶
func (s *IndexService) BulkSHA256Validity(ctx context.Context, req internalapi.BulkSHA256ValidityRequest) (map[string]bool, error)
func (*IndexService) Create ¶
func (s *IndexService) Create(ctx context.Context, rec internalapi.InternalRecord) (internalapi.InternalRecordResponse, error)
func (*IndexService) CreateBulk ¶
func (s *IndexService) CreateBulk(ctx context.Context, req internalapi.BulkCreateRequest) (internalapi.ListRecordsResponse, error)
func (*IndexService) DeleteBulk ¶
func (s *IndexService) DeleteBulk(ctx context.Context, req internalapi.BulkHashesRequest) (int, error)
func (*IndexService) DeleteByQuery ¶
func (s *IndexService) DeleteByQuery(ctx context.Context, opts DeleteByQueryOptions) (internalapi.DeleteByQueryResponse, error)
func (*IndexService) Get ¶
func (s *IndexService) Get(ctx context.Context, did string) (internalapi.InternalRecordResponse, error)
func (*IndexService) GetByHash ¶
func (s *IndexService) GetByHash(ctx context.Context, hash string) (internalapi.ListRecordsResponse, error)
func (*IndexService) List ¶
func (s *IndexService) List(ctx context.Context, opts ListRecordsOptions) (internalapi.ListRecordsResponse, error)
func (*IndexService) RemoveControlledAccess ¶ added in v0.2.8
func (s *IndexService) RemoveControlledAccess(ctx context.Context, did, resource string) (internalapi.InternalRecordResponse, error)
func (*IndexService) SHA256Validity ¶
func (*IndexService) Update ¶
func (s *IndexService) Update(ctx context.Context, did string, rec internalapi.InternalRecord) (internalapi.InternalRecordResponse, error)
type LFSService ¶
type LFSService struct {
// contains filtered or unexported fields
}
func NewLFSService ¶
func NewLFSService(gen lfsapi.ClientWithResponsesInterface) *LFSService
func (*LFSService) Batch ¶
func (s *LFSService) Batch(ctx context.Context, op lfsapi.BatchRequestOperation, objects []lfsapi.BatchRequestObject) (*lfsapi.BatchResponse, error)
Batch executes a Git LFS Batch API request.
func (*LFSService) StageMetadata ¶
func (s *LFSService) StageMetadata(ctx context.Context, candidates []lfsapi.DrsObjectCandidate, ttl *int64) (int32, error)
StageMetadata stages object metadata for deferred registration.
type ListRecordsOptions ¶
type MetricsFilesOptions ¶
type MetricsService ¶
type MetricsService struct {
// contains filtered or unexported fields
}
func NewMetricsService ¶
func NewMetricsService(gen metricsapi.ClientWithResponsesInterface) *MetricsService
func (*MetricsService) File ¶
func (s *MetricsService) File(ctx context.Context, objectID string) (metricsapi.FileUsage, error)
func (*MetricsService) Files ¶
func (s *MetricsService) Files(ctx context.Context, opts MetricsFilesOptions) ([]metricsapi.FileUsage, error)
func (*MetricsService) Summary ¶
func (s *MetricsService) Summary(ctx context.Context, opts MetricsSummaryOptions) (metricsapi.FileUsageSummary, error)
func (*MetricsService) TransferBreakdown ¶
func (s *MetricsService) TransferBreakdown(ctx context.Context, opts TransferMetricsOptions) (TransferBreakdownResponse, error)
func (*MetricsService) TransferSummary ¶
func (s *MetricsService) TransferSummary(ctx context.Context, opts TransferMetricsOptions) (models.TransferAttributionSummary, error)
type MetricsSummaryOptions ¶
type SyfonClient ¶
type SyfonClient interface {
Health() *HealthService
Data() *DataService
Index() *IndexService
DRS() *DRSService
Buckets() *BucketsService
Metrics() *MetricsService
LFS() *LFSService
}
SyfonClient defines the top-level interface for interacting with Syfon services.
type TransferBreakdownResponse ¶
type TransferBreakdownResponse struct {
GroupBy string `json:"group_by"`
Data []models.TransferAttributionBreakdown `json:"data"`
Freshness *models.TransferMetricsFreshness `json:"freshness,omitempty"`
}
type TransferMetricsOptions ¶
Click to show internal directories.
Click to hide internal directories.