Documentation ¶
Index ¶
- func NewServer(cfg *Config) (grpcserver.Server, error)
- type Config
- type Server
- func (s *Server) ProvisionerCreateBucket(ctx context.Context, req *cosi.ProvisionerCreateBucketRequest) (*cosi.ProvisionerCreateBucketResponse, error)
- func (s *Server) ProvisionerDeleteBucket(ctx context.Context, req *cosi.ProvisionerDeleteBucketRequest) (*cosi.ProvisionerDeleteBucketResponse, error)
- func (s *Server) ProvisionerGetInfo(ctx context.Context, req *cosi.ProvisionerGetInfoRequest) (*cosi.ProvisionerGetInfoResponse, error)
- func (s *Server) ProvisionerGrantBucketAccess(context.Context, *cosi.ProvisionerGrantBucketAccessRequest) (*cosi.ProvisionerGrantBucketAccessResponse, error)
- func (s *Server) ProvisionerRevokeBucketAccess(context.Context, *cosi.ProvisionerRevokeBucketAccessRequest) (*cosi.ProvisionerRevokeBucketAccessResponse, error)
- func (s *Server) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Driver bucket.BucketDriver Net string Address string }
Config for setting up a COSI server
type Server ¶
type Server struct { cosi.IdentityServer cosi.ProvisionerServer *grpcserver.GrpcServer // contains filtered or unexported fields }
Server represents a COSI server
func (*Server) ProvisionerCreateBucket ¶
func (s *Server) ProvisionerCreateBucket(ctx context.Context, req *cosi.ProvisionerCreateBucketRequest) (*cosi.ProvisionerCreateBucketResponse, error)
ProvisionerCreateBucket is made to create the bucket in the backend. This call is 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) ProvisionerDeleteBucket ¶
func (s *Server) ProvisionerDeleteBucket(ctx context.Context, req *cosi.ProvisionerDeleteBucketRequest) (*cosi.ProvisionerDeleteBucketResponse, error)
ProvisionerDeleteBucket is made to delete the bucket in the backend. If the bucket has already been deleted, then no error should be returned.
func (*Server) ProvisionerGetInfo ¶
func (s *Server) ProvisionerGetInfo(ctx context.Context, req *cosi.ProvisionerGetInfoRequest) (*cosi.ProvisionerGetInfoResponse, error)
ProvisionerGetInfo returns any required provisioner info
func (*Server) ProvisionerGrantBucketAccess ¶
func (s *Server) ProvisionerGrantBucketAccess(context.Context, *cosi.ProvisionerGrantBucketAccessRequest) (*cosi.ProvisionerGrantBucketAccessResponse, error)
ProvisionerGrantBucketAccess grants access to an account. The account_name in the request shall be used as a unique identifier to create credentials. The account_id returned in the response will be used as the unique identifier for deleting this access when calling ProvisionerRevokeBucketAccess.
func (*Server) ProvisionerRevokeBucketAccess ¶
func (s *Server) ProvisionerRevokeBucketAccess(context.Context, *cosi.ProvisionerRevokeBucketAccessRequest) (*cosi.ProvisionerRevokeBucketAccessResponse, error)
ProvisionerRevokeBucketAccess revokes all access to a particular bucket from a principal.