Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetConfigResponse ¶
type GrafanaService ¶
GrafanaService is the service that handles CRUD functionality for Argus Grafana
func (*GrafanaService) GetConfig ¶
func (svc *GrafanaService) GetConfig(ctx context.Context, projectID, instanceID string) (res GetConfigResponse, err error)
GetConfig returns argus grafana config See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#tag/grafana-configs
func (*GrafanaService) UpdateConfig ¶
func (svc *GrafanaService) UpdateConfig(ctx context.Context, projectID, instanceID string, config Config) (res UpdateConfigResponse, err error)
UpdateConfig updates argus grafana config See also https://api.stackit.schwarz/argus-monitoring-service/openapi.v1.html#operation/v1_projects_instances_grafana-configs_update
type OAuth ¶
type OAuth struct { Enabled bool `json:"enabled,omitempty"` APIURL string `json:"apiUrl,omitempty"` AuthURL string `json:"authUrl,omitempty"` Scopes string `json:"scopes,omitempty"` TokenURL string `json:"tokenUrl,omitempty"` OauthClientID string `json:"oauthClientId,omitempty"` OauthClientSecret string `json:"oauthClientSecret,omitempty"` // If therole_attribute_path property does not return a role, then the user is assigned the Viewer role by default. // You can disable the role assignment by setting role_attribute_strict = true. // It denies user access if no role or an invalid role is returned. RoleAttributeStrict bool `json:"roleAttributeStrict,omitempty"` // Grafana checks for the presence of a role using the JMESPath specified via the role_attribute_path // configuration option. The JMESPath is applied to the id_token first. If there is no match, then the UserInfo // endpoint specified via the api_url configuration option is tried next. // The result after evaluation of the role_attribute_path JMESPath expression should be a valid Grafana role, // for example, Viewer, Editor or Admin For example: // contains(roles[*], 'grafana-admin') && 'Admin' || contains(roles[*], 'grafana-editor') && 'Editor' || contains(roles[*], 'grafana-viewer') && 'Viewer' RoleAttributePath string `json:"roleAttributePath,omitempty"` }
type UpdateConfigResponse ¶
type UpdateConfigResponse struct {
Message string `json:"message,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.