cockpit

package
v1.0.0-beta.25 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

Package cockpit provides methods and message types of the cockpit v1beta1 API.

Index

Constants

View Source
const (
	CockpitStatusUnknownStatus = CockpitStatus("unknown_status")
	CockpitStatusCreating      = CockpitStatus("creating")
	CockpitStatusReady         = CockpitStatus("ready")
	CockpitStatusDeleting      = CockpitStatus("deleting")
	CockpitStatusUpdating      = CockpitStatus("updating")
	CockpitStatusError         = CockpitStatus("error")
)
View Source
const (
	DatasourceTypeUnknownDatasourceType = DatasourceType("unknown_datasource_type")
	DatasourceTypeMetrics               = DatasourceType("metrics")
	DatasourceTypeLogs                  = DatasourceType("logs")
	DatasourceTypeTraces                = DatasourceType("traces")
	DatasourceTypeAlerts                = DatasourceType("alerts")
)
View Source
const (
	GrafanaUserRoleUnknownRole = GrafanaUserRole("unknown_role")
	GrafanaUserRoleEditor      = GrafanaUserRole("editor")
	GrafanaUserRoleViewer      = GrafanaUserRole("viewer")
)
View Source
const (
	ListDatasourcesRequestOrderByCreatedAtAsc  = ListDatasourcesRequestOrderBy("created_at_asc")
	ListDatasourcesRequestOrderByCreatedAtDesc = ListDatasourcesRequestOrderBy("created_at_desc")
	ListDatasourcesRequestOrderByNameAsc       = ListDatasourcesRequestOrderBy("name_asc")
	ListDatasourcesRequestOrderByNameDesc      = ListDatasourcesRequestOrderBy("name_desc")
)
View Source
const (
	ListGrafanaUsersRequestOrderByLoginAsc  = ListGrafanaUsersRequestOrderBy("login_asc")
	ListGrafanaUsersRequestOrderByLoginDesc = ListGrafanaUsersRequestOrderBy("login_desc")
)
View Source
const (
	ListPlansRequestOrderByNameAsc  = ListPlansRequestOrderBy("name_asc")
	ListPlansRequestOrderByNameDesc = ListPlansRequestOrderBy("name_desc")
)
View Source
const (
	ListTokensRequestOrderByCreatedAtAsc  = ListTokensRequestOrderBy("created_at_asc")
	ListTokensRequestOrderByCreatedAtDesc = ListTokensRequestOrderBy("created_at_desc")
	ListTokensRequestOrderByNameAsc       = ListTokensRequestOrderBy("name_asc")
	ListTokensRequestOrderByNameDesc      = ListTokensRequestOrderBy("name_desc")
)
View Source
const (
	PlanNameUnknownName = PlanName("unknown_name")
	PlanNameFree        = PlanName("free")
	PlanNamePremium     = PlanName("premium")
	PlanNameCustom      = PlanName("custom")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

The Cockpit API allows you to activate your Cockpit to store metrics and logs. It also provides you with a dedicated Grafana for dashboarding to visualize your metrics and logs.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) ActivateCockpit

func (s *API) ActivateCockpit(req *ActivateCockpitRequest, opts ...scw.RequestOption) (*Cockpit, error)

ActivateCockpit: Activate the Cockpit of a given Project specified by the Project ID.

func (*API) CreateContactPoint

func (s *API) CreateContactPoint(req *CreateContactPointRequest, opts ...scw.RequestOption) (*ContactPoint, error)

CreateContactPoint: Create a contact point associated with the default receiver, to receive alerts.

func (*API) CreateDatasource

func (s *API) CreateDatasource(req *CreateDatasourceRequest, opts ...scw.RequestOption) (*Datasource, error)

CreateDatasource: Create a data source for a given Project specified by the Project ID and the data source type.

func (*API) CreateGrafanaUser

func (s *API) CreateGrafanaUser(req *CreateGrafanaUserRequest, opts ...scw.RequestOption) (*GrafanaUser, error)

CreateGrafanaUser: Create a Grafana user for your Cockpit's Grafana. Make sure you save the automatically-generated password and the Grafana user ID.

func (*API) CreateToken

func (s *API) CreateToken(req *CreateTokenRequest, opts ...scw.RequestOption) (*Token, error)

CreateToken: Create a token in a given Project specified by the Project ID.

func (*API) DeactivateCockpit

func (s *API) DeactivateCockpit(req *DeactivateCockpitRequest, opts ...scw.RequestOption) (*Cockpit, error)

DeactivateCockpit: Deactivate the Cockpit of a given Project specified by the Project ID.

func (*API) DeleteContactPoint

func (s *API) DeleteContactPoint(req *DeleteContactPointRequest, opts ...scw.RequestOption) error

DeleteContactPoint: Delete a contact point associated with the default receiver.

func (*API) DeleteDatasource

func (s *API) DeleteDatasource(req *DeleteDatasourceRequest, opts ...scw.RequestOption) error

DeleteDatasource: Delete a given data source specified by the data source ID.

func (*API) DeleteGrafanaUser

func (s *API) DeleteGrafanaUser(req *DeleteGrafanaUserRequest, opts ...scw.RequestOption) error

DeleteGrafanaUser: Delete a Grafana user from your Cockpit's Grafana, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user.

func (*API) DeleteToken

func (s *API) DeleteToken(req *DeleteTokenRequest, opts ...scw.RequestOption) error

DeleteToken: Delete a given token specified by the token ID.

func (*API) DisableManagedAlerts

func (s *API) DisableManagedAlerts(req *DisableManagedAlertsRequest, opts ...scw.RequestOption) error

DisableManagedAlerts: Disable the sending of managed alerts for a given Cockpit, specified by the ID of the Project the Cockpit belongs to.

func (*API) EnableManagedAlerts

func (s *API) EnableManagedAlerts(req *EnableManagedAlertsRequest, opts ...scw.RequestOption) error

EnableManagedAlerts: Enable the sending of managed alerts for a given Cockpit, specified by the ID of the Project the Cockpit belongs to.

func (*API) GetCockpit

func (s *API) GetCockpit(req *GetCockpitRequest, opts ...scw.RequestOption) (*Cockpit, error)

GetCockpit: Retrieve the Cockpit of a given Project specified by the Project ID.

func (*API) GetCockpitMetrics

func (s *API) GetCockpitMetrics(req *GetCockpitMetricsRequest, opts ...scw.RequestOption) (*CockpitMetrics, error)

GetCockpitMetrics: Retrieve metrics from your Cockpit specified by the ID of the Project the Cockpit belongs to.

func (*API) GetGrafanaProductDashboard

func (s *API) GetGrafanaProductDashboard(req *GetGrafanaProductDashboardRequest, opts ...scw.RequestOption) (*GrafanaProductDashboard, error)

GetGrafanaProductDashboard: Get a product dashboard specified by the dashboard ID.

func (*API) GetToken

func (s *API) GetToken(req *GetTokenRequest, opts ...scw.RequestOption) (*Token, error)

GetToken: Retrieve a given token specified by the token ID.

func (*API) ListContactPoints

func (s *API) ListContactPoints(req *ListContactPointsRequest, opts ...scw.RequestOption) (*ListContactPointsResponse, error)

ListContactPoints: Get a list of contact points created for a given Cockpit, specified by the ID of the Project the Cockpit belongs to.

func (*API) ListDatasources

func (s *API) ListDatasources(req *ListDatasourcesRequest, opts ...scw.RequestOption) (*ListDatasourcesResponse, error)

ListDatasources: Get a list of data sources for the specified Project ID.

func (*API) ListGrafanaProductDashboards

func (s *API) ListGrafanaProductDashboards(req *ListGrafanaProductDashboardsRequest, opts ...scw.RequestOption) (*ListGrafanaProductDashboardsResponse, error)

