forms

package
v0.17.13 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidForm = errors.New("invalid form")
)

Functions

func ReadAndValidate

func ReadAndValidate(r *http.Request, f Form) error

Types

type ApplicationCategoryForm

type ApplicationCategoryForm struct {
	Name    model.ApplicationCategory `json:"name"`
	NewName model.ApplicationCategory `json:"new_name"`

	CustomPatternsStr string `json:"custom_patterns"`
	CustomPatterns    []string

	NotifyOfDeployments bool `json:"notify_of_deployments"`
}

func (*ApplicationCategoryForm) Valid

func (f *ApplicationCategoryForm) Valid() bool

type ApplicationSettingsPyroscopeForm

type ApplicationSettingsPyroscopeForm struct {
	db.ApplicationSettingsPyroscope
}

func (*ApplicationSettingsPyroscopeForm) Valid

type ApplicationSettingsTracingForm

type ApplicationSettingsTracingForm struct {
	db.ApplicationSettingsTracing
}

func (*ApplicationSettingsTracingForm) Valid

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

type CheckConfigSLOLatencyForm

type CheckConfigSLOLatencyForm struct {
	Configs []model.CheckConfigSLOLatency `json:"configs"`
	Default bool                          `json:"default"`
}

func (*CheckConfigSLOLatencyForm) Valid

func (f *CheckConfigSLOLatencyForm) Valid() bool

type Form

type Form interface {
	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) IntegrationForm

type IntegrationFormClickhouse

type IntegrationFormClickhouse struct {
	db.IntegrationClickhouse
}

func (*IntegrationFormClickhouse) Get

func (f *IntegrationFormClickhouse) Get(project *db.Project, masked bool)

func (*IntegrationFormClickhouse) Test

func (f *IntegrationFormClickhouse) Test(ctx context.Context, project *db.Project) error

func (*IntegrationFormClickhouse) Update

func (f *IntegrationFormClickhouse) Update(ctx context.Context, project *db.Project, clear bool) error

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) Test

func (f *IntegrationFormOpsgenie) Test(ctx context.Context, project *db.Project) error

func (*IntegrationFormOpsgenie) Update

func (f *IntegrationFormOpsgenie) Update(ctx context.Context, project *db.Project, clear bool) error

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) Test

func (f *IntegrationFormPagerduty) Test(ctx context.Context, project *db.Project) error

func (*IntegrationFormPagerduty) Update

func (f *IntegrationFormPagerduty) Update(ctx context.Context, project *db.Project, clear bool) error

func (*IntegrationFormPagerduty) Valid

func (f *IntegrationFormPagerduty) Valid() bool

type IntegrationFormPrometheus

type IntegrationFormPrometheus struct {
	db.IntegrationsPrometheus
}

func (*IntegrationFormPrometheus) Get

func (f *IntegrationFormPrometheus) Get(project *db.Project, masked bool)

func (*IntegrationFormPrometheus) Test

func (f *IntegrationFormPrometheus) Test(ctx context.Context, project *db.Project) error

func (*IntegrationFormPrometheus) Update

func (f *IntegrationFormPrometheus) Update(ctx context.Context, project *db.Project, clear bool) error

func (*IntegrationFormPrometheus) Valid

func (f *IntegrationFormPrometheus) Valid() bool

type IntegrationFormPyroscope

type IntegrationFormPyroscope struct {
	db.IntegrationPyroscope
}

func (*IntegrationFormPyroscope) Get

func (f *IntegrationFormPyroscope) Get(project *db.Project, masked bool)

func (*IntegrationFormPyroscope) Test

func (f *IntegrationFormPyroscope) Test(ctx context.Context, project *db.Project) error

func (*IntegrationFormPyroscope) Update

func (f *IntegrationFormPyroscope) Update(ctx context.Context, project *db.Project, clear bool) error

func (*IntegrationFormPyroscope) Valid

func (f *IntegrationFormPyroscope) Valid() bool

type IntegrationFormSlack

type IntegrationFormSlack struct {
	db.IntegrationSlack
}

func (*IntegrationFormSlack) Get

func (f *IntegrationFormSlack) Get(project *db.Project, masked bool)

func (*IntegrationFormSlack) Test

func (f *IntegrationFormSlack) Test(ctx context.Context, project *db.Project) error

func (*IntegrationFormSlack) Update

func (f *IntegrationFormSlack) Update(ctx context.Context, project *db.Project, clear bool) error

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) Test

func (f *IntegrationFormTeams) Test(ctx context.Context, project *db.Project) error

func (*IntegrationFormTeams) Update

func (f *IntegrationFormTeams) Update(ctx context.Context, project *db.Project, clear bool) error

func (*IntegrationFormTeams) Valid

func (f *IntegrationFormTeams) Valid() bool

type IntegrationsForm

type IntegrationsForm struct {
	BaseUrl string `json:"base_url"`
}

func (*IntegrationsForm) Valid

func (f *IntegrationsForm) Valid() bool

type ProjectForm

type ProjectForm struct {
	Name string `json:"name"`
}

func (*ProjectForm) Valid

func (f *ProjectForm) Valid() bool

type ProjectStatusForm

type ProjectStatusForm struct {
	Mute   *model.ApplicationType `json:"mute"`
	UnMute *model.ApplicationType `json:"unmute"`
}

func (*ProjectStatusForm) Valid

func (f *ProjectStatusForm) Valid() bool

Jump to

Keyboard shortcuts

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