🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

Milvus
Zilliz
< Docs
  • Go

DescribeRole()

This method returns the detailed information about the specified role.

func (c *Client) DescribeRole(ctx context.Context, option DescribeRoleOption, callOptions ...grpc.CallOption) (*entity.Role, error)

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

DescribeRoleOption

callOptions

Optional parameters for calling the methods.

grpc.CallOption

DescribeRoleOption

This is an interface type. The describeRoleOption struct type implements this interface type.

You can use the NewDescribeRoleOption() function to get the concrete implementation.

NewDescribeRoleOption

The signature of NewDescribeRoleOption() is as follows:

func NewDescribeRoleOption(roleName string) *describeRoleOption

Parameter

Description

Type

roleName

Name of the role to describe.

string

grpc.CallOption

This interface provided by the gRPC Go library allows you to specify additional options or configurations when making requests. For possible implementations of this interface, refer to this file.

entity.Role

The entity.Role struct type is as follows:

type Role struct {
    RoleName   string
    Privileges []entity.GrantItem
}

Return

*entity.Role

Example

import (
   "context"
   "google.golang.org/grpc"
   "github.com/milvus-io/milvus/v2/milvusclient"
)

roleName := "my_role"
opts := client.NewDescribeRoleOption(roleName)

err := mclient.DescribeRole(context.Background(), opts)

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?