github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/entity/rbac.go (about)

     1  package entity
     2  
     3  import (
     4  	common "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
     5  )
     6  
     7  // User is the model for RBAC user object.
     8  type User struct {
     9  	Name string
    10  }
    11  
    12  // UserDescription is the model for RBAC user description object.
    13  type UserDescription struct {
    14  	Name  string
    15  	Roles []string
    16  }
    17  
    18  // RoleGrants is the model for RBAC role description object.
    19  type RoleGrants struct {
    20  	Object        string
    21  	ObjectName    string
    22  	RoleName      string
    23  	GrantorName   string
    24  	PrivilegeName string
    25  	DbName        string
    26  }
    27  
    28  // Role is the model for RBAC role object.
    29  type Role struct {
    30  	Name string
    31  }
    32  
    33  // PriviledgeObjectType is an alias of common.ObjectType.
    34  // used in RBAC related API.
    35  type PriviledgeObjectType common.ObjectType
    36  
    37  const (
    38  	// PriviledegeObjectTypeCollection const value for collection.
    39  	PriviledegeObjectTypeCollection PriviledgeObjectType = PriviledgeObjectType(common.ObjectType_Collection)
    40  	// PriviledegeObjectTypeUser const value for user.
    41  	PriviledegeObjectTypeUser PriviledgeObjectType = PriviledgeObjectType(common.ObjectType_User)
    42  	// PriviledegeObjectTypeGlobal const value for Global.
    43  	PriviledegeObjectTypeGlobal PriviledgeObjectType = PriviledgeObjectType(common.ObjectType_Global)
    44  )