ListGrafanaProductDashboards: Get a list of available product dashboards.

func (*API) ListGrafanaUsers

func (s *API) ListGrafanaUsers(req *ListGrafanaUsersRequest, opts ...scw.RequestOption) (*ListGrafanaUsersResponse, error)

ListGrafanaUsers: Get a list of all Grafana users created in your Cockpit's Grafana.

func (*API) ListPlans

func (s *API) ListPlans(req *ListPlansRequest, opts ...scw.RequestOption) (*ListPlansResponse, error)

ListPlans: Get a list of all pricing plans available.

func (*API) ListTokens

func (s *API) ListTokens(req *ListTokensRequest, opts ...scw.RequestOption) (*ListTokensResponse, error)

ListTokens: Get a list of tokens in a given Project specified by the Project ID.

func (*API) ResetGrafanaUserPassword

func (s *API) ResetGrafanaUserPassword(req *ResetGrafanaUserPasswordRequest, opts ...scw.RequestOption) (*GrafanaUser, error)

ResetGrafanaUserPassword: Reset the password of a Grafana user, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user.

func (*API) SelectPlan

func (s *API) SelectPlan(req *SelectPlanRequest, opts ...scw.RequestOption) (*SelectPlanResponse, error)

SelectPlan: Select your chosen pricing plan for your Cockpit, specifying the Cockpit's Project ID and the pricing plan's ID in the request.

func (*API) TriggerTestAlert

func (s *API) TriggerTestAlert(req *TriggerTestAlertRequest, opts ...scw.RequestOption) error

TriggerTestAlert: Send a test alert to make sure your contact points get notified when an actual alert is triggered.

func (*API) WaitForCockpit

func (s *API) WaitForCockpit(
	req *WaitForCockpitRequest,
	opts ...scw.RequestOption,
) (*Cockpit, error)

type ActivateCockpitRequest

type ActivateCockpitRequest struct {
	// ProjectID: ID of the Project the Cockpit belongs to.
	ProjectID string `json:"project_id"`
}

ActivateCockpitRequest: activate cockpit request.

type Cockpit

type Cockpit struct {
	// ProjectID: ID of the Project the Cockpit belongs to.
	ProjectID string `json:"project_id"`

	// CreatedAt: date and time of the Cockpit's creation.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: date and time of the Cockpit's last update.
	UpdatedAt *time.Time `json:"updated_at"`

	// Endpoints: endpoints of the Cockpit.
	Endpoints *CockpitEndpoints `json:"endpoints"`

	// Status: status of the Cockpit.
	// Default value: unknown_status
	Status CockpitStatus `json:"status"`

	// ManagedAlertsEnabled: specifies whether managed alerts are enabled or disabled.
	ManagedAlertsEnabled bool `json:"managed_alerts_enabled"`

	// Plan: pricing plan information.
	Plan *Plan `json:"plan"`
}

Cockpit: Cockpit.

type CockpitEndpoints

type CockpitEndpoints struct {
	// MetricsURL: URL for metrics.
	MetricsURL string `json:"metrics_url"`

	// LogsURL: URL for logs.
	LogsURL string `json:"logs_url"`

	// TracesURL: URL for traces.
	TracesURL string `json:"traces_url"`

	// AlertmanagerURL: URL for the alert manager.
	AlertmanagerURL string `json:"alertmanager_url"`

	// GrafanaURL: URL for the Grafana dashboard.
	GrafanaURL string `json:"grafana_url"`
}

CockpitEndpoints: cockpit endpoints.

type CockpitMetrics

type CockpitMetrics struct {
	// Timeseries: time series array.
	Timeseries []*scw.TimeSeries `json:"timeseries"`
}

CockpitMetrics: Metrics for a given Cockpit.

type CockpitStatus

type CockpitStatus string

func (CockpitStatus) MarshalJSON

func (enum CockpitStatus) MarshalJSON() ([]byte, error)

func (CockpitStatus) String

func (enum CockpitStatus) String() string

func (*CockpitStatus) UnmarshalJSON

func (enum *CockpitStatus) UnmarshalJSON(data []byte) error

type ContactPoint

type ContactPoint struct {
	// Email: contact point configuration.
	// Precisely one of Email must be set.
	Email *ContactPointEmail `json:"email,omitempty"`
}

ContactPoint: Contact point.

type ContactPointEmail

type ContactPointEmail struct {
	To string `json:"to"`
}

ContactPointEmail: contact point email.

type CreateContactPointRequest

type CreateContactPointRequest struct {
	// ProjectID: ID of the Project in which to create the contact point.
	ProjectID string `json:"project_id"`

	// ContactPoint: contact point to create.
	ContactPoint *ContactPoint `json:"contact_point,omitempty"`
}

CreateContactPointRequest: Request to create a contact point.

type CreateDatasourceRequest

type CreateDatasourceRequest struct {
	// ProjectID: ID of the Project the Cockpit belongs to.
	ProjectID string `json:"project_id"`

	// Name: data source name.
	Name string `json:"name"`

	// Type: data source type.
	// Default value: unknown_datasource_type
	Type DatasourceType `json:"type"`

	// IsDefault: specifies that the returned output is the default data source per type.
	IsDefault bool `json:"is_default"`
}

CreateDatasourceRequest: Request to create a data source.

type CreateGrafanaUserRequest

type CreateGrafanaUserRequest struct {
	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`

	// Login: username of the Grafana user.
	Login string `json:"login"`

	// Role: role assigned to the Grafana user.
	// Default value: unknown_role
	Role GrafanaUserRole `json:"role"`
}

CreateGrafanaUserRequest: Request to create a Grafana user.

type CreateTokenRequest

type CreateTokenRequest struct {
	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`

	// Name: name of the token.
	Name string `json:"name"`

	// Scopes: token's permissions.
	Scopes *TokenScopes `json:"scopes,omitempty"`
}

CreateTokenRequest: create token request.

type Datasource

type Datasource struct {
	// ID: ID of the data source.
	ID string `json:"id"`

	// ProjectID: ID of the Project the Cockpit belongs to.
	ProjectID string `json:"project_id"`

	// Name: data source name.
	Name string `json:"name"`

	// URL: data source URL.
	URL string `json:"url"`

	// Type: data source type.
	// Default value: unknown_datasource_type
	Type DatasourceType `json:"type"`

	// IsManagedByScaleway: specifies that the data source receives data from Scaleway products and is managed by Scaleway.
	IsManagedByScaleway bool `json:"is_managed_by_scaleway"`
}

Datasource: Data source.

type DatasourceType

type DatasourceType string

func (DatasourceType) MarshalJSON

func (enum DatasourceType) MarshalJSON() ([]byte, error)

func (DatasourceType) String

func (enum DatasourceType) String() string

func (*DatasourceType) UnmarshalJSON

func (enum *DatasourceType) UnmarshalJSON(data []byte) error

type DeactivateCockpitRequest

type DeactivateCockpitRequest struct {
	// ProjectID: ID of the Project the Cockpit belongs to.
	ProjectID string `json:"project_id"`
}

DeactivateCockpitRequest: deactivate cockpit request.

type DeleteContactPointRequest

type DeleteContactPointRequest struct {
	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`

	// ContactPoint: contact point to delete.
	ContactPoint *ContactPoint `json:"contact_point,omitempty"`
}

DeleteContactPointRequest: Request to delete a contact point.

type DeleteDatasourceRequest

type DeleteDatasourceRequest struct {
	// DatasourceID: ID of the data source.
	DatasourceID string `json:"-"`
}

DeleteDatasourceRequest: Request to delete a data source.

type DeleteGrafanaUserRequest

type DeleteGrafanaUserRequest struct {
	// GrafanaUserID: ID of the Grafana user.
	GrafanaUserID uint32 `json:"-"`

	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`
}

DeleteGrafanaUserRequest: Request to delete a Grafana user.

type DeleteTokenRequest

type DeleteTokenRequest struct {
	// TokenID: ID of the token.
	TokenID string `json:"-"`
}

DeleteTokenRequest: delete token request.

type DisableManagedAlertsRequest

type DisableManagedAlertsRequest struct {
	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`
}

DisableManagedAlertsRequest: Request to disable the sending of managed alerts.

type EnableManagedAlertsRequest

type EnableManagedAlertsRequest struct {
	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`
}

EnableManagedAlertsRequest: Request to enable the sending of managed alerts.

type GetCockpitMetricsRequest

type GetCockpitMetricsRequest struct {
	// ProjectID: ID of the Project the Cockpit belongs to.
	ProjectID string `json:"-"`

	// StartDate: desired time range's start date for the metrics.
	StartDate *time.Time `json:"-"`

	// EndDate: desired time range's end date for the metrics.
	EndDate *time.Time `json:"-"`

	// MetricName: name of the metric requested.
	MetricName *string `json:"-"`
}

GetCockpitMetricsRequest: Request to get a given Cockpit's metrics.

type GetCockpitRequest

type GetCockpitRequest struct {
	// ProjectID: ID of the Project the Cockpit belongs to.
	ProjectID string `json:"-"`
}

GetCockpitRequest: get cockpit request.

type GetGrafanaProductDashboardRequest

type GetGrafanaProductDashboardRequest struct {
	// DashboardName: name of the dashboard.
	DashboardName string `json:"-"`

	// ProjectID: ID of the Project.
	ProjectID string `json:"-"`
}

GetGrafanaProductDashboardRequest: Request to get a dashboard.

type GetTokenRequest

type GetTokenRequest struct {
	// TokenID: ID of the token.
	TokenID string `json:"-"`
}

GetTokenRequest: get token request.

type GrafanaProductDashboard

type GrafanaProductDashboard struct {
	// DashboardName: name of the dashboard.
	DashboardName string `json:"dashboard_name"`

	// Title: title of the dashboard.
	Title string `json:"title"`

	// URL: URL of the dashboard.
	URL string `json:"url"`

	// Tags: tags of the dashboard.
	Tags []string `json:"tags"`

	// Variables: variables of the dashboard.
	Variables []string `json:"variables"`
}

GrafanaProductDashboard: Grafana dashboard.

type GrafanaUser

type GrafanaUser struct {
	// ID: ID of the Grafana user.
	ID uint32 `json:"id"`

	// Login: username of the Grafana user.
	Login string `json:"login"`

	// Role: role assigned to the Grafana user.
	// Default value: unknown_role
	Role GrafanaUserRole `json:"role"`

	// Password: the Grafana user's password.
	Password *string `json:"password"`
}

GrafanaUser: Grafana user.

type GrafanaUserRole

type GrafanaUserRole string

func (GrafanaUserRole) MarshalJSON

func (enum GrafanaUserRole) MarshalJSON() ([]byte, error)

func (GrafanaUserRole) String

func (enum GrafanaUserRole) String() string

func (*GrafanaUserRole) UnmarshalJSON

func (enum *GrafanaUserRole) UnmarshalJSON(data []byte) error

type ListContactPointsRequest

type ListContactPointsRequest struct {
	// Page: page number.
	Page *int32 `json:"-"`

	// PageSize: page size.
	PageSize *uint32 `json:"-"`

	// ProjectID: ID of the Project from which to list the contact points.
	ProjectID string `json:"-"`
}

ListContactPointsRequest: Request to list all contact points.

type ListContactPointsResponse

type ListContactPointsResponse struct {
	// TotalCount: count of all contact points created.
	TotalCount uint32 `json:"total_count"`

	// ContactPoints: array of contact points.
	ContactPoints []*ContactPoint `json:"contact_points"`

	// HasAdditionalReceivers: specifies whether the contact point has other receivers than the default receiver.
	HasAdditionalReceivers bool `json:"has_additional_receivers"`

	// HasAdditionalContactPoints: specifies whether there are unmanaged contact points.
	HasAdditionalContactPoints bool `json:"has_additional_contact_points"`
}

