Documentation
¶
Index ¶
- Variables
- func ReadAndValidate(r *http.Request, f Form) error
- type ApiKeyForm
- type ApplicationCategoryForm
- type ApplicationInstrumentationForm
- type ApplicationSettingsLogsForm
- type ApplicationSettingsProfilingForm
- type ApplicationSettingsRisksForm
- type ApplicationSettingsTracingForm
- type ChangePasswordForm
- type CheckConfigForm
- type CheckConfigSLOAvailabilityForm
- type CheckConfigSLOLatencyForm
- type CustomApplicationForm
- type CustomCloudPricingForm
- type DashboardForm
- type Form
- type IntegrationForm
- type IntegrationFormAWS
- type IntegrationFormClickhouse
- func (f *IntegrationFormClickhouse) Get(project *db.Project, masked bool)
- func (f *IntegrationFormClickhouse) Test(ctx context.Context, project *db.Project) error
- func (f *IntegrationFormClickhouse) Update(ctx context.Context, project *db.Project, clear bool) error
- func (f *IntegrationFormClickhouse) Valid() bool
- type IntegrationFormOpsgenie
- func (f *IntegrationFormOpsgenie) Get(project *db.Project, masked bool)
- func (f *IntegrationFormOpsgenie) Test(ctx context.Context, project *db.Project) error
- func (f *IntegrationFormOpsgenie) Update(ctx context.Context, project *db.Project, clear bool) error
- func (f *IntegrationFormOpsgenie) Valid() bool
- type IntegrationFormPagerduty
- func (f *IntegrationFormPagerduty) Get(project *db.Project, masked bool)
- func (f *IntegrationFormPagerduty) Test(ctx context.Context, project *db.Project) error
- func (f *IntegrationFormPagerduty) Update(ctx context.Context, project *db.Project, clear bool) error
- func (f *IntegrationFormPagerduty) Valid() bool
- type IntegrationFormPrometheus
- func (f *IntegrationFormPrometheus) Get(project *db.Project, masked bool)
- func (f *IntegrationFormPrometheus) Test(ctx context.Context, project *db.Project) error
- func (f *IntegrationFormPrometheus) Update(ctx context.Context, project *db.Project, clear bool) error
- func (f *IntegrationFormPrometheus) Valid() bool
- type IntegrationFormSlack
- type IntegrationFormTeams
- type IntegrationFormWebhook
- func (f *IntegrationFormWebhook) Get(project *db.Project, masked bool)
- func (f *IntegrationFormWebhook) Test(ctx context.Context, project *db.Project) error
- func (f *IntegrationFormWebhook) Update(ctx context.Context, project *db.Project, clear bool) error
- func (f *IntegrationFormWebhook) Valid() bool
- type IntegrationsForm
- type LoginForm
- type ProjectForm
- type UserAction
- type UserForm
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidForm = errors.New("invalid form")
)
Functions ¶
Types ¶
type ApiKeyForm ¶ added in v1.7.0
func (*ApiKeyForm) Valid ¶ added in v1.7.0
func (f *ApiKeyForm) Valid() bool
type ApplicationCategoryForm ¶
type ApplicationCategoryForm struct {
Action string `json:"action"`
Id model.ApplicationCategory `json:"id"`
db.ApplicationCategory
Test *struct {
Incident *db.ApplicationCategoryNotificationDestinations `json:"incident,omitempty"`
Deployment *db.ApplicationCategoryNotificationDestinations `json:"deployment,omitempty"`
} `json:"test,omitempty"`
}
func (*ApplicationCategoryForm) SendTestNotification ¶ added in v1.10.0
func (*ApplicationCategoryForm) Valid ¶
func (f *ApplicationCategoryForm) Valid() bool
type ApplicationInstrumentationForm ¶ added in v1.3.0
type ApplicationInstrumentationForm struct {
model.ApplicationInstrumentation
}
func (*ApplicationInstrumentationForm) Valid ¶ added in v1.3.0
func (f *ApplicationInstrumentationForm) Valid() bool
type ApplicationSettingsLogsForm ¶ added in v0.20.0
type ApplicationSettingsLogsForm struct {
model.ApplicationSettingsLogs
}
func (*ApplicationSettingsLogsForm) Valid ¶ added in v0.20.0
func (f *ApplicationSettingsLogsForm) Valid() bool
type ApplicationSettingsProfilingForm ¶ added in v0.27.0
type ApplicationSettingsProfilingForm struct {
model.ApplicationSettingsProfiling
}
func (*ApplicationSettingsProfilingForm) Valid ¶ added in v0.27.0
func (f *ApplicationSettingsProfilingForm) Valid() bool
type ApplicationSettingsRisksForm ¶ added in v1.8.0
type ApplicationSettingsRisksForm struct {
Action string `json:"action"`
Key model.RiskKey `json:"key"`
Reason string `json:"reason"`
}
func (*ApplicationSettingsRisksForm) Valid ¶ added in v1.8.0
func (f *ApplicationSettingsRisksForm) Valid() bool
type ApplicationSettingsTracingForm ¶
type ApplicationSettingsTracingForm struct {
model.ApplicationSettingsTracing
}
func (*ApplicationSettingsTracingForm) Valid ¶
func (f *ApplicationSettingsTracingForm) Valid() bool
type ChangePasswordForm ¶ added in v1.5.0
type ChangePasswordForm struct {
OldPassword string `json:"old_password"`
NewPassword string `json:"new_password"`
}
func (*ChangePasswordForm) Valid ¶ added in v1.5.0
func (f *ChangePasswordForm) Valid() bool
type CheckConfigForm ¶
type CheckConfigForm struct {
Configs []*model.CheckConfigSimple `json:"configs"`
}
func (*CheckConfigForm) Valid ¶
func (f *CheckConfigForm) Valid() bool
type CheckConfigSLOAvailabilityForm ¶
type CheckConfigSLOAvailabilityForm struct {
Configs []model.CheckConfigSLOAvailability `json:"configs"`
Default bool `json:"default"`
}
func (*CheckConfigSLOAvailabilityForm) Valid ¶
func (f *CheckConfigSLOAvailabilityForm) Valid() bool
type CheckConfigSLOLatencyForm ¶
type CheckConfigSLOLatencyForm struct {
Configs []model.CheckConfigSLOLatency `json:"configs"`
Default bool `json:"default"`
}
func (*CheckConfigSLOLatencyForm) Valid ¶
func (f *CheckConfigSLOLatencyForm) Valid() bool
type CustomApplicationForm ¶ added in v1.4.0
type CustomApplicationForm struct {
Name string `json:"name"`
NewName string `json:"new_name"`
InstancePatternsStr string `json:"instance_patterns"`
InstancePatterns []string
}
func (*CustomApplicationForm) Valid ¶ added in v1.4.0
func (f *CustomApplicationForm) Valid() bool
type CustomCloudPricingForm ¶ added in v1.11.0
type CustomCloudPricingForm struct {
db.CustomCloudPricing
}
func (*CustomCloudPricingForm) Valid ¶ added in v1.11.0
func (f *CustomCloudPricingForm) Valid() bool
type DashboardForm ¶ added in v1.12.0
func (*DashboardForm) Valid ¶ added in v1.12.0
func (f *DashboardForm) Valid() bool
type IntegrationForm ¶
type IntegrationForm interface {
Form
Get(project *db.Project, masked bool)
Update(ctx context.Context, project *db.Project, clear bool) error
Test(ctx context.Context, project *db.Project) error
}
func NewIntegrationForm ¶
func NewIntegrationForm(t db.IntegrationType, globalClickHouse *db.IntegrationClickhouse, globalPrometheus *db.IntegrationPrometheus) IntegrationForm
type IntegrationFormAWS ¶ added in v1.3.0
type IntegrationFormAWS struct {
db.IntegrationAWS
}
func (*IntegrationFormAWS) Get ¶ added in v1.3.0
func (f *IntegrationFormAWS) Get(project *db.Project, masked bool)
func (*IntegrationFormAWS) Valid ¶ added in v1.3.0
func (f *IntegrationFormAWS) Valid() bool
type IntegrationFormClickhouse ¶
type IntegrationFormClickhouse struct {
db.IntegrationClickhouse
// contains filtered or unexported fields
}
func (*IntegrationFormClickhouse) Get ¶
func (f *IntegrationFormClickhouse) Get(project *db.Project, masked bool)
func (*IntegrationFormClickhouse) Valid ¶
func (f *IntegrationFormClickhouse) Valid() bool
type IntegrationFormOpsgenie ¶
type IntegrationFormOpsgenie struct {
db.IntegrationOpsgenie
}
func (*IntegrationFormOpsgenie) Get ¶
func (f *IntegrationFormOpsgenie) Get(project *db.Project, masked bool)
func (*IntegrationFormOpsgenie) Valid ¶
func (f *IntegrationFormOpsgenie) Valid() bool
type IntegrationFormPagerduty ¶
type IntegrationFormPagerduty struct {
db.IntegrationPagerduty
}
func (*IntegrationFormPagerduty) Get ¶
func (f *IntegrationFormPagerduty) Get(project *db.Project, masked bool)
func (*IntegrationFormPagerduty) Valid ¶
func (f *IntegrationFormPagerduty) Valid() bool
type IntegrationFormPrometheus ¶
type IntegrationFormPrometheus struct {
db.IntegrationPrometheus
// contains filtered or unexported fields
}
func (*IntegrationFormPrometheus) Get ¶
func (f *IntegrationFormPrometheus) Get(project *db.Project, masked bool)
func (*IntegrationFormPrometheus) Valid ¶
func (f *IntegrationFormPrometheus) Valid() bool
type IntegrationFormSlack ¶
type IntegrationFormSlack struct {
db.IntegrationSlack
}
func (*IntegrationFormSlack) Get ¶
func (f *IntegrationFormSlack) Get(project *db.Project, masked bool)
func (*IntegrationFormSlack) Valid ¶
func (f *IntegrationFormSlack) Valid() bool
type IntegrationFormTeams ¶
type IntegrationFormTeams struct {
db.IntegrationTeams
}
func (*IntegrationFormTeams) Get ¶
func (f *IntegrationFormTeams) Get(project *db.Project, masked bool)
func (*IntegrationFormTeams) Valid ¶
func (f *IntegrationFormTeams) Valid() bool
type IntegrationFormWebhook ¶ added in v1.0.0
type IntegrationFormWebhook struct {
db.IntegrationWebhook
}
func (*IntegrationFormWebhook) Get ¶ added in v1.0.0
func (f *IntegrationFormWebhook) Get(project *db.Project, masked bool)
func (*IntegrationFormWebhook) Valid ¶ added in v1.0.0
func (f *IntegrationFormWebhook) Valid() bool
type IntegrationsForm ¶
type IntegrationsForm struct {
BaseUrl string `json:"base_url"`
}
func (*IntegrationsForm) Valid ¶
func (f *IntegrationsForm) Valid() bool
type LoginForm ¶ added in v1.5.0
type ProjectForm ¶
type ProjectForm struct {
Name string `json:"name"`
MemberProjects []string `json:"member_projects"`
}
func (*ProjectForm) Valid ¶
func (f *ProjectForm) Valid() bool
type UserAction ¶ added in v1.5.0
type UserAction string
const ( UserActionCreate UserAction = "create" UserActionUpdate UserAction = "update" UserActionDelete UserAction = "delete" )
Click to show internal directories.
Click to hide internal directories.