Documentation ¶
Index ¶
- type MetricsScopesImporterHandler
- type MetricsScopesService
- func (s *MetricsScopesService) CreateMonitoredProject(ctx context.Context, scopingProject string, monitoredProject string) (*metricsscopepb.MonitoredProject, error)
- func (s *MetricsScopesService) DeleteMonitoredProject(ctx context.Context, scopingProject string, monitoredProject string) error
- func (s *MetricsScopesService) DeleteMonitoredProjectByMonitoredProjectName(ctx context.Context, monitoredProjectName string) error
- func (s *MetricsScopesService) GetMetricsScope(ctx context.Context, project string) (*metricsscopepb.MetricsScope, error)
- func (s *MetricsScopesService) ListMetricsScopesByMonitoredProject(ctx context.Context, project string) ([]*metricsscopepb.MetricsScope, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricsScopesImporterHandler ¶
type MetricsScopesImporterHandler struct {
Service *Service
}
func NewMetricsScopesImporterHandler ¶
func NewMetricsScopesImporterHandler(ctx context.Context, service *Service) (*MetricsScopesImporterHandler, error)
func (*MetricsScopesImporterHandler) Handler ¶
func (h *MetricsScopesImporterHandler) Handler(w http.ResponseWriter, r *http.Request)
type MetricsScopesService ¶
type MetricsScopesService struct {
// contains filtered or unexported fields
}
func NewMetricsScopesService ¶
func NewMetricsScopesService(ctx context.Context, metricsScopeClient *metricsscope.MetricsScopesClient) (*MetricsScopesService, error)
func (*MetricsScopesService) CreateMonitoredProject ¶
func (s *MetricsScopesService) CreateMonitoredProject(ctx context.Context, scopingProject string, monitoredProject string) (*metricsscopepb.MonitoredProject, error)
CreateMonitoredProject is scopingProjectにmonitoringProjectのmetricsを追加する scopingProject, monitoringProjectはPROJECT_ID or PROJECT_NUMBERを指定する
func (*MetricsScopesService) DeleteMonitoredProject ¶
func (s *MetricsScopesService) DeleteMonitoredProject(ctx context.Context, scopingProject string, monitoredProject string) error
DeleteMonitoredProject is 指定したMonitoredProjectをScoping Projectのmetrics scopeから削除する scopingProject, monitoringProjectはPROJECT_ID or PROJECT_NUMBERを指定する
func (*MetricsScopesService) DeleteMonitoredProjectByMonitoredProjectName ¶
func (s *MetricsScopesService) DeleteMonitoredProjectByMonitoredProjectName(ctx context.Context, monitoredProjectName string) error
DeleteMonitoredProjectByMonitoredProjectName is 指定したMonitoredProjectを削除する
Example: `locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}`
func (*MetricsScopesService) GetMetricsScope ¶
func (s *MetricsScopesService) GetMetricsScope(ctx context.Context, project string) (*metricsscopepb.MetricsScope, error)
GetMetricsScope is 指定したScopingProjectのMetricsScopeを返す 指定するのはPROJECT_ID or PROJECT_NUMBER
func (*MetricsScopesService) ListMetricsScopesByMonitoredProject ¶
func (s *MetricsScopesService) ListMetricsScopesByMonitoredProject(ctx context.Context, project string) ([]*metricsscopepb.MetricsScope, error)
ListMetricsScopesByMonitoredProject is 指定したProjectのMetricsScopesを返す 指定するのはPROJECT_ID or PROJECT_NUMBER
type Service ¶
type Service struct { MetricsScopesService *MetricsScopesService ResourceManagerService *crmbox.ResourceManagerService }
func NewService ¶
func NewService(ctx context.Context, metricsScopesService *MetricsScopesService, resourceManagerService *crmbox.ResourceManagerService) (*Service, error)
func (*Service) ImportMonitoredProjects ¶
func (s *Service) ImportMonitoredProjects(ctx context.Context, scopingProject string, parentResourceID *crmbox.ResourceID) (int, error)
ImportMonitoredProjects is scopingProjectのMetricsScopeにparentResourceID配下のProjectを追加する