roles

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2019 Cohesity Inc.

Copyright 2019 Cohesity Inc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ROLES

type ROLES interface {
	DeleteRoles(*models.RoleDeleteParameters) error

	GetRoles(*string, []string, *bool) ([]*models.Role, error)

	CreateRole(*models.RoleCreateParameters) (*models.Role, error)

	UpdateRole(string, *models.RoleUpdateParameters) (*models.Role, error)
}

* Interface for the ROLES_IMPL

type ROLES_IMPL

type ROLES_IMPL struct {
	// contains filtered or unexported fields
}

* Client structure as interface implementation

func NewROLES

func NewROLES(config configuration.CONFIGURATION) *ROLES_IMPL

* Factory for the ROLES interaface returning ROLES_IMPL

func (*ROLES_IMPL) CreateRole

func (me *ROLES_IMPL) CreateRole(
	body *models.RoleCreateParameters) (*models.Role, error)

*

  • Returns the new custom role that was created.
  • A custom role is a user-defined role that is created using the REST API,
  • the Cohesity Cluster or the CLI.
  • @param *models.RoleCreateParameters body parameter: Optional
  • @return Returns the *models.Role response from the API call

func (*ROLES_IMPL) DeleteRoles

func (me *ROLES_IMPL) DeleteRoles(
	body *models.RoleDeleteParameters) error

*

  • Returns Success if all the specified Roles are deleted.
  • @param *models.RoleDeleteParameters body parameter: Optional
  • @return Returns the response from the API call

func (*ROLES_IMPL) GetRoles

func (me *ROLES_IMPL) GetRoles(
	name *string,
	tenantIds []string,
	allUnderHierarchy *bool) ([]*models.Role, error)

*

  • If the 'name' parameter is not specified, all roles defined on the
  • Cohesity Cluster are returned. In addition, information about each role
  • is returned such as the name, description, assigned privileges, etc.
  • If an exact role name (such as COHESITY_VIEWER) is specified in the
  • 'name' parameter, only information about that single role is returned.
  • @param *string name parameter: Optional
  • @param []string tenantIds parameter: Optional
  • @param *bool allUnderHierarchy parameter: Optional
  • @return Returns the []*models.Role response from the API call

func (*ROLES_IMPL) UpdateRole

func (me *ROLES_IMPL) UpdateRole(
	name string,
	body *models.RoleUpdateParameters) (*models.Role, error)

*

  • For example, you could update the privileges assigned to a Role.
  • Returns the updated role.
  • @param string name parameter: Required
  • @param *models.RoleUpdateParameters body parameter: Optional
  • @return Returns the *models.Role response from the API call

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL