Documentation ¶
Index ¶
- Constants
- Variables
- func NewClient(config *ClientConfig) (*client, error)
- func NewProvider(typeName string, crypto domain.Crypto) *provider
- type ClientConfig
- type Config
- type Credentials
- type Dashboard
- type Folder
- type GrafanaClient
- type HTTPClient
- type Permission
- type PermissionRequest
- type UpdatePermissionRequest
Constants ¶
View Source
const ( DashboardRoleViewer = "view" DashboardRoleEditor = "edit" DashboardRoleAdmin = "admin" AccountTypeUser = "user" )
View Source
const ( ResourceTypeFolder = "folder" ResourceTypeDashboard = "dashboard" )
Variables ¶
View Source
var ( ErrInvalidRole = errors.New("invalid role") ErrInvalidPermissionType = errors.New("invalid permission type") ErrUserNotFound = errors.New("cannot find user with the given email") ErrPermissionNotFound = errors.New("permission not found") ErrInvalidResourceType = errors.New("invalid resource type") ErrInvalidCredentials = errors.New("invalid credentials type") ErrInvalidPermissionConfig = errors.New("invalid permission config type") ErrUnableToEncryptNilCredentials = errors.New("unable to encrypt nil credentials") ErrUnableToDecryptNilCredentials = errors.New("unable to decrypt nil credentials") )
Functions ¶
func NewClient ¶
func NewClient(config *ClientConfig) (*client, error)
func NewProvider ¶
Types ¶
type ClientConfig ¶
type ClientConfig struct { Host string `validate:"required,url" mapstructure:"host"` Username string `validate:"required" mapstructure:"username"` Password string `validate:"required" mapstructure:"password"` Org string `validate:"required" mapstructure:"org"` HTTPClient HTTPClient }
type Config ¶
type Config struct { ProviderConfig *domain.ProviderConfig // contains filtered or unexported fields }
func (*Config) EncryptCredentials ¶
func (*Config) ParseAndValidate ¶
type Credentials ¶
type Dashboard ¶
type GrafanaClient ¶
type Permission ¶
type Permission string
type PermissionRequest ¶
type UpdatePermissionRequest ¶
type UpdatePermissionRequest struct {
Items []*PermissionRequest `json:"items"`
}
Click to show internal directories.
Click to hide internal directories.