services

package
v0.3.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrObjectNotFound = errorapi.ErrNotFound

Deprecated: use errorapi.ErrNotFound.

Functions

This section is empty.

Types

type BucketsService

type BucketsService struct {
	// contains filtered or unexported fields
}

func (*BucketsService) AddScope

func (*BucketsService) Delete

func (s *BucketsService) Delete(ctx context.Context, bucket string) error

func (*BucketsService) DeleteProjectData added in v0.3.1

func (s *BucketsService) DeleteProjectData(ctx context.Context, organization, projectID string) (bucketapi.DeleteProjectDataResponse, error)

func (*BucketsService) DeleteScope added in v0.3.1

func (s *BucketsService) DeleteScope(ctx context.Context, bucket, organization, path, projectID string) error

func (*BucketsService) List

func (*BucketsService) ListScopes added in v0.3.1

func (s *BucketsService) ListScopes(ctx context.Context, bucket string) ([]bucketapi.BucketScopeResponse, error)

func (*BucketsService) Put

type DRSService

type DRSService struct {
	// contains filtered or unexported fields
}

func (*DRSService) DeleteObject added in v0.2.8

func (s *DRSService) DeleteObject(ctx context.Context, objectID string, deleteStorageData bool) error

func (*DRSService) GetAccessURL

func (s *DRSService) GetAccessURL(ctx context.Context, objectID, accessID string) (drsapi.AccessURL, error)

func (*DRSService) GetObject

func (s *DRSService) GetObject(ctx context.Context, objectID string) (drsapi.DrsObject, error)

func (*DRSService) ReplaceObject added in v0.3.9

func (s *DRSService) ReplaceObject(ctx context.Context, objectID, expectedOldSHA string, candidate drsapi.DrsObjectCandidate) (drsapi.DrsObject, error)

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 (*DataService) CanonicalObjectURL

func (d *DataService) CanonicalObjectURL(signedURL, bucketHint, fallbackDID string) (string, error)

func (*DataService) Delete

func (d *DataService) Delete(ctx context.Context, guid string) error

func (*DataService) DeleteFile

func (d *DataService) DeleteFile(ctx context.Context, guid string) (string, error)

func (*DataService) Download

func (d *DataService) Download(ctx context.Context, signedURL string, rangeStart, rangeEnd *int64) (*http.Response, error)

func (*DataService) DownloadURL

func (d *DataService) DownloadURL(ctx context.Context, did string, expiresIn int, redirect bool) (internalapi.InternalSignedURL, error)

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) 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) MultipartAbort added in v0.3.8

func (d *DataService) MultipartAbort(ctx context.Context, uploadID string) error

MultipartAbort releases a server-side multipart session. It is safe to repeat and does not run automatically for transient upload failures, so callers retain resumability until they explicitly abandon an upload.

func (*DataService) MultipartComplete

func (d *DataService) MultipartComplete(ctx context.Context, guid string, uploadID string, parts []transfer.MultipartPart) error

func (*DataService) MultipartCompleteWithLocation added in v0.3.8

func (d *DataService) MultipartCompleteWithLocation(ctx context.Context, guid string, uploadID string, parts []transfer.MultipartPart) (string, error)

MultipartCompleteWithLocation returns the storage location selected by the upload session.

func (*DataService) MultipartCompletionReplaySafe added in v0.3.8

func (d *DataService) MultipartCompletionReplaySafe(context.Context, string, string, []transfer.MultipartPart) bool

MultipartCompletionReplaySafe reports that the server makes completion retries idempotent.

func (*DataService) MultipartInit

func (d *DataService) MultipartInit(ctx context.Context, guid string) (string, error)

func (*DataService) MultipartPart

func (d *DataService) MultipartPart(ctx context.Context, guid string, uploadID string, partNum int, body io.Reader) (string, error)

func (*DataService) MultipartPartURLs added in v0.3.10

func (d *DataService) MultipartPartURLs(ctx context.Context, guid string, uploadID string, partNumbers []int32) (transfer.MultipartPartURLBatch, error)

func (*DataService) ResolveDownloadURL

func (d *DataService) ResolveDownloadURL(ctx context.Context, guid string, accessID string) (string, error)

func (*DataService) ResolveUploadURL

func (d *DataService) ResolveUploadURL(ctx context.Context, guid, filename string, metadata common.FileMetadata, bucket string) (string, error)

func (*DataService) Stat

func (*DataService) Upload

func (d *DataService) Upload(ctx context.Context, url string, body io.Reader, size int64) error

func (*DataService) UploadPart

func (d *DataService) UploadPart(ctx context.Context, url string, body io.Reader, size int64) (string, error)

func (*DataService) UploadURL

type DeleteByQueryOptions

type DeleteByQueryOptions struct {
	Organization string
	ProjectID    string
	Hash         string
	HashType     string
}

type HealthService

type HealthService struct {
	// contains filtered or unexported fields
}

func NewHealthService

func NewHealthService(baseURL string, client request.HTTPDoer) *HealthService

func (*HealthService) Ping

func (h *HealthService) Ping(ctx context.Context) error

type IndexService

type IndexService struct {
	// contains filtered or unexported fields
}

func (*IndexService) Delete

func (s *IndexService) Delete(ctx context.Context, did string) error

func (*IndexService) DeleteByQuery

func (*IndexService) Get

func (*IndexService) List

func (*IndexService) RemoveControlledAccess added in v0.2.8

func (s *IndexService) RemoveControlledAccess(ctx context.Context, did, resource string) (internalapi.InternalRecordResponse, error)

func (*IndexService) Upsert

func (s *IndexService) Upsert(ctx context.Context, did, objectURL, recordPath string, size int64, sha256sum string, authorizations map[string][]string) error

type LFSService

type LFSService struct {
	// contains filtered or unexported fields
}

func (*LFSService) Batch

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.

func (*LFSService) Verify

func (s *LFSService) Verify(ctx context.Context, oid string, size int64) error

Verify verifies an uploaded object via the LFS Verify API.

type ListRecordsOptions

type ListRecordsOptions struct {
	Hash         string
	URL          string
	Organization string
	ProjectID    string
	Limit        int
	Start        string
	Page         int
}

type MetricsFilesOptions

type MetricsFilesOptions struct {
	Limit        int
	Offset       int
	InactiveDays int
	Organization string
	ProjectID    string
}

type MetricsService

type MetricsService struct {
	// contains filtered or unexported fields
}

func (*MetricsService) File

func (s *MetricsService) File(ctx context.Context, objectID string) (metricsapi.FileUsage, error)

func (*MetricsService) Files

func (*MetricsService) Summary

func (*MetricsService) TransferBreakdown

func (*MetricsService) TransferBreakdownPage added in v0.3.9

func (s *MetricsService) TransferBreakdownPage(ctx context.Context, opts TransferMetricsOptions, limit, offset int) (metricsapi.TransferBreakdownResponse, error)

TransferBreakdownPage fetches one bounded page. TransferBreakdown follows next_offset and collects every page for callers that need complete totals.

func (*MetricsService) TransferSummary

type MetricsSummaryOptions

type MetricsSummaryOptions struct {
	InactiveDays int
	Organization string
	ProjectID    string
}

type TransferMetricsOptions

type TransferMetricsOptions struct {
	Organization         string
	ProjectID            string
	Direction            string
	From                 string
	To                   string
	Provider             string
	Bucket               string
	SHA256               string
	User                 string
	GroupBy              string
	ReconciliationStatus string
	AllowStale           bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL