2023-03-30 22:25:08 -07:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
|
|
|
|
|
package plugin
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
|
|
|
|
|
wpbs "github.com/hashicorp/boundary/internal/gen/worker/servers/services"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// StorageProxyClient provides a storage related functions that will be sent from a controller
|
|
|
|
|
// to a worker through a CommandClientProducer to a corresponding storage plugin.
|
|
|
|
|
type StorageProxyClient interface {
|
|
|
|
|
// OnCreateStorageBucket is a hook that runs when a storage bucket is created.
|
2023-05-02 13:55:54 -07:00
|
|
|
OnCreateStorageBucket(context.Context, string, *wpbs.OnCreateStorageBucketRequest) (*wpbs.OnCreateStorageBucketResponse, error)
|
2023-03-30 22:25:08 -07:00
|
|
|
// OnUpdateStorageBucket is a hook that runs when a storage bucket is updated.
|
2023-05-02 13:55:54 -07:00
|
|
|
OnUpdateStorageBucket(context.Context, string, *wpbs.OnUpdateStorageBucketRequest) (*wpbs.OnUpdateStorageBucketResponse, error)
|
2023-03-30 22:25:08 -07:00
|
|
|
// OnDeleteStorageBucket is a hook that runs when a storage bucket is deleted.
|
2023-05-02 13:55:54 -07:00
|
|
|
OnDeleteStorageBucket(context.Context, string, *wpbs.OnDeleteStorageBucketRequest) (*wpbs.OnDeleteStorageBucketResponse, error)
|
2023-03-30 22:25:08 -07:00
|
|
|
}
|