Artifact Registry API v1 - Package cloud.google.com/go/artifactregistry/apiv1 (v1.17.2)

Note: To get more information about this package, such as access to older versions, viewthis package on pkg.go.dev.

Package artifactregistry is an auto-generated package for theArtifact Registry API.

Store and manage build artifacts in a scalable and integrated servicebuilt on Google infrastructure.

General documentation

For information that is relevant for all client libraries please referencehttps://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on thispage includes:

Example usage

To get started with this package, create a client.

// go get cloud.google.com/go/artifactregistry/apiv1@latestctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()

The client will use your default application credentials. Clients should be reused instead of created as needed.The methods of Client are safe for concurrent use by multiple goroutines.The returned client must be Closed when it is done being used.

Using the Client

The following is an example of making an API call with the newly created client, mentioned above.

req:=&artifactregistrypb.BatchDeleteVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#BatchDeleteVersionsRequest.}op,err:=c.BatchDeleteVersions(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}

Use of Context

The ctx passed to NewClient is used for authentication requests andfor creating the underlying connection, but is not used for subsequent calls.Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

Functions

func DefaultAuthScopes

funcDefaultAuthScopes()[]string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

AttachmentIterator

typeAttachmentIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*artifactregistrypb.Attachment,nextPageTokenstring,errerror)// contains filtered or unexported fields}

AttachmentIterator manages a stream of *artifactregistrypb.Attachment.

func (*AttachmentIterator) All

func(it*AttachmentIterator)All()iter.Seq2[*artifactregistrypb.Attachment,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*AttachmentIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*AttachmentIterator) PageInfo

