package bootstrap import ( "context" "isle/garage" "path/filepath" "github.com/minio/minio-go/v7" ) // Paths within garage's global bucket. // // TODO this is getting moved into daemon package. const ( garageGlobalBucketBootstrapHostsDirPath = "bootstrap/hosts" ) // RemoveGarageBootstrapHost removes the .json.signed for the given // host from garage. // // The given client should be for the global bucket. func RemoveGarageBootstrapHost( ctx context.Context, client garage.S3APIClient, hostName string, ) error { filePath := filepath.Join( garageGlobalBucketBootstrapHostsDirPath, hostName+".json.signed", ) return client.RemoveObject( ctx, garage.GlobalBucket, filePath, minio.RemoveObjectOptions{}, ) }