Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) AddOrgUser(OrgID int64, login string, role string) error
- func (c *Client) CreateUser(user gapi.User) (int64, error)
- func (c *Client) GetOrCreateUser(login, name, email string) (gapi.User, error)
- func (c *Client) LookupUser(loginOrEmail string) (gapi.User, error)
- func (c *Client) UpdateOrgUserAuthz(user gapi.User, groups config.Groups) (userOrgsRoleMap, error)
- func (c *Client) UpdateUserPermissions(id int64, isAdmin bool) error
- func (c *Client) UpsertOrgUser(orgID int64, user gapi.User, role string) error
- type GAPIClient
- type RoleType
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewMockClient ¶
MockClient returns a Client using a mocked GAPIClient underneat
func (*Client) AddOrgUser ¶
AddOrgUser adds a user, with a role, to an Organization specified by OrgID
func (*Client) CreateUser ¶
CreateUser adds a new global user to Grafana
func (*Client) GetOrCreateUser ¶
func (*Client) LookupUser ¶
LookupUser search for a user by Login or Email and returns it
func (*Client) UpdateOrgUserAuthz ¶
UpdateOrgUserAuthz updates both roles and global admin status for a user taking into account group configuration. It outputs a mapping of role-in-org it will return an error when there's an issue updating the GrafanaAdmin permissions
func (*Client) UpdateUserPermissions ¶
type GAPIClient ¶
Click to show internal directories.
Click to hide internal directories.