func(it*AttachmentIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

BatchDeleteVersionsOperation

typeBatchDeleteVersionsOperationstruct{// contains filtered or unexported fields}

BatchDeleteVersionsOperation manages a long-running operation from BatchDeleteVersions.

func (*BatchDeleteVersionsOperation) Done

Done reports whether the long-running operation has completed.

func (*BatchDeleteVersionsOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*BatchDeleteVersionsOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*BatchDeleteVersionsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*BatchDeleteVersionsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CallOptions

typeCallOptionsstruct{ListDockerImages[]gax.CallOptionGetDockerImage[]gax.CallOptionListMavenArtifacts[]gax.CallOptionGetMavenArtifact[]gax.CallOptionListNpmPackages[]gax.CallOptionGetNpmPackage[]gax.CallOptionListPythonPackages[]gax.CallOptionGetPythonPackage[]gax.CallOptionImportAptArtifacts[]gax.CallOptionImportYumArtifacts[]gax.CallOptionListRepositories[]gax.CallOptionGetRepository[]gax.CallOptionCreateRepository[]gax.CallOptionUpdateRepository[]gax.CallOptionDeleteRepository[]gax.CallOptionListPackages[]gax.CallOptionGetPackage[]gax.CallOptionDeletePackage[]gax.CallOptionListVersions[]gax.CallOptionGetVersion[]gax.CallOptionDeleteVersion[]gax.CallOptionBatchDeleteVersions[]gax.CallOptionUpdateVersion[]gax.CallOptionListFiles[]gax.CallOptionGetFile[]gax.CallOptionDeleteFile[]gax.CallOptionUpdateFile[]gax.CallOptionListTags[]gax.CallOptionGetTag[]gax.CallOptionCreateTag[]gax.CallOptionUpdateTag[]gax.CallOptionDeleteTag[]gax.CallOptionCreateRule[]gax.CallOptionListRules[]gax.CallOptionGetRule[]gax.CallOptionUpdateRule[]gax.CallOptionDeleteRule[]gax.CallOptionSetIamPolicy[]gax.CallOptionGetIamPolicy[]gax.CallOptionTestIamPermissions[]gax.CallOptionGetProjectSettings[]gax.CallOptionUpdateProjectSettings[]gax.CallOptionGetVPCSCConfig[]gax.CallOptionUpdateVPCSCConfig[]gax.CallOptionUpdatePackage[]gax.CallOptionListAttachments[]gax.CallOptionGetAttachment[]gax.CallOptionCreateAttachment[]gax.CallOptionDeleteAttachment[]gax.CallOptionGetLocation[]gax.CallOptionListLocations[]gax.CallOptionGetOperation[]gax.CallOption}

CallOptions contains the retry settings for each method of Client.

Client

typeClientstruct{// The call options for this service.CallOptions*CallOptions// LROClient is used internally to handle long-running operations.// It is exposed so that its CallOptions can be modified if required.// Users should not Close this client.LROClient*lroauto.OperationsClient// contains filtered or unexported fields}

Client is a client for interacting with Artifact Registry API.Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Artifact Registry API service.

Artifact Registry is an artifact management system for storing artifactsfrom different package management systems.

The resources managed by this API are:

Repositories, which group packages and their data.Packages, which group versions and their tags.Versions, which are specific forms of a package.Tags, which represent alternative names for versions.Files, which contain content and are optionally associated with a Packageor Version.

func NewClient

funcNewClient(ctxcontext.Context,opts...option.ClientOption)(*Client,error)

NewClient creates a new artifact registry client based on gRPC.The returned client must be Closed when it is done being used to clean up its underlying connections.

The Artifact Registry API service.

Artifact Registry is an artifact management system for storing artifactsfrom different package management systems.

The resources managed by this API are:

Repositories, which group packages and their data.Packages, which group versions and their tags.Versions, which are specific forms of a package.Tags, which represent alternative names for versions.Files, which contain content and are optionally associated with a Packageor Version.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}

func NewRESTClient

funcNewRESTClient(ctxcontext.Context,opts...option.ClientOption)(*Client,error)

NewRESTClient creates a new artifact registry rest client.

The Artifact Registry API service.

Artifact Registry is an artifact management system for storing artifactsfrom different package management systems.

The resources managed by this API are:

Repositories, which group packages and their data.Packages, which group versions and their tags.Versions, which are specific forms of a package.Tags, which represent alternative names for versions.Files, which contain content and are optionally associated with a Packageor Version.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}

func (*Client) BatchDeleteVersions

BatchDeleteVersions deletes multiple versions across a repository. The returned operation willcomplete once the versions have been deleted.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.BatchDeleteVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#BatchDeleteVersionsRequest.}op,err:=c.BatchDeleteVersions(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*Client) BatchDeleteVersionsOperation

func(c*Client)BatchDeleteVersionsOperation(namestring)*BatchDeleteVersionsOperation

BatchDeleteVersionsOperation returns a new BatchDeleteVersionsOperation from a given name.The name must be that of a previously created BatchDeleteVersionsOperation, possibly from a different process.

func (*Client) Close

func(c*Client)Close()error

Close closes the connection to the API service. The user should invoke this whenthe client is no longer required.

func (*Client) Connection (deprecated)

func(c*Client)Connection()*grpc.ClientConn

Connection returns a connection to the API service.

Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.

func (*Client) CreateAttachment

CreateAttachment creates an attachment. The returned Operation will finish once theattachment has been created. Its response will be the created attachment.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.CreateAttachmentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#CreateAttachmentRequest.}op,err:=c.CreateAttachment(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) CreateAttachmentOperation

func(c*Client)CreateAttachmentOperation(namestring)*CreateAttachmentOperation

CreateAttachmentOperation returns a new CreateAttachmentOperation from a given name.The name must be that of a previously created CreateAttachmentOperation, possibly from a different process.

func (*Client) CreateRepository

CreateRepository creates a repository. The returned Operation will finish once therepository has been created. Its response will be the created Repository.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.CreateRepositoryRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#CreateRepositoryRequest.}op,err:=c.CreateRepository(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) CreateRepositoryOperation

func(c*Client)CreateRepositoryOperation(namestring)*CreateRepositoryOperation

CreateRepositoryOperation returns a new CreateRepositoryOperation from a given name.The name must be that of a previously created CreateRepositoryOperation, possibly from a different process.

func (*Client) CreateRule

CreateRule creates a rule.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.CreateRuleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#CreateRuleRequest.}resp,err:=c.CreateRule(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) CreateTag

CreateTag creates a tag.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.CreateTagRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#CreateTagRequest.}resp,err:=c.CreateTag(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) DeleteAttachment

DeleteAttachment deletes an attachment. The returned Operation willfinish once the attachments has been deleted. It will not have anyOperation metadata and will return a google.protobuf.Empty response.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.DeleteAttachmentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#DeleteAttachmentRequest.}op,err:=c.DeleteAttachment(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*Client) DeleteAttachmentOperation

func(c*Client)DeleteAttachmentOperation(namestring)*DeleteAttachmentOperation

DeleteAttachmentOperation returns a new DeleteAttachmentOperation from a given name.The name must be that of a previously created DeleteAttachmentOperation, possibly from a different process.

func (*Client) DeleteFile

DeleteFile deletes a file and all of its content. It is only allowed on genericrepositories. The returned operation will complete once the file has beendeleted.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.DeleteFileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#DeleteFileRequest.}op,err:=c.DeleteFile(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*Client) DeleteFileOperation

func(c*Client)DeleteFileOperation(namestring)*DeleteFileOperation

DeleteFileOperation returns a new DeleteFileOperation from a given name.The name must be that of a previously created DeleteFileOperation, possibly from a different process.

func (*Client) DeletePackage

DeletePackage deletes a package and all of its versions and tags. The returned operationwill complete once the package has been deleted.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.DeletePackageRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#DeletePackageRequest.}op,err:=c.DeletePackage(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*Client) DeletePackageOperation

func(c*Client)DeletePackageOperation(namestring)*DeletePackageOperation

DeletePackageOperation returns a new DeletePackageOperation from a given name.The name must be that of a previously created DeletePackageOperation, possibly from a different process.

func (*Client) DeleteRepository

DeleteRepository deletes a repository and all of its contents. The returned Operation willfinish once the repository has been deleted. It will not have any Operationmetadata and will return a google.protobuf.Empty response.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.DeleteRepositoryRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#DeleteRepositoryRequest.}op,err:=c.DeleteRepository(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*Client) DeleteRepositoryOperation

func(c*Client)DeleteRepositoryOperation(namestring)*DeleteRepositoryOperation

DeleteRepositoryOperation returns a new DeleteRepositoryOperation from a given name.The name must be that of a previously created DeleteRepositoryOperation, possibly from a different process.

func (*Client) DeleteRule

DeleteRule deletes a rule.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.DeleteRuleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#DeleteRuleRequest.}err=c.DeleteRule(ctx,req)iferr!=nil{// TODO: Handle error.}}

func (*Client) DeleteTag

DeleteTag deletes a tag.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.DeleteTagRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#DeleteTagRequest.}err=c.DeleteTag(ctx,req)iferr!=nil{// TODO: Handle error.}}

func (*Client) DeleteVersion

DeleteVersion deletes a version and all of its content. The returned operation willcomplete once the version has been deleted.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.DeleteVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#DeleteVersionRequest.}op,err:=c.DeleteVersion(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}

func (*Client) DeleteVersionOperation

func(c*Client)DeleteVersionOperation(namestring)*DeleteVersionOperation

DeleteVersionOperation returns a new DeleteVersionOperation from a given name.The name must be that of a previously created DeleteVersionOperation, possibly from a different process.

func (*Client) GetAttachment

GetAttachment gets an attachment.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetAttachmentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetAttachmentRequest.}resp,err:=c.GetAttachment(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetDockerImage

GetDockerImage gets a docker image.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetDockerImageRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetDockerImageRequest.}resp,err:=c.GetDockerImage(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetFile

GetFile gets a file.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetFileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetFileRequest.}resp,err:=c.GetFile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetIamPolicy

GetIamPolicy gets the IAM policy for a given resource.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.GetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.}resp,err:=c.GetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetLocation

GetLocation gets information about a location.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.GetLocationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.}resp,err:=c.GetLocation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetMavenArtifact

GetMavenArtifact gets a maven artifact.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetMavenArtifactRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetMavenArtifactRequest.}resp,err:=c.GetMavenArtifact(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetNpmPackage

GetNpmPackage gets a npm package.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetNpmPackageRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetNpmPackageRequest.}resp,err:=c.GetNpmPackage(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"longrunningpb"cloud.google.com/go/longrunning/autogen/longrunningpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&longrunningpb.GetOperationRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.}resp,err:=c.GetOperation(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetPackage

GetPackage gets a package.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetPackageRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetPackageRequest.}resp,err:=c.GetPackage(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetProjectSettings

GetProjectSettings retrieves the Settings for the Project.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetProjectSettingsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetProjectSettingsRequest.}resp,err:=c.GetProjectSettings(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetPythonPackage

GetPythonPackage gets a python package.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetPythonPackageRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetPythonPackageRequest.}resp,err:=c.GetPythonPackage(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetRepository

GetRepository gets a repository.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetRepositoryRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetRepositoryRequest.}resp,err:=c.GetRepository(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetRule

GetRule gets a rule.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetRuleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetRuleRequest.}resp,err:=c.GetRule(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetTag

GetTag gets a tag.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetTagRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetTagRequest.}resp,err:=c.GetTag(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetVPCSCConfig

GetVPCSCConfig retrieves the VPCSC Config for the Project.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetVPCSCConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetVPCSCConfigRequest.}resp,err:=c.GetVPCSCConfig(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) GetVersion

