Documentation
¶
Index ¶
- Constants
- Variables
- func NewClient(params ...client.ClientParam) (*v1.Client, error)
- func NewClientWithApiUrl(apiUrl string, params ...client.ClientParam) (*v1.Client, error)
- func NewClientWithApiUrlAndClient(apiUrl string, apiClient *http.Client, params ...client.ClientParam) (*v1.Client, error)
- func Unwrap[T json.Unmarshaler, U json.Marshaler](dst T, src U) (T, error)
- type AlertProjectAPI
- type AlertProjectCreateParams
- type AlertProjectUpdateParams
- type AlertRuleAPI
- type AlertRuleCreateParams
- type AlertRuleListHistoriesParams
- type AlertRuleUpdateParams
- type AlertsProjectsHistoriesListParams
- type DashboardProjectAPI
- type DashboardProjectCreateParams
- type DashboardProjectUpdateParams
- type Error
- type LogMeasureRuleAPI
- type LogMeasureRuleCreateParams
- type LogMeasureRuleListHistoriesParams
- type LogMeasureRuleUpdateParams
- type LogRoutingAPI
- type LogStorageCreateParams
- type LogStorageUpdateParams
- type LogsRoutingCreateParams
- type LogsRoutingUpdateParams
- type LogsRoutingsListParams
- type LogsStorageAPI
- type LogsStoragesListParams
- type ManagementAPI
- type MetricsRoutingAPI
- type MetricsRoutingCreateParams
- type MetricsRoutingUpdateParams
- type MetricsRoutingsListParams
- type MetricsStorageAPI
- type MetricsStorageCreateParams
- type MetricsStorageListParams
- type MetricsStorageUpdateParams
- type NotificationRoutingAPI
- type NotificationRoutingCreateParams
- type NotificationRoutingUpdateParams
- type NotificationTargetAPI
- type NotificationTargetCreateParams
- type NotificationTargetUpdateParams
- type NotificationTargetsListParams
- type ProvisioningCreateParam
- type PublisherAPI
- type TracesStorageAPI
- type TracesStorageCreateParams
- type TracesStorageListParams
- type TracesStorageUpdateParams
Constants ¶
View Source
const (
// DefaultAPIRootURL デフォルトのAPIルートURL
DefaultAPIRootURL = "https://secure.sakura.ad.jp/cloud/zone/is1a/api/monitoring/1.0/"
)
View Source
const Version = "0.1.0"
Variables ¶
View Source
var ( // UserAgent APIリクエスト時のユーザーエージェント UserAgent = fmt.Sprintf( "monitoring-suite-api-go/%s (%s/%s; +https://github.com/sacloud/monitoring-suite-api-go) %s", Version, runtime.GOOS, runtime.GOARCH, client.DefaultUserAgent, ) RequestCustomizers = []saht.RequestCustomizer{ func(req *http.Request) error { req.Header.Set("X-Sakura-Bigint-As-Int", "1") return nil }, } )
Functions ¶
func NewClientWithApiUrl ¶
Types ¶
type AlertProjectAPI ¶
type AlertProjectAPI interface {
List(ctx context.Context, count *int, from *int) ([]v1.AlertProject, error)
Create(ctx context.Context, params AlertProjectCreateParams) (*v1.AlertProject, error)
Read(ctx context.Context, id string) (*v1.WrappedAlertProject, error)
Update(ctx context.Context, id string, request AlertProjectUpdateParams) (*v1.WrappedAlertProject, error)
Delete(ctx context.Context, id string) error
ListHistories(ctx context.Context, params AlertsProjectsHistoriesListParams) ([]v1.History, error)
ReadHistory(ctx context.Context, projectId string, historyId uuid.UUID) (*v1.History, error)
}
func NewAlertProjectOp ¶
func NewAlertProjectOp(client *v1.Client) AlertProjectAPI
type AlertRuleAPI ¶
type AlertRuleAPI interface {
List(ctx context.Context, projectId string, count *int, from *int) ([]v1.AlertRule, error)
Create(ctx context.Context, projectId string, params AlertRuleCreateParams) (*v1.AlertRule, error)
Read(ctx context.Context, projectId string, ruleId uuid.UUID) (*v1.AlertRule, error)
Update(ctx context.Context, projectId string, ruleId uuid.UUID, params AlertRuleUpdateParams) (*v1.AlertRule, error)
Delete(ctx context.Context, projectId string, ruleId uuid.UUID) error
ListHistories(ctx context.Context, projectId string, ruleId uuid.UUID, params AlertRuleListHistoriesParams) ([]v1.History, error)
ReadHistory(ctx context.Context, projectId string, ruleId uuid.UUID, historyId uuid.UUID) (*v1.History, error)
}
func NewAlertRuleOp ¶
func NewAlertRuleOp(client *v1.Client) AlertRuleAPI
type AlertRuleCreateParams ¶
type AlertRuleCreateParams struct {
MetricsStorageID string // mandatory
Name *string
Query string // mandatory
Format *string
Template *string
EnabledWarning *bool
EnabledCritical *bool
ThresholdWarning *string
ThresholdCritical *string
ThresholdDurationWarning *int64
ThresholdDurationCritical *int64
}
type AlertRuleUpdateParams ¶
type DashboardProjectAPI ¶
type DashboardProjectAPI interface {
List(ctx context.Context, count *int, from *int) ([]v1.DashboardProject, error)
Create(ctx context.Context, request DashboardProjectCreateParams) (*v1.DashboardProject, error)
Read(ctx context.Context, id string) (*v1.DashboardProject, error)
Update(ctx context.Context, id string, params DashboardProjectUpdateParams) (*v1.DashboardProject, error)
Delete(ctx context.Context, id string) error
}
func NewDashboardOp ¶
func NewDashboardOp(client *v1.Client) DashboardProjectAPI
type LogMeasureRuleAPI ¶
type LogMeasureRuleAPI interface {
List(ctx context.Context, projectId string, count *int, from *int) ([]v1.LogMeasureRule, error)
Create(ctx context.Context, projectId string, params LogMeasureRuleCreateParams) (*v1.LogMeasureRule, error)
Read(ctx context.Context, projectId string, ruleId uuid.UUID) (*v1.LogMeasureRule, error)
Update(ctx context.Context, projectId string, ruleId uuid.UUID, params LogMeasureRuleUpdateParams) (*v1.LogMeasureRule, error)
Delete(ctx context.Context, projectId string, ruleId uuid.UUID) error
ListHistories(ctx context.Context, projectId string, params LogMeasureRuleListHistoriesParams) ([]v1.History, error)
ReadHistory(ctx context.Context, projectId string, historyId uuid.UUID) (*v1.History, error)
}
func NewLogMeasureRuleOp ¶
func NewLogMeasureRuleOp(client *v1.Client) LogMeasureRuleAPI
type LogRoutingAPI ¶
type LogRoutingAPI interface {
List(ctx context.Context, params LogsRoutingsListParams) ([]v1.LogRouting, error)
Create(ctx context.Context, params LogsRoutingCreateParams) (*v1.LogRouting, error)
Read(ctx context.Context, id uuid.UUID) (*v1.LogRouting, error)
Update(ctx context.Context, id uuid.UUID, params LogsRoutingUpdateParams) (*v1.LogRouting, error)
Delete(ctx context.Context, id uuid.UUID) error
}
func NewLogRoutingOp ¶
func NewLogRoutingOp(client *v1.Client) LogRoutingAPI
type LogStorageCreateParams ¶
type LogStorageCreateParams struct {
Name string
Description *string
IsSystem bool
Classification *v1.LogStorageCreateClassification
}
type LogStorageUpdateParams ¶
type LogsRoutingCreateParams ¶
type LogsRoutingUpdateParams ¶
type LogsRoutingsListParams ¶
type LogsStorageAPI ¶
type LogsStorageAPI interface {
List(ctx context.Context, params LogsStoragesListParams) ([]v1.LogStorage, error)
Create(ctx context.Context, params LogStorageCreateParams) (*v1.LogStorage, error)
Read(ctx context.Context, id string) (*v1.LogStorage, error)
Update(ctx context.Context, id string, params LogStorageUpdateParams) (*v1.LogStorage, error)
Delete(ctx context.Context, id string) error
ListKeys(ctx context.Context, logResourceId string, count *int, from *int) ([]v1.LogStorageAccessKey, error)
CreateKey(ctx context.Context, logResourceId string, description *string) (*v1.LogStorageAccessKey, error)
ReadKey(ctx context.Context, logResourceId string, id uuid.UUID) (*v1.LogStorageAccessKey, error)
UpdateKey(ctx context.Context, logResourceId string, id uuid.UUID, description *string) (*v1.LogStorageAccessKey, error)
DeleteKey(ctx context.Context, logResourceId string, id uuid.UUID) error
}
func NewLogsStorageOp ¶
func NewLogsStorageOp(client *v1.Client) LogsStorageAPI
type LogsStoragesListParams ¶
type LogsStoragesListParams struct {
AccountID *string
BucketClassification *v1.LogsStoragesListBucketClassification
Count *int
From *int
IsSystem *bool
ResourceID *string
Status *v1.LogsStoragesListStatus
}
type ManagementAPI ¶
type ManagementAPI interface {
ResourceLimits(ctx context.Context) (*v1.ResourcesLimits, error)
ReadProvisioning(ctx context.Context) (*v1.Provisioning, error)
CreateProvisioning(ctx context.Context, request ProvisioningCreateParam) (*v1.Provisioning, error)
}
func NewManagementOp ¶
func NewManagementOp(client *v1.Client) ManagementAPI
type MetricsRoutingAPI ¶
type MetricsRoutingAPI interface {
List(ctx context.Context, params MetricsRoutingsListParams) ([]v1.MetricsRouting, error)
Create(ctx context.Context, params MetricsRoutingCreateParams) (*v1.MetricsRouting, error)
Read(ctx context.Context, id uuid.UUID) (*v1.MetricsRouting, error)
Update(ctx context.Context, id uuid.UUID, params MetricsRoutingUpdateParams) (*v1.MetricsRouting, error)
Delete(ctx context.Context, id uuid.UUID) error
}
func NewMetricsRoutingOp ¶
func NewMetricsRoutingOp(client *v1.Client) MetricsRoutingAPI
type MetricsStorageAPI ¶
type MetricsStorageAPI interface {
List(ctx context.Context, params MetricsStorageListParams) ([]v1.MetricsStorage, error)
Create(ctx context.Context, request MetricsStorageCreateParams) (*v1.MetricsStorage, error)
Read(ctx context.Context, id string) (*v1.MetricsStorage, error)
Update(ctx context.Context, id string, request MetricsStorageUpdateParams) (*v1.MetricsStorage, error)
Delete(ctx context.Context, id string) error
ListKeys(ctx context.Context, metricsResourceId string, count *int, from *int) ([]v1.MetricsStorageAccessKey, error)
CreateKey(ctx context.Context, metricsResourceId string, description *string) (*v1.MetricsStorageAccessKey, error)
ReadKey(ctx context.Context, metricsResourceId string, id uuid.UUID) (*v1.MetricsStorageAccessKey, error)
UpdateKey(ctx context.Context, metricsResourceId string, id uuid.UUID, description *string) (*v1.MetricsStorageAccessKey, error)
DeleteKey(ctx context.Context, metricsResourceId string, id uuid.UUID) error
}
func NewMetricsStorageOp ¶
func NewMetricsStorageOp(client *v1.Client) MetricsStorageAPI
type NotificationRoutingAPI ¶
type NotificationRoutingAPI interface {
List(ctx context.Context, projectId string, count, from *int) ([]v1.NotificationRouting, error)
Create(ctx context.Context, projectId string, params NotificationRoutingCreateParams) (*v1.NotificationRouting, error)
Read(ctx context.Context, projectId string, id uuid.UUID) (*v1.NotificationRouting, error)
Update(ctx context.Context, projectId string, id uuid.UUID, params NotificationRoutingUpdateParams) (*v1.NotificationRouting, error)
Delete(ctx context.Context, projectId string, id uuid.UUID) error
Reorder(ctx context.Context, projectId string, orders []v1.NotificationRoutingOrder) error
}
func NewNotificationRoutingOp ¶
func NewNotificationRoutingOp(client *v1.Client) NotificationRoutingAPI
type NotificationRoutingCreateParams ¶
type NotificationRoutingCreateParams struct {
// Fields based on v1.NotificationRouting
NotificationTargetUID uuid.UUID
MatchLabels []v1.MatchLabelsItem
ResendIntervalMinutes *int
}
type NotificationRoutingUpdateParams ¶
type NotificationRoutingUpdateParams struct {
// Fields based on v1.PatchedNotificationRouting
NotificationTargetUID *uuid.UUID
MatchLabels []v1.MatchLabelsItem
ResendIntervalMinutes *int
}
type NotificationTargetAPI ¶
type NotificationTargetAPI interface {
List(ctx context.Context, projectId string, params NotificationTargetsListParams) ([]v1.NotificationTarget, error)
Create(ctx context.Context, projectId string, params NotificationTargetCreateParams) (*v1.NotificationTarget, error)
Read(ctx context.Context, projectId string, id uuid.UUID) (*v1.NotificationTarget, error)
Update(ctx context.Context, projectId string, id uuid.UUID, params NotificationTargetUpdateParams) (*v1.NotificationTarget, error)
Delete(ctx context.Context, projectId string, id uuid.UUID) error
}
func NewNotificationTargetOp ¶
func NewNotificationTargetOp(client *v1.Client) NotificationTargetAPI
type NotificationTargetCreateParams ¶
type NotificationTargetCreateParams struct {
ServiceType v1.NotificationTargetServiceType
URL url.URL
Description *string
}
type NotificationTargetUpdateParams ¶
type NotificationTargetUpdateParams struct {
ServiceType *v1.PatchedNotificationTargetServiceType
URL *string
Description *string
}
type ProvisioningCreateParam ¶
type ProvisioningCreateParam struct {
Logs *v1.ProvisioningExist
Metrics *v1.ProvisioningExist
}
type PublisherAPI ¶
type PublisherAPI interface {
List(ctx context.Context, count *int, from *int) ([]v1.Publisher, error)
Read(ctx context.Context, code string) (*v1.Publisher, error)
}
func NewPublisherOp ¶
func NewPublisherOp(client *v1.Client) PublisherAPI
type TracesStorageAPI ¶
type TracesStorageAPI interface {
List(ctx context.Context, params TracesStorageListParams) ([]v1.TraceStorage, error)
Create(ctx context.Context, request TracesStorageCreateParams) (*v1.TraceStorage, error)
Read(ctx context.Context, id string) (*v1.TraceStorage, error)
Update(ctx context.Context, id string, request TracesStorageUpdateParams) (*v1.TraceStorage, error)
Delete(ctx context.Context, id string) error
ListKeys(ctx context.Context, tracesResourceId string, count *int, from *int) ([]v1.TraceStorageAccessKey, error)
CreateKey(ctx context.Context, tracesResourceId string, description *string) (*v1.TraceStorageAccessKey, error)
ReadKey(ctx context.Context, tracesResourceId string, id uuid.UUID) (*v1.TraceStorageAccessKey, error)
UpdateKey(ctx context.Context, tracesResourceId string, id uuid.UUID, description *string) (*v1.TraceStorageAccessKey, error)
DeleteKey(ctx context.Context, tracesResourceId string, id uuid.UUID) error
}
func NewTracesStorageOp ¶
func NewTracesStorageOp(client *v1.Client) TracesStorageAPI
type TracesStorageCreateParams ¶
type TracesStorageCreateParams struct {
Name string
Description *string
Classification *v1.TraceStorageCreateClassification
}
type TracesStorageListParams ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.