mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-17 16:37:46 +08:00

Remove the controller grpc service along with associated code related to sessions or remote controllers. Data types that are still used with complicated dependency chains have been kept in the same package for a future refactor. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
27 lines
439 B
Go
27 lines
439 B
Go
package pb
|
|
|
|
type Attest struct {
|
|
Type string
|
|
Disabled bool
|
|
Attrs string
|
|
}
|
|
|
|
func CreateAttestations(attests []*Attest) map[string]*string {
|
|
result := map[string]*string{}
|
|
for _, attest := range attests {
|
|
// ignore duplicates
|
|
if _, ok := result[attest.Type]; ok {
|
|
continue
|
|
}
|
|
|
|
if attest.Disabled {
|
|
result[attest.Type] = nil
|
|
continue
|
|
}
|
|
|
|
attrs := attest.Attrs
|
|
result[attest.Type] = &attrs
|
|
}
|
|
return result
|
|
}
|