GetVersion gets a version

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.GetVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#GetVersionRequest.}resp,err:=c.GetVersion(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) ImportAptArtifacts

ImportAptArtifacts imports Apt artifacts. The returned Operation will complete once theresources are imported. Package, Version, and File resources are createdbased on the imported artifacts. Imported artifacts that conflict withexisting resources are ignored.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ImportAptArtifactsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ImportAptArtifactsRequest.}op,err:=c.ImportAptArtifacts(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) ImportAptArtifactsOperation

func(c*Client)ImportAptArtifactsOperation(namestring)*ImportAptArtifactsOperation

ImportAptArtifactsOperation returns a new ImportAptArtifactsOperation from a given name.The name must be that of a previously created ImportAptArtifactsOperation, possibly from a different process.

func (*Client) ImportYumArtifacts

ImportYumArtifacts imports Yum (RPM) artifacts. The returned Operation will complete once theresources are imported. Package, Version, and File resources are createdbased on the imported artifacts. Imported artifacts that conflict withexisting resources are ignored.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ImportYumArtifactsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ImportYumArtifactsRequest.}op,err:=c.ImportYumArtifacts(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) ImportYumArtifactsOperation

func(c*Client)ImportYumArtifactsOperation(namestring)*ImportYumArtifactsOperation

ImportYumArtifactsOperation returns a new ImportYumArtifactsOperation from a given name.The name must be that of a previously created ImportYumArtifactsOperation, possibly from a different process.

func (*Client) ListAttachments

ListAttachments lists attachments.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListAttachmentsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListAttachmentsRequest.}it:=c.ListAttachments(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*artifactregistrypb.ListAttachmentsResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListAttachmentsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListAttachmentsRequest.}forresp,err:=rangec.ListAttachments(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListDockerImages

ListDockerImages lists docker images.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListDockerImagesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListDockerImagesRequest.}it:=c.ListDockerImages(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*artifactregistrypb.ListDockerImagesResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListDockerImagesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListDockerImagesRequest.}forresp,err:=rangec.ListDockerImages(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListFiles

ListFiles lists files.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListFilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListFilesRequest.}it:=c.ListFiles(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*artifactregistrypb.ListFilesResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListFilesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListFilesRequest.}forresp,err:=rangec.ListFiles(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListLocations

ListLocations lists information about the supported locations for this service.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1""google.golang.org/api/iterator"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}it:=c.ListLocations(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*locationpb.ListLocationsResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"locationpb"google.golang.org/genproto/googleapis/cloud/location")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&locationpb.ListLocationsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.}forresp,err:=rangec.ListLocations(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListMavenArtifacts

ListMavenArtifacts lists maven artifacts.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListMavenArtifactsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListMavenArtifactsRequest.}it:=c.ListMavenArtifacts(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*artifactregistrypb.ListMavenArtifactsResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListMavenArtifactsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListMavenArtifactsRequest.}forresp,err:=rangec.ListMavenArtifacts(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListNpmPackages

ListNpmPackages lists npm packages.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListNpmPackagesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListNpmPackagesRequest.}it:=c.ListNpmPackages(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*artifactregistrypb.ListNpmPackagesResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListNpmPackagesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListNpmPackagesRequest.}forresp,err:=rangec.ListNpmPackages(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListPackages

ListPackages lists packages.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListPackagesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListPackagesRequest.}it:=c.ListPackages(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*artifactregistrypb.ListPackagesResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListPackagesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListPackagesRequest.}forresp,err:=rangec.ListPackages(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListPythonPackages

ListPythonPackages lists python packages.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListPythonPackagesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListPythonPackagesRequest.}it:=c.ListPythonPackages(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*artifactregistrypb.ListPythonPackagesResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListPythonPackagesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListPythonPackagesRequest.}forresp,err:=rangec.ListPythonPackages(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListRepositories

ListRepositories lists repositories.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListRepositoriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListRepositoriesRequest.}it:=c.ListRepositories(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*artifactregistrypb.ListRepositoriesResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListRepositoriesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListRepositoriesRequest.}forresp,err:=rangec.ListRepositories(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListRules

ListRules lists rules.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListRulesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListRulesRequest.}it:=c.ListRules(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*artifactregistrypb.ListRulesResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListRulesRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListRulesRequest.}forresp,err:=rangec.ListRules(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListTags

ListTags lists tags.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListTagsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListTagsRequest.}it:=c.ListTags(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*artifactregistrypb.ListTagsResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListTagsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListTagsRequest.}forresp,err:=rangec.ListTags(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) ListVersions