ListContactPointsResponse: Response returned when listing contact points.

func (*ListContactPointsResponse) UnsafeAppend

func (r *ListContactPointsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListContactPointsResponse) UnsafeGetTotalCount

func (r *ListContactPointsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListDatasourcesRequest

type ListDatasourcesRequest struct {
	// Page: page number.
	Page *int32 `json:"-"`

	// PageSize: page size.
	PageSize *uint32 `json:"-"`

	// OrderBy: how the response is ordered.
	// Default value: created_at_asc
	OrderBy ListDatasourcesRequestOrderBy `json:"-"`

	// ProjectID: ID of the Project.
	ProjectID string `json:"-"`

	// Types: filter by datasource types.
	Types []DatasourceType `json:"-"`

	// IsManagedByScaleway: filter by managed datasources.
	IsManagedByScaleway *bool `json:"-"`
}

ListDatasourcesRequest: list datasources request.

type ListDatasourcesRequestOrderBy

type ListDatasourcesRequestOrderBy string

func (ListDatasourcesRequestOrderBy) MarshalJSON

func (enum ListDatasourcesRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListDatasourcesRequestOrderBy) String

func (enum ListDatasourcesRequestOrderBy) String() string

func (*ListDatasourcesRequestOrderBy) UnmarshalJSON

func (enum *ListDatasourcesRequestOrderBy) UnmarshalJSON(data []byte) error

type ListDatasourcesResponse

type ListDatasourcesResponse struct {
	// TotalCount: count of all datasources corresponding to the request.
	TotalCount uint32 `json:"total_count"`

	// Datasources: list of the datasources within the pagination.
	Datasources []*Datasource `json:"datasources"`
}

ListDatasourcesResponse: list datasources response.

func (*ListDatasourcesResponse) UnsafeAppend

func (r *ListDatasourcesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListDatasourcesResponse) UnsafeGetTotalCount

func (r *ListDatasourcesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListGrafanaProductDashboardsRequest

type ListGrafanaProductDashboardsRequest struct {
	// ProjectID: ID of the Project.
	ProjectID string `json:"-"`

	// Page: page number.
	Page *int32 `json:"-"`

	// PageSize: page size.
	PageSize *uint32 `json:"-"`

	// Tags: tags to filter the dashboards.
	Tags []string `json:"-"`
}

ListGrafanaProductDashboardsRequest: Request to get a list of dashboards.

type ListGrafanaProductDashboardsResponse

type ListGrafanaProductDashboardsResponse struct {
	// TotalCount: count of grafana dasboards.
	TotalCount uint64 `json:"total_count"`

	// Dashboards: information on grafana dashboards.
	Dashboards []*GrafanaProductDashboard `json:"dashboards"`
}

ListGrafanaProductDashboardsResponse: Response returned when getting a list of dashboards.

func (*ListGrafanaProductDashboardsResponse) UnsafeAppend

func (r *ListGrafanaProductDashboardsResponse) UnsafeAppend(res interface{}) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListGrafanaProductDashboardsResponse) UnsafeGetTotalCount

func (r *ListGrafanaProductDashboardsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListGrafanaUsersRequest

type ListGrafanaUsersRequest struct {
	// Page: page number.
	Page *int32 `json:"-"`

	// PageSize: page size.
	PageSize *uint32 `json:"-"`

	// OrderBy: default value: login_asc
	OrderBy ListGrafanaUsersRequestOrderBy `json:"-"`

	// ProjectID: ID of the Project.
	ProjectID string `json:"-"`
}

ListGrafanaUsersRequest: Request to list all Grafana users.

type ListGrafanaUsersRequestOrderBy

type ListGrafanaUsersRequestOrderBy string

func (ListGrafanaUsersRequestOrderBy) MarshalJSON

func (enum ListGrafanaUsersRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListGrafanaUsersRequestOrderBy) String

func (enum ListGrafanaUsersRequestOrderBy) String() string

func (*ListGrafanaUsersRequestOrderBy) UnmarshalJSON

func (enum *ListGrafanaUsersRequestOrderBy) UnmarshalJSON(data []byte) error

type ListGrafanaUsersResponse

type ListGrafanaUsersResponse struct {
	// TotalCount: count of all Grafana users.
	TotalCount uint32 `json:"total_count"`

	// GrafanaUsers: information on all Grafana users.
	GrafanaUsers []*GrafanaUser `json:"grafana_users"`
}

ListGrafanaUsersResponse: Response returned when listing Grafana users.

func (*ListGrafanaUsersResponse) UnsafeAppend

func (r *ListGrafanaUsersResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListGrafanaUsersResponse) UnsafeGetTotalCount

func (r *ListGrafanaUsersResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListPlansRequest

type ListPlansRequest struct {
	// Page: page number.
	Page *int32 `json:"-"`

	// PageSize: page size.
	PageSize *uint32 `json:"-"`

	// OrderBy: default value: name_asc
	OrderBy ListPlansRequestOrderBy `json:"-"`
}

ListPlansRequest: Request to list all pricing plans.

type ListPlansRequestOrderBy

type ListPlansRequestOrderBy string

func (ListPlansRequestOrderBy) MarshalJSON

func (enum ListPlansRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListPlansRequestOrderBy) String

func (enum ListPlansRequestOrderBy) String() string

func (*ListPlansRequestOrderBy) UnmarshalJSON

func (enum *ListPlansRequestOrderBy) UnmarshalJSON(data []byte) error

type ListPlansResponse

type ListPlansResponse struct {
	// TotalCount: count of all pricing plans.
	TotalCount uint64 `json:"total_count"`

	// Plans: information on plans.
	Plans []*Plan `json:"plans"`
}

ListPlansResponse: Response returned when listing all pricing plans.

func (*ListPlansResponse) UnsafeAppend

func (r *ListPlansResponse) UnsafeAppend(res interface{}) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListPlansResponse) UnsafeGetTotalCount

func (r *ListPlansResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListTokensRequest

type ListTokensRequest struct {
	// Page: page number.
	Page *int32 `json:"-"`

	// PageSize: page size.
	PageSize *uint32 `json:"-"`

	// OrderBy: how the response is ordered.
	// Default value: created_at_asc
	OrderBy ListTokensRequestOrderBy `json:"-"`

	// ProjectID: ID of the Project.
	ProjectID string `json:"-"`
}

ListTokensRequest: list tokens request.

type ListTokensRequestOrderBy

type ListTokensRequestOrderBy string

func (ListTokensRequestOrderBy) MarshalJSON

func (enum ListTokensRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListTokensRequestOrderBy) String

func (enum ListTokensRequestOrderBy) String() string

func (*ListTokensRequestOrderBy) UnmarshalJSON

func (enum *ListTokensRequestOrderBy) UnmarshalJSON(data []byte) error

type ListTokensResponse

type ListTokensResponse struct {
	// TotalCount: count of all tokens created.
	TotalCount uint32 `json:"total_count"`

	// Tokens: list of all tokens created.
	Tokens []*Token `json:"tokens"`
}

ListTokensResponse: list tokens response.

func (*ListTokensResponse) UnsafeAppend

func (r *ListTokensResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListTokensResponse) UnsafeGetTotalCount

func (r *ListTokensResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type Plan

type Plan struct {
	// ID: ID of a given pricing plan.
	ID string `json:"id"`

	// Name: name of a given pricing plan.
	// Default value: unknown_name
	Name PlanName `json:"name"`

	// RetentionMetricsInterval: interval of time during which Scaleway's Cockpit keeps your metrics.
	RetentionMetricsInterval *scw.Duration `json:"retention_metrics_interval"`

	// RetentionLogsInterval: interval of time during which Scaleway's Cockpit keeps your logs.
	RetentionLogsInterval *scw.Duration `json:"retention_logs_interval"`

	// RetentionTracesInterval: interval of time during which Scaleway's Cockpit keeps your traces.
	RetentionTracesInterval *scw.Duration `json:"retention_traces_interval"`

	// SampleIngestionPrice: ingestion price in cents for 1 million samples.
	SampleIngestionPrice uint32 `json:"sample_ingestion_price"`

	// LogsIngestionPrice: ingestion price in cents for 1 GB of logs.
	LogsIngestionPrice uint32 `json:"logs_ingestion_price"`

	// TracesIngestionPrice: ingestion price in cents for 1 GB of traces.
	TracesIngestionPrice uint32 `json:"traces_ingestion_price"`

	// RetentionPrice: retention price in euros per month.
	RetentionPrice uint32 `json:"retention_price"`
}

Plan: Pricing plan.

type PlanName

type PlanName string

func (PlanName) MarshalJSON

func (enum PlanName) MarshalJSON() ([]byte, error)

func (PlanName) String

func (enum PlanName) String() string

func (*PlanName) UnmarshalJSON

func (enum *PlanName) UnmarshalJSON(data []byte) error

type ResetGrafanaUserPasswordRequest

type ResetGrafanaUserPasswordRequest struct {
	// GrafanaUserID: ID of the Grafana user.
	GrafanaUserID uint32 `json:"-"`

	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`
}

ResetGrafanaUserPasswordRequest: Request to reset a Grafana user's password.

type SelectPlanRequest

type SelectPlanRequest struct {
	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`

	// PlanID: ID of the pricing plan.
	PlanID string `json:"plan_id"`
}

SelectPlanRequest: Request to select a specific pricing plan.

type SelectPlanResponse

type SelectPlanResponse struct {
}

SelectPlanResponse: Response returned when selecting a pricing plan.

type Token

type Token struct {
	// ID: ID of the token.
	ID string `json:"id"`

	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`

	// Name: name of the token.
	Name string `json:"name"`

	// CreatedAt: date and time of the token's creation.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: date and time of the token's last update.
	UpdatedAt *time.Time `json:"updated_at"`

	// Scopes: token's permissions.
	Scopes *TokenScopes `json:"scopes"`

	// SecretKey: token's secret key.
	SecretKey *string `json:"secret_key"`
}

Token: token.

type TokenScopes

type TokenScopes struct {
	// QueryMetrics: permission to fetch metrics.
	QueryMetrics bool `json:"query_metrics"`

	// WriteMetrics: permission to write metrics.
	WriteMetrics bool `json:"write_metrics"`

	// SetupMetricsRules: permission to setup metrics rules.
	SetupMetricsRules bool `json:"setup_metrics_rules"`

	// QueryLogs: permission to fetch logs.
	QueryLogs bool `json:"query_logs"`

	// WriteLogs: permission to write logs.
	WriteLogs bool `json:"write_logs"`

	// SetupLogsRules: permission to set up logs rules.
	SetupLogsRules bool `json:"setup_logs_rules"`

	// SetupAlerts: permission to set up alerts.
	SetupAlerts bool `json:"setup_alerts"`

	// QueryTraces: permission to fetch traces.
	QueryTraces bool `json:"query_traces"`

	// WriteTraces: permission to write traces.
	WriteTraces bool `json:"write_traces"`
}

TokenScopes: token scopes.

type TriggerTestAlertRequest

type TriggerTestAlertRequest struct {
	ProjectID string `json:"project_id"`
}

TriggerTestAlertRequest: trigger test alert request.

type WaitForCockpitRequest

type WaitForCockpitRequest struct {
	ProjectID     string
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForCockpitRequest is used by WaitForCockpit method.

Jump to

Keyboard shortcuts

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