Skip to content

Conversation

@saehejkang
Copy link
Contributor

Changes Made

  • Add necessary functionality for container registry list command

Relates to: apple/container#1088

Copy link
Contributor

@jglogan jglogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saehejkang a couple suggestions so that it fits better with the managed resource plan. I've been swamped with other things and need time to think through the design a bit further for that, but we will get there soon.

}

/// List all registry domains this id has credentials for.
public func listDomains() throws -> [String] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's nudge this towards something where a registry can be a managed resource in container.

The caller is presumably the manager of a specific keychain domain (such as the one for container).

I think this should be a list(domain:) -> [RegistryInfo] that enumerates all keychain entries for the domain, mapping them to a new structure that has all the stored attributes for the registry except the secret value.

This structure should conform to Sendable but not Codable - the client is responsible for that. In container it will be that it eventually conforms to managed resource but could just be RegistryInfo with a Codable extension initially.

Thoughts?

}

/// List all hostnames in the keychain.
public func listHosts(id: String) throws -> [String] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a public version of two calls if we implement the suggestion above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants