admin

package
v0.0.0-...-d4d7cce Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminGetSettingsForbidden

type AdminGetSettingsForbidden struct {
	Payload *models.ErrorResponseBody
}

AdminGetSettingsForbidden describes a response with status code 403, with default header values.

ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.

func NewAdminGetSettingsForbidden

func NewAdminGetSettingsForbidden() *AdminGetSettingsForbidden

NewAdminGetSettingsForbidden creates a AdminGetSettingsForbidden with default headers values

func (*AdminGetSettingsForbidden) Error

func (o *AdminGetSettingsForbidden) Error() string

func (*AdminGetSettingsForbidden) GetPayload

type AdminGetSettingsOK

type AdminGetSettingsOK struct {
	Payload models.SettingsBag
}

AdminGetSettingsOK describes a response with status code 200, with default header values.

(empty)

func NewAdminGetSettingsOK

func NewAdminGetSettingsOK() *AdminGetSettingsOK

NewAdminGetSettingsOK creates a AdminGetSettingsOK with default headers values

func (*AdminGetSettingsOK) Error

func (o *AdminGetSettingsOK) Error() string

func (*AdminGetSettingsOK) GetPayload

func (o *AdminGetSettingsOK) GetPayload() models.SettingsBag

type AdminGetSettingsParams

type AdminGetSettingsParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

AdminGetSettingsParams contains all the parameters to send to the API endpoint

for the admin get settings operation.

Typically these are written to a http.Request.

func NewAdminGetSettingsParams

func NewAdminGetSettingsParams() *AdminGetSettingsParams

NewAdminGetSettingsParams creates a new AdminGetSettingsParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewAdminGetSettingsParamsWithContext

func NewAdminGetSettingsParamsWithContext(ctx context.Context) *AdminGetSettingsParams

NewAdminGetSettingsParamsWithContext creates a new AdminGetSettingsParams object with the ability to set a context for a request.

func NewAdminGetSettingsParamsWithHTTPClient

func NewAdminGetSettingsParamsWithHTTPClient(client *http.Client) *AdminGetSettingsParams

NewAdminGetSettingsParamsWithHTTPClient creates a new AdminGetSettingsParams object with the ability to set a custom HTTPClient for a request.

func NewAdminGetSettingsParamsWithTimeout

func NewAdminGetSettingsParamsWithTimeout(timeout time.Duration) *AdminGetSettingsParams

NewAdminGetSettingsParamsWithTimeout creates a new AdminGetSettingsParams object with the ability to set a timeout on a request.

func (*AdminGetSettingsParams) SetContext

func (o *AdminGetSettingsParams) SetContext(ctx context.Context)

SetContext adds the context to the admin get settings params

func (*AdminGetSettingsParams) SetDefaults

func (o *AdminGetSettingsParams) SetDefaults()

SetDefaults hydrates default values in the admin get settings params (not the query body).

All values with no default are reset to their zero value.

func (*AdminGetSettingsParams) SetHTTPClient

