Documentation ¶
Overview ¶
Package provisioner
Index ¶
- type Server
- func (s *Server) DriverCreateBucket(ctx context.Context, req *cosi.DriverCreateBucketRequest) (*cosi.DriverCreateBucketResponse, error)
- func (s *Server) DriverDeleteBucket(ctx context.Context, req *cosi.DriverDeleteBucketRequest) (*cosi.DriverDeleteBucketResponse, error)
- func (s *Server) DriverGrantBucketAccess(ctx context.Context, req *cosi.DriverGrantBucketAccessRequest) (*cosi.DriverGrantBucketAccessResponse, error)
- func (s *Server) DriverRevokeBucketAccess(ctx context.Context, req *cosi.DriverRevokeBucketAccessRequest) (*cosi.DriverRevokeBucketAccessResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server implements cosi.ProvisionerServer interface.
func (*Server) DriverCreateBucket ¶
func (s *Server) DriverCreateBucket(ctx context.Context, req *cosi.DriverCreateBucketRequest) (*cosi.DriverCreateBucketResponse, error)
DriverCreateBucket call is made to create the bucket in the backend.
NOTE: this call needs to be idempotent.
- If a bucket that matches both name and parameters already exists, then OK (success) must be returned.
- If a bucket by same name, but different parameters is provided, then the appropriate error code ALREADY_EXISTS must be returned.
func (*Server) DriverDeleteBucket ¶
func (s *Server) DriverDeleteBucket(ctx context.Context, req *cosi.DriverDeleteBucketRequest) (*cosi.DriverDeleteBucketResponse, error)
DriverDeleteBucket call is made to delete the bucket in the backend.
NOTE: this call needs to be idempotent. If the bucket has already been deleted, then no error should be returned.
func (*Server) DriverGrantBucketAccess ¶
func (s *Server) DriverGrantBucketAccess(ctx context.Context, req *cosi.DriverGrantBucketAccessRequest) (*cosi.DriverGrantBucketAccessResponse, error)
DriverGrantBucketAccess call grants access to an account. The account_name in the request shall be used as a unique identifier to create credentials.
NOTE: this call needs to be idempotent. The account_id returned in the response will be used as the unique identifier for deleting this access when calling DriverRevokeBucketAccess. The returned secret does not need to be the same each call to achieve idempotency.
func (*Server) DriverRevokeBucketAccess ¶
func (s *Server) DriverRevokeBucketAccess(ctx context.Context, req *cosi.DriverRevokeBucketAccessRequest) (*cosi.DriverRevokeBucketAccessResponse, error)
DriverRevokeBucketAccess call revokes all access to a particular bucket from a principal.
NOTE: this call needs to be idempotent.