ListVersions lists versions.

Examples

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListVersionsRequest.}it:=c.ListVersions(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp// If you need to access the underlying RPC response,// you can do so by casting the `Response` as below.// Otherwise, remove this line. Only populated after// first call to Next(). Not safe for concurrent access._=it.Response.(*artifactregistrypb.ListVersionsResponse)}}
all
packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.ListVersionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#ListVersionsRequest.}forresp,err:=rangec.ListVersions(ctx,req).All(){iferr!=nil{// TODO: Handle error and break/return/continue. Iteration will stop after any error.}// TODO: Use resp._=resp}}

func (*Client) SetIamPolicy

SetIamPolicy updates the IAM policy for a given resource.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.SetIamPolicyRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.}resp,err:=c.SetIamPolicy(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) TestIamPermissions

TestIamPermissions tests if the caller has a list of permissions on a resource.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"iampb"cloud.google.com/go/iam/apiv1/iampb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&iampb.TestIamPermissionsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.}resp,err:=c.TestIamPermissions(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) UpdateFile

UpdateFile updates a file.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.UpdateFileRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#UpdateFileRequest.}resp,err:=c.UpdateFile(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) UpdatePackage

UpdatePackage updates a package.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.UpdatePackageRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#UpdatePackageRequest.}resp,err:=c.UpdatePackage(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) UpdateProjectSettings

UpdateProjectSettings updates the Settings for the Project.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.UpdateProjectSettingsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#UpdateProjectSettingsRequest.}resp,err:=c.UpdateProjectSettings(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) UpdateRepository

UpdateRepository updates a repository.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.UpdateRepositoryRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#UpdateRepositoryRequest.}resp,err:=c.UpdateRepository(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) UpdateRule

UpdateRule updates a rule.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.UpdateRuleRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#UpdateRuleRequest.}resp,err:=c.UpdateRule(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) UpdateTag

UpdateTag updates a tag.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.UpdateTagRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#UpdateTagRequest.}resp,err:=c.UpdateTag(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) UpdateVPCSCConfig

UpdateVPCSCConfig updates the VPCSC Config for the Project.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.UpdateVPCSCConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#UpdateVPCSCConfigRequest.}resp,err:=c.UpdateVPCSCConfig(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

func (*Client) UpdateVersion

UpdateVersion updates a version.

Example

