Skip to content

Commit

Permalink
Update comments on UpdateWorkloadIdentity
Browse files Browse the repository at this point in the history
  • Loading branch information
strideynet committed Dec 9, 2024
1 parent 7ff27ee commit 9fb2f88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/services/local/workload_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ func (b *WorkloadIdentityService) UpsertWorkloadIdentity(
return upserted, trace.Wrap(err)
}

// UpdateWorkloadIdentity updates a specific WorkloadIdentity.
// UpdateWorkloadIdentity updates a specific WorkloadIdentity. The resource must
// already exist, and, condition update semantics are used - e.g the submitted
// resource must have a revision matching the revision of the resource in the
// backend.
func (b *WorkloadIdentityService) UpdateWorkloadIdentity(
ctx context.Context, resource *workloadidentityv1pb.WorkloadIdentity,
) (*workloadidentityv1pb.WorkloadIdentity, error) {
Expand Down
6 changes: 4 additions & 2 deletions lib/services/workload_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ type WorkloadIdentities interface {
) (*workloadidentityv1pb.WorkloadIdentity, error)
// DeleteWorkloadIdentity deletes a SPIFFE Federation by name.
DeleteWorkloadIdentity(ctx context.Context, name string) error
// UpdateWorkloadIdentity updates a WorkloadIdentity. It will not act if the
// resource is not found or where the revision does not match.
// UpdateWorkloadIdentity updates a specific WorkloadIdentity. The resource must
// already exist, and, condition update semantics are used - e.g the submitted
// resource must have a revision matching the revision of the resource in the
// backend.
UpdateWorkloadIdentity(
ctx context.Context, workloadIdentity *workloadidentityv1pb.WorkloadIdentity,
) (*workloadidentityv1pb.WorkloadIdentity, error)
Expand Down

0 comments on commit 9fb2f88

Please sign in to comment.