user

package
v1.17.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: AGPL-3.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PMMConfig config.PMMConfig

PMMConfig pass configuration via global variable :'(

Functions

func CreateUser

func CreateUser(newUser PMMUser) (string, error)

CreateUser in .htpasswd file, Prometheus config and Grafana database

func DeleteUser

func DeleteUser(username string) (string, error)

DeleteUser from Grafana and .htpasswd

Types

type PMMUser

type PMMUser struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Instance string `json:"instance,omitempty"`
}

PMMUser very simple struct for user

func ReadHTTPUsers

func ReadHTTPUsers() []PMMUser

ReadHTTPUsers func read list of users from .htpasswd file

Jump to

Keyboard shortcuts

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