transfer

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package transfer wraps the storagetransfer package in a simplified interface. All code MUST be correct by inspection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

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

Job wraps the storagetransfer API into a simple interface.

func NewJob

func NewJob(project string, service *storagetransfer.Service) *Job

NewJob creates a new Job.

func (*Job) Create

func (j *Job) Create(ctx context.Context, create *storagetransfer.TransferJob) (*storagetransfer.TransferJob, error)

Create will create a new transfer job.

func (*Job) Get

func (j *Job) Get(ctx context.Context, name string) (*storagetransfer.TransferJob, error)

Get retrieves the named transfer job.

func (*Job) Jobs

func (j *Job) Jobs(ctx context.Context, visit func(resp *storagetransfer.ListTransferJobsResponse) error) error

Jobs calls `visit` on all ENABLED transfer jobs in the current project.

func (*Job) Operations

func (j *Job) Operations(ctx context.Context, name string, visit func(r *storagetransfer.ListOperationsResponse) error) error

Operations lists all operations from the named job.

func (*Job) Update

func (j *Job) Update(ctx context.Context, name string, update *storagetransfer.UpdateTransferJobRequest) (*storagetransfer.TransferJob, error)

Update updates the named transfer job with the given configuration.

Jump to

Keyboard shortcuts

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