Class: Milvus::Roles

Inherits:
Base
  • Object
show all
Defined in:
lib/milvus/roles.rb

Constant Summary collapse

PATH =
"roles"

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Milvus::Base

Instance Method Details

#describe(role_name:) ⇒ Hash

This operation inserts data into a specific collection.

Parameters:

  • role_name (String)

    The name of the collection to insert data into.

Returns:

  • (Hash)

    The response from the server.



22
23
24
25
26
27
28
29
30
# File 'lib/milvus/roles.rb', line 22

def describe(role_name:)
  response = client.connection.post("#{PATH}/describe") do |req|
    req.body = {
      roleName: role_name
    }
  end

  response.body
end

#listHash

Lists available roles on the server

Returns:

  • (Hash)

    The response from the server.



10
11
12
13
14
15
16
# File 'lib/milvus/roles.rb', line 10

def list
  response = client.connection.post("#{PATH}/list") do |req|
    req.body = {}
  end

  response.body
end