packagemainimport("context"artifactregistry"cloud.google.com/go/artifactregistry/apiv1"artifactregistrypb"cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in://   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=artifactregistry.NewClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&artifactregistrypb.UpdateVersionRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#UpdateVersionRequest.}resp,err:=c.UpdateVersion(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}

CreateAttachmentOperation

typeCreateAttachmentOperationstruct{// contains filtered or unexported fields}

CreateAttachmentOperation manages a long-running operation from CreateAttachment.

func (*CreateAttachmentOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateAttachmentOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateAttachmentOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateAttachmentOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateAttachmentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateRepositoryOperation

typeCreateRepositoryOperationstruct{// contains filtered or unexported fields}

CreateRepositoryOperation manages a long-running operation from CreateRepository.

func (*CreateRepositoryOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateRepositoryOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*CreateRepositoryOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*CreateRepositoryOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*CreateRepositoryOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteAttachmentOperation

typeDeleteAttachmentOperationstruct{// contains filtered or unexported fields}

DeleteAttachmentOperation manages a long-running operation from DeleteAttachment.

func (*DeleteAttachmentOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteAttachmentOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteAttachmentOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteAttachmentOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteAttachmentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteFileOperation

typeDeleteFileOperationstruct{// contains filtered or unexported fields}

DeleteFileOperation manages a long-running operation from DeleteFile.

func (*DeleteFileOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteFileOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteFileOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteFileOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteFileOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeletePackageOperation

typeDeletePackageOperationstruct{// contains filtered or unexported fields}

DeletePackageOperation manages a long-running operation from DeletePackage.

func (*DeletePackageOperation) Done

Done reports whether the long-running operation has completed.

func (*DeletePackageOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeletePackageOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeletePackageOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeletePackageOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteRepositoryOperation

typeDeleteRepositoryOperationstruct{// contains filtered or unexported fields}

DeleteRepositoryOperation manages a long-running operation from DeleteRepository.

func (*DeleteRepositoryOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteRepositoryOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteRepositoryOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteRepositoryOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteRepositoryOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteVersionOperation

typeDeleteVersionOperationstruct{// contains filtered or unexported fields}

DeleteVersionOperation manages a long-running operation from DeleteVersion.

func (*DeleteVersionOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteVersionOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*DeleteVersionOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*DeleteVersionOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*DeleteVersionOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DockerImageIterator

typeDockerImageIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*artifactregistrypb.DockerImage,nextPageTokenstring,errerror)// contains filtered or unexported fields}

DockerImageIterator manages a stream of *artifactregistrypb.DockerImage.

func (*DockerImageIterator) All

func(it*DockerImageIterator)All()iter.Seq2[*artifactregistrypb.DockerImage,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*DockerImageIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*DockerImageIterator) PageInfo

func(it*DockerImageIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

FileIterator

typeFileIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*artifactregistrypb.File,nextPageTokenstring,errerror)// contains filtered or unexported fields}

FileIterator manages a stream of *artifactregistrypb.File.

func (*FileIterator) All

func(it*FileIterator)All()iter.Seq2[*artifactregistrypb.File,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*FileIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*FileIterator) PageInfo

func(it*FileIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

ImportAptArtifactsOperation

typeImportAptArtifactsOperationstruct{// contains filtered or unexported fields}

ImportAptArtifactsOperation manages a long-running operation from ImportAptArtifacts.

func (*ImportAptArtifactsOperation) Done

Done reports whether the long-running operation has completed.

func (*ImportAptArtifactsOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*ImportAptArtifactsOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*ImportAptArtifactsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ImportAptArtifactsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

ImportYumArtifactsOperation

typeImportYumArtifactsOperationstruct{// contains filtered or unexported fields}

ImportYumArtifactsOperation manages a long-running operation from ImportYumArtifacts.

func (*ImportYumArtifactsOperation) Done

Done reports whether the long-running operation has completed.

func (*ImportYumArtifactsOperation) Metadata

Metadata returns metadata associated with the long-running operation.Metadata itself does not contact the server, but Poll does.To get the latest metadata, call this method after a successful call to Poll.If the metadata is not available, the returned metadata and error are both nil.

func (*ImportYumArtifactsOperation) Name

Name returns the name of the long-running operation.The name is assigned by the server and is unique within the service from which the operation is created.

func (*ImportYumArtifactsOperation) Poll

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds andthe operation has completed with failure, the error is returned and op.Done will return true.If Poll succeeds and the operation has completed successfully,op.Done will return true, and the response of the operation is returned.If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*ImportYumArtifactsOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

LocationIterator

typeLocationIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*locationpb.Location,nextPageTokenstring,errerror)// contains filtered or unexported fields}

LocationIterator manages a stream of *locationpb.Location.

func (*LocationIterator) All

func(it*LocationIterator)All()iter.Seq2[*locationpb.Location,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*LocationIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*LocationIterator) PageInfo

func(it*LocationIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

MavenArtifactIterator

typeMavenArtifactIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*artifactregistrypb.MavenArtifact,nextPageTokenstring,errerror)// contains filtered or unexported fields}

MavenArtifactIterator manages a stream of *artifactregistrypb.MavenArtifact.

func (*MavenArtifactIterator) All

func(it*MavenArtifactIterator)All()iter.Seq2[*artifactregistrypb.MavenArtifact,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*MavenArtifactIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*MavenArtifactIterator) PageInfo

func(it*MavenArtifactIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

NpmPackageIterator

typeNpmPackageIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*artifactregistrypb.NpmPackage,nextPageTokenstring,errerror)// contains filtered or unexported fields}

NpmPackageIterator manages a stream of *artifactregistrypb.NpmPackage.

func (*NpmPackageIterator) All

func(it*NpmPackageIterator)All()iter.Seq2[*artifactregistrypb.NpmPackage,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*NpmPackageIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*NpmPackageIterator) PageInfo

func(it*NpmPackageIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

PackageIterator

typePackageIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*artifactregistrypb.Package,nextPageTokenstring,errerror)// contains filtered or unexported fields}

PackageIterator manages a stream of *artifactregistrypb.Package.

func (*PackageIterator) All

func(it*PackageIterator)All()iter.Seq2[*artifactregistrypb.Package,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*PackageIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*PackageIterator) PageInfo

func(it*PackageIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

PythonPackageIterator

typePythonPackageIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*artifactregistrypb.PythonPackage,nextPageTokenstring,errerror)// contains filtered or unexported fields}

PythonPackageIterator manages a stream of *artifactregistrypb.PythonPackage.

func (*PythonPackageIterator) All

func(it*PythonPackageIterator)All()iter.Seq2[*artifactregistrypb.PythonPackage,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*PythonPackageIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*PythonPackageIterator) PageInfo

func(it*PythonPackageIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

RepositoryIterator

typeRepositoryIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*artifactregistrypb.Repository,nextPageTokenstring,errerror)// contains filtered or unexported fields}

RepositoryIterator manages a stream of *artifactregistrypb.Repository.

func (*RepositoryIterator) All

func(it*RepositoryIterator)All()iter.Seq2[*artifactregistrypb.Repository,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*RepositoryIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*RepositoryIterator) PageInfo

func(it*RepositoryIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

RuleIterator

typeRuleIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*artifactregistrypb.Rule,nextPageTokenstring,errerror)// contains filtered or unexported fields}

RuleIterator manages a stream of *artifactregistrypb.Rule.

func (*RuleIterator) All

func(it*RuleIterator)All()iter.Seq2[*artifactregistrypb.Rule,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*RuleIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*RuleIterator) PageInfo

func(it*RuleIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

TagIterator

typeTagIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*artifactregistrypb.Tag,nextPageTokenstring,errerror)// contains filtered or unexported fields}

TagIterator manages a stream of *artifactregistrypb.Tag.

func (*TagIterator) All

func(it*TagIterator)All()iter.Seq2[*artifactregistrypb.Tag,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*TagIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*TagIterator) PageInfo

func(it*TagIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

VersionIterator

typeVersionIteratorstruct{// Response is the raw response for the current page.// It must be cast to the RPC response type.// Calling Next() or InternalFetch() updates this value.Responseinterface{}// InternalFetch is for use by the Google Cloud Libraries only.// It is not part of the stable interface of this package.//// InternalFetch returns results from a single call to the underlying RPC.// The number of results is no greater than pageSize.// If there are no more results, nextPageToken is empty and err is nil.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*artifactregistrypb.Version,nextPageTokenstring,errerror)// contains filtered or unexported fields}

VersionIterator manages a stream of *artifactregistrypb.Version.

func (*VersionIterator) All

func(it*VersionIterator)All()iter.Seq2[*artifactregistrypb.Version,error]

All returns an iterator. If an error is returned by the iterator, theiterator will stop after that iteration.

func (*VersionIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no moreresults. Once Next returns Done, all subsequent calls will return Done.

func (*VersionIterator) PageInfo

func(it*VersionIterator)PageInfo()*iterator.PageInfo

PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.