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

Milvus
Zilliz
< Docs
  • Go

GrantV2()

This method grants a privilege or a privilege group to a role.

func (c *Client) GrantV2(ctx context.Context, option GrantV2Option, callOptions ...grpc.CallOption) error

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

GrantV2Option

callOptions

Optional parameters for calling the methods.

grpc.CallOption

GrantV2Option

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

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

NewGrantV2Option

The signature of the NewGrantV2Option() is as follows:

func NewGrantV2Option(roleName, privilegeName, dbName, collectionName string) *grantV2Option

Parameter

Description

Type

roleName

Name of the target role of this operation.

string

privilegeName

Name of the privilege or privilege group to assign. For details, refer to the Privilege name column in the table on page Users and Roles.

string

dbName

Name of the target database.

string

collectionName

Name of the target collection.

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.

Return

Null

Example

// TODO 
// https://milvus.io/api-reference/pymilvus/v2.5.x/MilvusClient/Authentication/grant_privilege.md

Try Managed Milvus for Free

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

Get Started
Feedback

Was this page helpful?