Class: Couchbase::Protostellar::RequestGenerator::Admin::Bucket Private

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/protostellar/request_generator/admin/bucket.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

BUCKET_TYPE_MAP =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  :couchbase => :BUCKET_TYPE_COUCHBASE,
  :memcached => :BUCKET_TYPE_MEMCACHED,
  :ephemeral => :BUCKET_TYPE_EPHEMERAL,
}.freeze
EVICTION_MODE_MAP =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  :full => :EVICTION_MODE_FULL,
  :value_only => :EVICTION_MODE_VALUE_ONLY,
  :no_eviction => :EVICTION_MODE_NONE,
  :not_recently_used => :EVICTION_MODE_NOT_RECENTLY_USED,
}.freeze
COMPRESSION_MODE_MAP =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  :off => :COMPRESSION_MODE_OFF,
  :passive => :COMPRESSION_MODE_PASSIVE,
  :active => :COMPRESSION_MODE_ACTIVE,
}.freeze
STORAGE_BACKEND_MAP =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  :couchstore => :STORAGE_BACKEND_COUCHSTORE,
  :magma => :STORAGE_BACKEND_MAGMA,
}.freeze
CONFLICT_RESOLUTION_TYPE_MAP =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  :timestamp => :CONFLICT_RESOLUTION_TYPE_TIMESTAMP,
  :sequence_number => :CONFLICT_RESOLUTION_TYPE_SEQUENCE_NUMBER,
  :custom => :CONFLICT_RESOLUTION_TYPE_CUSTOM,
}.freeze
DURABILITY_LEVEL_MAP =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

RequestGenerator::KV::DURABILITY_LEVEL_MAP

Instance Method Summary collapse

Instance Method Details

#create_bucket_request(settings, options) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



63
64
65
66
67
68
# File 'lib/couchbase/protostellar/request_generator/admin/bucket.rb', line 63

def create_bucket_request(settings, options)
  proto_req = Generated::Admin::Bucket::V1::CreateBucketRequest.new(
    extract_bucket_settings(settings, create: true)
  )
  create_request(proto_req, :create_bucket, options)
end

#delete_bucket_request(bucket_name, options) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



77
78
79
80
81
82
# File 'lib/couchbase/protostellar/request_generator/admin/bucket.rb', line 77

def delete_bucket_request(bucket_name, options)
  proto_req = Generated::Admin::Bucket::V1::DeleteBucketRequest.new(
    bucket_name: bucket_name
  )
  create_request(proto_req, :delete_bucket, options)
end

#list_buckets_request(options) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



58
59
60
61
# File 'lib/couchbase/protostellar/request_generator/admin/bucket.rb', line 58

def list_buckets_request(options)
  proto_req = Generated::Admin::Bucket::V1::ListBucketsRequest.new
  create_request(proto_req, :list_buckets, options, idempotent: true)
end

#update_bucket_request(settings, options) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



70
71
72
73
74
75
# File 'lib/couchbase/protostellar/request_generator/admin/bucket.rb', line 70

def update_bucket_request(settings, options)
  proto_req = Generated::Admin::Bucket::V1::UpdateBucketRequest.new(
    extract_bucket_settings(settings, create: false)
  )
  create_request(proto_req, :update_bucket, options)
end