func (o *AdminGetSettingsParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the admin get settings params

func (*AdminGetSettingsParams) SetTimeout

func (o *AdminGetSettingsParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the admin get settings params

func (*AdminGetSettingsParams) WithContext

WithContext adds the context to the admin get settings params

func (*AdminGetSettingsParams) WithDefaults

WithDefaults hydrates default values in the admin get settings params (not the query body).

All values with no default are reset to their zero value.

func (*AdminGetSettingsParams) WithHTTPClient

func (o *AdminGetSettingsParams) WithHTTPClient(client *http.Client) *AdminGetSettingsParams

WithHTTPClient adds the HTTPClient to the admin get settings params

func (*AdminGetSettingsParams) WithTimeout

WithTimeout adds the timeout to the admin get settings params

func (*AdminGetSettingsParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type AdminGetSettingsReader

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

AdminGetSettingsReader is a Reader for the AdminGetSettings structure.

func (*AdminGetSettingsReader) ReadResponse

func (o *AdminGetSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type AdminGetSettingsUnauthorized

type AdminGetSettingsUnauthorized struct {
	Payload *models.ErrorResponseBody
}

AdminGetSettingsUnauthorized describes a response with status code 401, with default header values.

UnauthorizedError is returned when the request is not authenticated.

func NewAdminGetSettingsUnauthorized

func NewAdminGetSettingsUnauthorized() *AdminGetSettingsUnauthorized

NewAdminGetSettingsUnauthorized creates a AdminGetSettingsUnauthorized with default headers values

func (*AdminGetSettingsUnauthorized) Error

func (*AdminGetSettingsUnauthorized) GetPayload

type AdminGetStatsForbidden

type AdminGetStatsForbidden struct {
	Payload *models.ErrorResponseBody
}

AdminGetStatsForbidden describes a response with status code 403, with default header values.

ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.

func NewAdminGetStatsForbidden

func NewAdminGetStatsForbidden() *AdminGetStatsForbidden

NewAdminGetStatsForbidden creates a AdminGetStatsForbidden with default headers values

func (*AdminGetStatsForbidden) Error

func (o *AdminGetStatsForbidden) Error() string

func (*AdminGetStatsForbidden) GetPayload

type AdminGetStatsInternalServerError

type AdminGetStatsInternalServerError struct {
	Payload *models.ErrorResponseBody
}

AdminGetStatsInternalServerError describes a response with status code 500, with default header values.

InternalServerError is a general error indicating something went wrong internally.

func NewAdminGetStatsInternalServerError

func NewAdminGetStatsInternalServerError() *AdminGetStatsInternalServerError

NewAdminGetStatsInternalServerError creates a AdminGetStatsInternalServerError with default headers values

func (*AdminGetStatsInternalServerError) Error

func (*AdminGetStatsInternalServerError) GetPayload

type AdminGetStatsOK

type AdminGetStatsOK struct {
	Payload *models.AdminStats
}

AdminGetStatsOK describes a response with status code 200, with default header values.

(empty)

func NewAdminGetStatsOK

func NewAdminGetStatsOK() *AdminGetStatsOK

NewAdminGetStatsOK creates a AdminGetStatsOK with default headers values

func (*AdminGetStatsOK) Error

func (o *AdminGetStatsOK) Error() string

func (*AdminGetStatsOK) GetPayload

func (o *AdminGetStatsOK) GetPayload() *models.AdminStats

type AdminGetStatsParams

type AdminGetStatsParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

AdminGetStatsParams contains all the parameters to send to the API endpoint

for the admin get stats operation.

Typically these are written to a http.Request.

func NewAdminGetStatsParams

func NewAdminGetStatsParams() *AdminGetStatsParams

NewAdminGetStatsParams creates a new AdminGetStatsParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewAdminGetStatsParamsWithContext

func NewAdminGetStatsParamsWithContext(ctx context.Context) *AdminGetStatsParams

NewAdminGetStatsParamsWithContext creates a new AdminGetStatsParams object with the ability to set a context for a request.

func NewAdminGetStatsParamsWithHTTPClient

func NewAdminGetStatsParamsWithHTTPClient(client *http.Client) *AdminGetStatsParams

NewAdminGetStatsParamsWithHTTPClient creates a new AdminGetStatsParams object with the ability to set a custom HTTPClient for a request.

func NewAdminGetStatsParamsWithTimeout

func NewAdminGetStatsParamsWithTimeout(timeout time.Duration) *AdminGetStatsParams

NewAdminGetStatsParamsWithTimeout creates a new AdminGetStatsParams object with the ability to set a timeout on a request.

func (*AdminGetStatsParams) SetContext

func (o *AdminGetStatsParams) SetContext(ctx context.Context)

SetContext adds the context to the admin get stats params

func (*AdminGetStatsParams) SetDefaults

func (o *AdminGetStatsParams) SetDefaults()

SetDefaults hydrates default values in the admin get stats params (not the query body).

All values with no default are reset to their zero value.

func (*AdminGetStatsParams) SetHTTPClient

func (o *AdminGetStatsParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the admin get stats params

func (*AdminGetStatsParams) SetTimeout

func (o *AdminGetStatsParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the admin get stats params

func (*AdminGetStatsParams) WithContext

WithContext adds the context to the admin get stats params

func (*AdminGetStatsParams) WithDefaults

func (o *AdminGetStatsParams) WithDefaults() *AdminGetStatsParams

WithDefaults hydrates default values in the admin get stats params (not the query body).

All values with no default are reset to their zero value.

func (*AdminGetStatsParams) WithHTTPClient

func (o *AdminGetStatsParams) WithHTTPClient(client *http.Client) *AdminGetStatsParams

WithHTTPClient adds the HTTPClient to the admin get stats params

func (*AdminGetStatsParams) WithTimeout

func (o *AdminGetStatsParams) WithTimeout(timeout time.Duration) *AdminGetStatsParams

WithTimeout adds the timeout to the admin get stats params

func (*AdminGetStatsParams) WriteToRequest

func (o *AdminGetStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type AdminGetStatsReader

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

AdminGetStatsReader is a Reader for the AdminGetStats structure.

func (*AdminGetStatsReader) ReadResponse

func (o *AdminGetStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type AdminGetStatsUnauthorized

type AdminGetStatsUnauthorized struct {
	Payload *models.ErrorResponseBody
}

AdminGetStatsUnauthorized describes a response with status code 401, with default header values.

UnauthorizedError is returned when the request is not authenticated.

func NewAdminGetStatsUnauthorized

func NewAdminGetStatsUnauthorized() *AdminGetStatsUnauthorized

NewAdminGetStatsUnauthorized creates a AdminGetStatsUnauthorized with default headers values

func (*AdminGetStatsUnauthorized) Error

func (o *AdminGetStatsUnauthorized) Error() string

func (*AdminGetStatsUnauthorized) GetPayload

type Client

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

Client for admin API

func (*Client) AdminGetSettings

func (a *Client) AdminGetSettings(params *AdminGetSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AdminGetSettingsOK, error)

AdminGetSettings fetches settings

If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `settings:read` and scopes: `settings:*`, `settings:auth.saml:` and `settings:auth.saml:enabled` (property level).

func (*Client) AdminGetStats

func (a *Client) AdminGetStats(params *AdminGetStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AdminGetStatsOK, error)
AdminGetStats fetches grafana stats

Only works with Basic Authentication (username and password). See introduction for an explanation.

If you are running Grafana Enterprise and have Fine-grained access control enabled, you need to have a permission with action `server:stats:read`.

func (*Client) PauseAllAlerts

func (a *Client) PauseAllAlerts(params *PauseAllAlertsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PauseAllAlertsOK, error)

PauseAllAlerts pauses unpause all legacy alerts

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	AdminGetSettings(params *AdminGetSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AdminGetSettingsOK, error)

	AdminGetStats(params *AdminGetStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*AdminGetStatsOK, error)

	PauseAllAlerts(params *PauseAllAlertsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PauseAllAlertsOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new admin API client.

type PauseAllAlertsForbidden

type PauseAllAlertsForbidden struct {
	Payload *models.ErrorResponseBody
}

PauseAllAlertsForbidden describes a response with status code 403, with default header values.

ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.

func NewPauseAllAlertsForbidden

func NewPauseAllAlertsForbidden() *PauseAllAlertsForbidden

NewPauseAllAlertsForbidden creates a PauseAllAlertsForbidden with default headers values

func (*PauseAllAlertsForbidden) Error

func (o *PauseAllAlertsForbidden) Error() string

func (*PauseAllAlertsForbidden) GetPayload

type PauseAllAlertsInternalServerError

type PauseAllAlertsInternalServerError struct {
	Payload *models.ErrorResponseBody
}

PauseAllAlertsInternalServerError describes a response with status code 500, with default header values.

InternalServerError is a general error indicating something went wrong internally.

func NewPauseAllAlertsInternalServerError

func NewPauseAllAlertsInternalServerError() *PauseAllAlertsInternalServerError

NewPauseAllAlertsInternalServerError creates a PauseAllAlertsInternalServerError with default headers values

func (*PauseAllAlertsInternalServerError) Error

func (*PauseAllAlertsInternalServerError) GetPayload

type PauseAllAlertsOK

type PauseAllAlertsOK struct {
	Payload *models.PauseAllAlertsOKBody
}

PauseAllAlertsOK describes a response with status code 200, with default header values.

(empty)

func NewPauseAllAlertsOK

func NewPauseAllAlertsOK() *PauseAllAlertsOK

NewPauseAllAlertsOK creates a PauseAllAlertsOK with default headers values

func (*PauseAllAlertsOK) Error

func (o *PauseAllAlertsOK) Error() string

func (*PauseAllAlertsOK) GetPayload

func (o *PauseAllAlertsOK) GetPayload() *models.PauseAllAlertsOKBody

type PauseAllAlertsParams

type PauseAllAlertsParams struct {

	// Body.
	Body *models.PauseAllAlertsCommand

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

PauseAllAlertsParams contains all the parameters to send to the API endpoint

for the pause all alerts operation.

Typically these are written to a http.Request.

func NewPauseAllAlertsParams

func NewPauseAllAlertsParams() *PauseAllAlertsParams

NewPauseAllAlertsParams creates a new PauseAllAlertsParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewPauseAllAlertsParamsWithContext

func NewPauseAllAlertsParamsWithContext(ctx context.Context) *PauseAllAlertsParams

NewPauseAllAlertsParamsWithContext creates a new PauseAllAlertsParams object with the ability to set a context for a request.

func NewPauseAllAlertsParamsWithHTTPClient

func NewPauseAllAlertsParamsWithHTTPClient(client *http.Client) *PauseAllAlertsParams

NewPauseAllAlertsParamsWithHTTPClient creates a new PauseAllAlertsParams object with the ability to set a custom HTTPClient for a request.

func NewPauseAllAlertsParamsWithTimeout

func NewPauseAllAlertsParamsWithTimeout(timeout time.Duration) *PauseAllAlertsParams

NewPauseAllAlertsParamsWithTimeout creates a new PauseAllAlertsParams object with the ability to set a timeout on a request.

func (*PauseAllAlertsParams) SetBody

SetBody adds the body to the pause all alerts params

func (*PauseAllAlertsParams) SetContext

func (o *PauseAllAlertsParams) SetContext(ctx context.Context)

SetContext adds the context to the pause all alerts params

func (*PauseAllAlertsParams) SetDefaults

func (o *PauseAllAlertsParams) SetDefaults()

SetDefaults hydrates default values in the pause all alerts params (not the query body).

All values with no default are reset to their zero value.

func (*PauseAllAlertsParams) SetHTTPClient

func (o *PauseAllAlertsParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the pause all alerts params

func (*PauseAllAlertsParams) SetTimeout

func (o *PauseAllAlertsParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the pause all alerts params

func (*PauseAllAlertsParams) WithBody

WithBody adds the body to the pause all alerts params

func (*PauseAllAlertsParams) WithContext

WithContext adds the context to the pause all alerts params

func (*PauseAllAlertsParams) WithDefaults

func (o *PauseAllAlertsParams) WithDefaults() *PauseAllAlertsParams

WithDefaults hydrates default values in the pause all alerts params (not the query body).

All values with no default are reset to their zero value.

func (*PauseAllAlertsParams) WithHTTPClient

func (o *PauseAllAlertsParams) WithHTTPClient(client *http.Client) *PauseAllAlertsParams

WithHTTPClient adds the HTTPClient to the pause all alerts params

func (*PauseAllAlertsParams) WithTimeout

func (o *PauseAllAlertsParams) WithTimeout(timeout time.Duration) *PauseAllAlertsParams

WithTimeout adds the timeout to the pause all alerts params

func (*PauseAllAlertsParams) WriteToRequest

func (o *PauseAllAlertsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type PauseAllAlertsReader

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

PauseAllAlertsReader is a Reader for the PauseAllAlerts structure.

func (*PauseAllAlertsReader) ReadResponse

func (o *PauseAllAlertsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type PauseAllAlertsUnauthorized

type PauseAllAlertsUnauthorized struct {
	Payload *models.ErrorResponseBody
}

PauseAllAlertsUnauthorized describes a response with status code 401, with default header values.

UnauthorizedError is returned when the request is not authenticated.

func NewPauseAllAlertsUnauthorized

func NewPauseAllAlertsUnauthorized() *PauseAllAlertsUnauthorized

NewPauseAllAlertsUnauthorized creates a PauseAllAlertsUnauthorized with default headers values

func (*PauseAllAlertsUnauthorized) Error

func (*PauseAllAlertsUnauthorized) GetPayload

Jump to

Keyboard shortcuts

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