pg

package
v0.0.0-...-51fd5d7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidOrderByColumn = errors.New("invalid OrderBy column")
	ErrInvalidOrderByFn     = errors.New("invalid OrderBy function")
	ErrInvalidFilterValue   = errors.New("invalid filter value")
)
View Source
var AlarmCategoriesValidOrderByColumns = []string{"descr", "name", "level"}
View Source
var AlarmEndpointValidOrderByColumn = []string{"name, url"}
View Source
var AlarmExpressionsValidOrderByColumns = []string{"name", "expression", "category_id"}
View Source
var AlarmProfileEmailValidOrderByColumns = []string{"email", "name", "descr"}
View Source
var AlarmProfileValidOrderByColumns = []string{"descr", "name"}
View Source
var AlarmProfileWppPhoneValidOrderByColumns = []string{"phone", "name", "descr"}
View Source
var AlarmStreakValidOrderByColumns = []string{"name", "streak", "descr"}
View Source
var BaseContainerValidOrderByColumns = []string{"name", "descr"}
View Source
var BasicMetricValidOrderByColumns = []string{"name", "descr"}
View Source
var CustomQueryValidOrderByColumns = []string{"descr", "name"}
View Source
var DashboardsAllowsOrderByCollumns = []string{"name", "template", "descr"}
View Source
var DashboardsGroupsAllowsOrderByCollumns = []string{"name", "descr"}
View Source
var FlexLegacyContainerValidOrderByColumns = []string{"name", "descr", "created_at", "target", "serial_number", "model", "city", "region", "country"}
View Source
var FlexLegacyMetricValidOrderByColumns = []string{"name", "descr", "port", "port_type"}
View Source
var HttpActionValidOrderByColumns = []string{"name", "descr", "url"}
View Source
var PingContainerValidOrderByColumns = []string{"name", "descr", "created_at", "target"}
View Source
var PingMetricValidOrderByColumns = []string{"name", "descr"}
View Source
var ReverseProxyHTTPPathValidOrderByColumns = []string{"name", "descr", "path", "url"}
View Source
var ReverseProxyHTTPValidOrderByColumns = []string{"name", "descr", "host", "port"}
View Source
var ReverseProxyRTSPValidOrderByColumns = []string{"name", "descr", "path", "url"}
View Source
var SNMPv2cActionValidOrderByColumns = []string{"name", "descr", "oid"}
View Source
var SNMPv2cContainerValidOrderByColumns = []string{"name", "descr", "created_at", "target"}
View Source
var SNMPv2cMetricValidOrderByColumns = []string{"name", "descr"}
View Source
var TeamValidOrderByColumns = []string{"descr", "name"}
View Source
var UserValidOrderByColumns = []string{"first_name", "last_name", "username", "role", "email", "last_activity"}

Functions

func IsFilterError

func IsFilterError(err error) bool

Types

type ActionBlockedTeamsFilters

type ActionBlockedTeamsFilters struct {
	ActionId int32  `type:"=" column:"action_id"`
	Name     string `type:"ilike" column:"name"`
	Descr    string `type:"ilike" column:"descr"`
}

type ActionBlockedUsersFilters

type ActionBlockedUsersFilters struct {
	ActionId  int32      `type:"=" column:"action_id"`
	FirstName string     `type:"ilike" column:"first_name"`
	LastName  string     `type:"ilike" column:"last_name"`
	Username  string     `type:"ilike" column:"username"`
	Role      roles.Role `type:"=" column:"role"`
	Email     string     `type:"ilike" column:"email"`
}

type AlarmCategoriesQueryFilters

type AlarmCategoriesQueryFilters struct {
	Name  string `type:"ilike" column:"name"`
	Descr string `type:"ilike" column:"descr"`
	Level int32  `type:"=" column:"level"`
}

type AlarmEndpointQueryFilters

type AlarmEndpointQueryFilters struct {
	AlarmProfileId int32  `type:"=" column:"alarm_profile_id"`
	Name           string `type:"ilike" column:"name"`
	URL            string `type:"ilike" column:"url"`
}

type AlarmEndpointRelationExistsRes

type AlarmEndpointRelationExistsRes struct {
	RelationExists      bool
	AlarmProfileExists  bool
	AlarmEndpointExists bool
}

type AlarmExpressionExistsMetricAndRelationResponse

type AlarmExpressionExistsMetricAndRelationResponse struct {
	// Exists is the alarm expression existence.
	Exists bool
	// MetricExists is the metric existence.
	MetricExists bool
	// RelationExists is the relation existence.
	RelationExists bool
}

type AlarmExpressionQueryFilters

type AlarmExpressionQueryFilters struct {
	Name       string `type:"ilike" column:"name"`
	Expression string `type:"ilike" column:"expression"`
	CategoryId int32  `type:"=" column:"level"`
}

type AlarmProfileEmailQueryFilters

type AlarmProfileEmailQueryFilters struct {
	AlarmProfileId int32  `type:"=" column:"alarm_profile_id"`
	Email          string `type:"ilike" column:"email"`
	Name           string `type:"ilike" column:"name"`
	Descr          string `type:"ilike" column:"descr"`
}

type AlarmProfileExistsCategoryAndRelationResponse

type AlarmProfileExistsCategoryAndRelationResponse struct {
	// Exists is the alarm profile existence.
	Exists bool
	// CategoryExists is the category existence.
	CategoryExists bool
	// RelationExists is the relation existence.
	RelationExists bool
}

type AlarmProfileQueryFilters

type AlarmProfileQueryFilters struct {
	Name  string `type:"ilike" column:"name"`
	Descr string `type:"ilike" column:"descr"`
}

type AlarmProfileWppPhonesQueryFilters

type AlarmProfileWppPhonesQueryFilters struct {
	AlarmProfileId int32  `type:"=" column:"alarm_profile_id"`
	Phone          int64  `type:"=" column:"phone"`
	Name           string `type:"ilike" column:"name"`
	Descr          string `type:"ilike" column:"descr"`
}

type AlarmStreakQueryFilters

type AlarmStreakQueryFilters struct {
	Name       string `type:"ilike" column:"name"`
	Descr      string `type:"ilike" column:"descr"`
	Streak     int32  `type:"=" column:"streak"`
	MetricId   int64  `type:"=" column:"metric_id"`
	CategoryId int32  `type:"=" column:"category_id"`
}

type BaseContainerEnabledResponse

type BaseContainerEnabledResponse struct {
	// Exists is the existence of the base container.
	Exists bool
	// Enabled is the container enabled status.
	Enabled bool
}

type BaseContainerGetRTSConfigResponse

type BaseContainerGetRTSConfigResponse struct {
	// Exists is the existence of the base container.
	Exists bool
	// Config is the container RTS config.
	Config models.RTSContainerConfig
}

type BaseContainerQueryFilters

type BaseContainerQueryFilters struct {
	Type           containertype.ContainerType `type:"=" column:"type"`
	Name           string                      `type:"ilike" column:"name"`
	Descr          string                      `type:"ilike" column:"descr"`
	CreatedAtStart int64                       `type:">=" column:"created_at"`
	CreatedAtStop  int64                       `type:"<=" column:"created_at"`
	Enabled        *bool                       `type:"=" column:"enabled"`
}

type BasicMetricQueryFilters

type BasicMetricQueryFilters struct {
	ContainerType container.ContainerType `type:"=" column:"container_type"`
	ContainerId   int32                   `type:"=" column:"container_id"`
	Name          string                  `type:"ilike" column:"name"`
	Descr         string                  `type:"ilike" column:"descr"`
	Enabled       *bool                   `type:"=" column:"enabled"`
	DataPolicyId  int16                   `type:"=" column:"data_policy_id"`
}

type CustomQueryQueryFilters

type CustomQueryQueryFilters struct {
	Name  string `type:"ilike" column:"name"`
	Descr string `type:"ilike" column:"descr"`
}

type DashboardsGroupsQueryFilters

type DashboardsGroupsQueryFilters struct {
	Name   string `type:"ilike" column:"name"`
	Descr  string `type:"ilike" column:"descr"`
	UserId int32  `type:"=" column:"user_id"`
}

type DashboardsQueryFilters

type DashboardsQueryFilters struct {
	Name     string `type:"ilike" column:"name"`
	Descr    string `type:"ilike" column:"descr"`
	Template *bool  `type:"=" column:"template"`
}

type DashboardsTeamsQueryFilters

type DashboardsTeamsQueryFilters struct {
	DashboardId int32  `type:"=" column:"dashboard_id"`
	Name        string `type:"ilike" column:"name"`
	Descr       string `type:"ilike" column:"descr"`
	Template    *bool  `type:"=" column:"template"`
}

type FlexLegacyContainerExistsContainerTargetAndSerialNumberRespose

type FlexLegacyContainerExistsContainerTargetAndSerialNumberRespose struct {
	// ContainerExists is the container existence.
	ContainerExists bool
	// TargetExists is the target existence.
	TargetExists bool
	// SerialNumberExists is the serial-number existence.
	SerialNumberExists bool
}

type FlexLegacyContainerQueryFilters

type FlexLegacyContainerQueryFilters struct {
	Type           containertype.ContainerType `type:"=" column:"type"`
	Name           string                      `type:"ilike" column:"name"`
	Descr          string                      `type:"ilike" column:"descr"`
	CreatedAtStart int64                       `type:">=" column:"created_at"`
	CreatedAtStop  int64                       `type:"<=" column:"created_at"`
	Enabled        *bool                       `type:"=" column:"enabled"`
	Target         string                      `type:"ilike" column:"target"`
	SerialNumber   string                      `type:"=" column:"serial_number"`
	Model          int16                       `type:"=" column:"model"`
	City           string                      `type:"ilike" column:"city"`
	Region         string                      `type:"ilike" column:"region"`
	Country        string                      `type:"ilike" column:"country"`
}

type FlexLegacyMetricQueryFilters

type FlexLegacyMetricQueryFilters struct {
	ContainerType container.ContainerType `type:"=" column:"container_type"`
	ContainerId   int32                   `type:"=" column:"container_id"`
	DataPolicyId  int16                   `type:"=" column:"data_policy_id"`
	Name          string                  `type:"ilike" column:"name"`
	Descr         string                  `type:"ilike" column:"descr"`
	Enabled       *bool                   `type:"=" column:"enabled"`
	Port          int16                   `type:"=" column:"port"`
	PortType      int16                   `type:"=" column:"port_type"`
}

type GetMetricRequestAndIntervalResult

type GetMetricRequestAndIntervalResult struct {
	// MetricRequest is the metric request.
	MetricRequest models.MetricRequest
	// Interval is the interval in seconds
	Interval int32
}

type GetMetricRequestResult

type GetMetricRequestResult struct {
	// Exists is the metric request existence.
	Exists bool
	// MetricRequest is the metric request.
	MetricRequest models.MetricRequest
	// Enabled is the metric enabled status.
	Enabled bool
}

type HttpActionFilters

type HttpActionFilters struct {
	Name  string `type:"ilike" column:"name"`
	Descr string `type:"ilike" column:"descr"`
	URL   string `type:"ilike" column:"url"`
}

type MemberQueryFilters

type MemberQueryFilters struct {
	TeamId    int32      `type:"=" column:"team_id"`
	FirstName string     `type:"ilike" column:"first_name"`
	LastName  string     `type:"ilike" column:"last_name"`
	Username  string     `type:"ilike" column:"username"`
	Role      roles.Role `type:"=" column:"role"`
	Email     string     `type:"ilike" column:"email"`
}

type MetricsEnabledResponse

type MetricsEnabledResponse struct {
	// Exists is the metric existence.
	Exists bool
	// ContainerExists is the container existence.
	ContainerExists bool
	// Enabled is the metric's enabled status.
	Enabled bool
	// ContainerEnabled is the container's enabled status.
	ContainerEnabled bool
}

type MetricsExistsContainerAndDataPolicyResponse

type MetricsExistsContainerAndDataPolicyResponse struct {
	// Exists is the metric existence.
	Exists bool
	// ContainerExists is the container existence.
	ContainerExists bool
	// DataPolicyExists is the data policy existence.
	DataPolicyExists bool
}

type PG

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

func New

func New() *PG

func (*PG) ActionBlockExists

func (pg *PG) ActionBlockExists(ctx context.Context, actionId int32, userId int32) (userBlock bool, teamBlock bool, err error)

func (*PG) ActionBlockTeam

func (pg *PG) ActionBlockTeam(ctx context.Context, actionId int32, teamId int32) (err error)

func (*PG) ActionBlockUser

func (pg *PG) ActionBlockUser(ctx context.Context, actionId int32, userId int32) (err error)

func (*PG) ActionGetBlockedTeams

func (pg *PG) ActionGetBlockedTeams(ctx context.Context, filters QueryFilters[ActionBlockedTeamsFilters]) (teams []models.Team, err error)

func (*PG) ActionGetBlockedUsers

func (pg *PG) ActionGetBlockedUsers(ctx context.Context, filters QueryFilters[ActionBlockedUsersFilters]) (users []models.User, err error)

func (*PG) ActionRemoveTeamFromBlock

func (pg *PG) ActionRemoveTeamFromBlock(ctx context.Context, actionId int32, teamId int32) (exists bool, err error)

func (*PG) ActionRemoveUserFromBlock

func (pg *PG) ActionRemoveUserFromBlock(ctx context.Context, actionId int32, userId int32) (exists bool, err error)

func (*PG) ActionTeamBlockedExists

func (pg *PG) ActionTeamBlockedExists(ctx context.Context, actionId int32, teamId int32) (actionExists bool, teamExists bool, exists bool, err error)

func (*PG) ActionUserBlockedExists

func (pg *PG) ActionUserBlockedExists(ctx context.Context, actionId int32, userId int32) (actionExists bool, userExists bool, exists bool, err error)

func (*PG) AddActionToDashboard

func (pg *PG) AddActionToDashboard(ctx context.Context, dashboardId int32, actionId int64) (err error)

func (*PG) AddCategoryToAlarmProfile

func (pg *PG) AddCategoryToAlarmProfile(ctx context.Context, profileId int32, categoryId int32) (err error)

func (*PG) AddDashboardToGroup

func (pg *PG) AddDashboardToGroup(ctx context.Context, groupId int32, dashboardId int32) (err error)

func (*PG) AddMemberOnRootTeam

func (pg *PG) AddMemberOnRootTeam(ctx context.Context, userId int32, tx *sql.Tx) (err error)

func (*PG) AddMetricToDashboard

func (pg *PG) AddMetricToDashboard(ctx context.Context, dashboardId int32, metric int64) (err error)

func (*PG) AddRootTeamToDashboardTX

func (pg *PG) AddRootTeamToDashboardTX(ctx context.Context, tx *sql.Tx, dashboardId int32) (err error)

func (*PG) AddTeamMember

func (pg *PG) AddTeamMember(ctx context.Context, userId int32, teamId int32) error

func (*PG) AddTeamToDashboard

func (pg *PG) AddTeamToDashboard(ctx context.Context, dashboardId int32, teamId int32) (err error)

func (*PG) AddUserToCounterWhitelist

func (pg *PG) AddUserToCounterWhitelist(ctx context.Context, userId int32) (err error)

func (*PG) AlarmCategoryExists

func (pg *PG) AlarmCategoryExists(ctx context.Context, id int32) (exists bool, err error)

func (*PG) AlarmEndpointRelationExists

func (pg *PG) AlarmEndpointRelationExists(ctx context.Context, alarmProfileId int32, alarmEndpointId int32) (r AlarmEndpointRelationExistsRes, err error)

func (*PG) AlarmProfileEmailExists

func (pg *PG) AlarmProfileEmailExists(ctx context.Context, profileId int32, id int32, email string) (profileExists bool, emailExists bool, err error)

func (*PG) AlarmProfileExists

func (pg *PG) AlarmProfileExists(ctx context.Context, id int32) (exists bool, err error)

func (*PG) AlarmProfileWppPhoneExists

func (pg *PG) AlarmProfileWppPhoneExists(ctx context.Context, profileId int32, id int32, phone int64) (profileExists bool, phoneExists bool, err error)

func (*PG) AlarmStreakAndMetricIdExists

func (pg *PG) AlarmStreakAndMetricIdExists(ctx context.Context, streak int32, metricId int64, id int32) (exists bool, err error)

func (*PG) AvailableSNMPv2cContainerTargetPort

func (pg *PG) AvailableSNMPv2cContainerTargetPort(ctx context.Context, target string, port int32, id int32) (exists bool, err error)

func (*PG) CategoryAndAlarmProfileRelationExists

func (pg *PG) CategoryAndAlarmProfileRelationExists(ctx context.Context, profileId int32, categoryId int32) (r AlarmProfileExistsCategoryAndRelationResponse, err error)

func (*PG) CategoryLevelExists

func (pg *PG) CategoryLevelExists(ctx context.Context, level int32, id int32) (exists bool, err error)

func (*PG) Close

func (pg *PG) Close()

func (*PG) ContainerEnabled

func (pg *PG) ContainerEnabled(ctx context.Context, id int32) (exists bool, enabled bool, err error)

func (*PG) ContainerExist

func (pg *PG) ContainerExist(ctx context.Context, id int32) (exists bool, err error)

func (*PG) CounMetricsByIds

func (pg *PG) CounMetricsByIds(ctx context.Context, ids []int64) (count int64, err error)

func (*PG) CountActions

func (pg *PG) CountActions(ctx context.Context, ids []int64) (count int64, err error)

func (*PG) CountDataPolicy

func (pg *PG) CountDataPolicy(ctx context.Context) (n int64, err error)

func (*PG) CountFlexLegacyContainers

func (pg *PG) CountFlexLegacyContainers(ctx context.Context) (n int, err error)

func (*PG) CountNonFlexMetrics

func (pg *PG) CountNonFlexMetrics(ctx context.Context) (n int, err error)

func (*PG) CountPingContainers

func (pg *PG) CountPingContainers(ctx context.Context) (count int, err error)

func (*PG) CountServerElements

func (pg *PG) CountServerElements(ctx context.Context) (e models.ServerElements, err error)

func (*PG) CountTeamsWithLimit

func (pg *PG) CountTeamsWithLimit(ctx context.Context, limit int) (n int32, err error)

func (*PG) CountUsersWithLimit

func (pg *PG) CountUsersWithLimit(ctx context.Context, limit int) (users int, err error)

func (*PG) CrateMetricAlarmExpressionRel

func (pg *PG) CrateMetricAlarmExpressionRel(ctx context.Context, expressionId int32, metricId int64) (err error)

func (*PG) CreateAPIKey

func (pg *PG) CreateAPIKey(ctx context.Context, apikey models.APIKeyInfo) (id int32, tx *sql.Tx, err error)

func (*PG) CreateAlarmCategory

func (pg *PG) CreateAlarmCategory(ctx context.Context, category models.AlarmCategory) (id int32, err error)

func (*PG) CreateAlarmEndpoint

func (pg *PG) CreateAlarmEndpoint(ctx context.Context, endpoint models.AlarmEndpoint) (id int32, err error)

func (*PG) CreateAlarmEndpointRelation

func (pg *PG) CreateAlarmEndpointRelation(ctx context.Context, alarmProfileId int32, alarmEndpointId int32) (err error)

func (*PG) CreateAlarmExpression

func (pg *PG) CreateAlarmExpression(ctx context.Context, exp models.AlarmExpression) (id int32, err error)

func (*PG) CreateAlarmProfile

func (pg *PG) CreateAlarmProfile(ctx context.Context, profile models.AlarmProfile) (id int64, err error)

func (*PG) CreateAlarmProfileEmail

func (pg *PG) CreateAlarmProfileEmail(ctx context.Context, profileId int32, emailProfile models.AlarmProfileEmail) (id int32, err error)

func (*PG) CreateAlarmProfileWppPhone

func (pg *PG) CreateAlarmProfileWppPhone(ctx context.Context, alarmProfileId int32, wpp models.AlarmProfileWppPhone) (id int32, err error)

func (*PG) CreateAlarmState

func (pg *PG) CreateAlarmState(ctx context.Context, state models.AlarmState) (err error)

func (*PG) CreateAlarmStreak

func (pg *PG) CreateAlarmStreak(ctx context.Context, streak models.AlarmStreak) (id int32, err error)

func (*PG) CreateBasicContainer

func (pg *PG) CreateBasicContainer(ctx context.Context, container models.Container[struct{}]) (id int32, err error)

func (*PG) CreateBasicMetric

func (pg *PG) CreateBasicMetric(ctx context.Context, metric models.Metric[struct{}]) (id int64, err error)

func (*PG) CreateCustomQuery

func (pg *PG) CreateCustomQuery(ctx context.Context, cq models.CustomQuery) (id int32, err error)

func (*PG) CreateDashboard

func (pg *PG) CreateDashboard(ctx context.Context, dashboard models.Dashboard) (tx *sql.Tx, id int32, err error)

func (*PG) CreateDashboardGroup

func (pg *PG) CreateDashboardGroup(ctx context.Context, group models.DashboardGroup) (id int32, err error)

func (*PG) CreateDataPolicy

func (pg *PG) CreateDataPolicy(ctx context.Context, dp models.DataPolicy) (tx *sql.Tx, id int16, err error)

func (*PG) CreateFlexLegacyContainer

func (pg *PG) CreateFlexLegacyContainer(ctx context.Context, container models.Container[models.FlexLegacyContainer]) (id int32, err error)

func (*PG) CreateFlexLegacyDatalogDownloadRegistry

func (pg *PG) CreateFlexLegacyDatalogDownloadRegistry(ctx context.Context, r models.FlexLegacyDatalogDownloadRegistry) (err error)

func (*PG) CreateFlexLegacyMetric

func (pg *PG) CreateFlexLegacyMetric(ctx context.Context, metric models.Metric[models.FlexLegacyMetric]) (id int64, err error)

func (*PG) CreateHttpAction

func (pg *PG) CreateHttpAction(ctx context.Context, action models.Action[models.HttpAction]) (id int32, err error)

func (*PG) CreateMetricRefkey

func (pg *PG) CreateMetricRefkey(ctx context.Context, rk models.MetricRefkey) (id int64, err error)

func (*PG) CreatePingContainer

func (pg *PG) CreatePingContainer(ctx context.Context, container models.Container[models.PingContainer]) (id int32, err error)

func (*PG) CreatePingMetric

func (pg *PG) CreatePingMetric(ctx context.Context, metric models.Metric[models.PingMetric]) (id int64, err error)

func (*PG) CreateReverseProxyHTTP

func (pg *PG) CreateReverseProxyHTTP(ctx context.Context, proxy models.ReverseProxyHTTP) (id int32, err error)

func (*PG) CreateReverseProxyHTTPPath

func (pg *PG) CreateReverseProxyHTTPPath(ctx context.Context, path models.ReverseProxyHTTPPath) (id int32, err error)

func (*PG) CreateReverseProxyRTSP

func (pg *PG) CreateReverseProxyRTSP(ctx context.Context, proxy models.ReverseProxyRTSP) (id int32, err error)

func (*PG) CreateSNMPv2cAction

func (pg *PG) CreateSNMPv2cAction(ctx context.Context, action models.Action[models.SNMPv2cAction]) (id int32, err error)

func (*PG) CreateSNMPv2cContainer

func (pg *PG) CreateSNMPv2cContainer(ctx context.Context, container models.Container[models.SNMPv2cContainer]) (id int32, err error)

func (*PG) CreateSNMPv2cMetric

func (pg *PG) CreateSNMPv2cMetric(ctx context.Context, m models.Metric[models.SNMPMetric]) (id int64, err error)

func (*PG) CreateTeam

func (pg *PG) CreateTeam(ctx context.Context, team models.Team) (id int32, err error)

func (*PG) CreateTrapCategoryRelation

func (pg *PG) CreateTrapCategoryRelation(ctx context.Context, rel models.TrapCategoryRelation) (err error)

func (*PG) CreateTrapListener

func (pg *PG) CreateTrapListener(ctx context.Context, tl models.TrapListener) (id int32, err error)

func (*PG) CreateUserTx

func (pg *PG) CreateUserTx(ctx context.Context, user models.User) (tx *sql.Tx, id int32, err error)

func (*PG) DasboardActionExists

func (pg *PG) DasboardActionExists(ctx context.Context, dashboardId int32, actionId int32) (exists bool, err error)

func (*PG) DasboardActionsExists

func (pg *PG) DasboardActionsExists(ctx context.Context, dashboardId int32, actionsIds []int64) (ids []int64, err error)

func (*PG) DasboardMetricExists

func (pg *PG) DasboardMetricExists(ctx context.Context, dashboardId int32, metricId int64) (exists bool, err error)

func (*PG) DasboardMetricsExists

func (pg *PG) DasboardMetricsExists(ctx context.Context, dashboardId int32, metricsIds []int64) (ids []int64, err error)

func (*PG) DashboardAddFavorite

func (pg *PG) DashboardAddFavorite(ctx context.Context, dashboardId int32, userId int32) (err error)

func (*PG) DashboardExists

func (pg *PG) DashboardExists(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DashboardGroupRelExists

func (pg *PG) DashboardGroupRelExists(ctx context.Context, groupId int32, dashboardId int32) (groupExists bool, dashboardExists bool, relExists bool, err error)

func (*PG) DashboardIsFavorite

func (pg *PG) DashboardIsFavorite(ctx context.Context, dashboardId int32, userId int32) (exists bool, err error)

func (*PG) DashboardRemoveFavorite

func (pg *PG) DashboardRemoveFavorite(ctx context.Context, dashboardId int32, userId int32) (exists bool, err error)

func (*PG) DashboardTeamPermissionExists

func (pg *PG) DashboardTeamPermissionExists(ctx context.Context, dashboardId int32, teamId int32) (teamExists bool, dashboardExists bool, exists bool, err error)

func (*PG) DataPolicyExists

func (pg *PG) DataPolicyExists(ctx context.Context, id int16) (exists bool, err error)

func (*PG) DeleteAPIKey

func (pg *PG) DeleteAPIKey(ctx context.Context, id int16, userId int32) (exists bool, tx *sql.Tx, err error)

func (*PG) DeleteAPIKeys

func (pg *PG) DeleteAPIKeys(ctx context.Context, ids []int16) (err error)

func (*PG) DeleteAction

func (pg *PG) DeleteAction(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteAlarmCategory

func (pg *PG) DeleteAlarmCategory(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteAlarmEndpoint

func (pg *PG) DeleteAlarmEndpoint(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteAlarmEndpointRelation

func (pg *PG) DeleteAlarmEndpointRelation(ctx context.Context, alarmProfileId int32, alarmEndpointId int32) (exists bool, err error)

func (*PG) DeleteAlarmExpression

func (pg *PG) DeleteAlarmExpression(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteAlarmProfile

func (pg *PG) DeleteAlarmProfile(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteAlarmProfileEmail

func (pg *PG) DeleteAlarmProfileEmail(ctx context.Context, emailId int32) (exists bool, err error)

func (*PG) DeleteAlarmProfileWppPhone

func (pg *PG) DeleteAlarmProfileWppPhone(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteAlarmStreak

func (pg *PG) DeleteAlarmStreak(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteContainer

func (pg *PG) DeleteContainer(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteCustomQuery

func (pg *PG) DeleteCustomQuery(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteDashboard

func (pg *PG) DeleteDashboard(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteDashboardGroup

func (pg *PG) DeleteDashboardGroup(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteDataPolicy

func (pg *PG) DeleteDataPolicy(ctx context.Context, id int16) (exists bool, err error)

func (*PG) DeleteFlexLegacyContainer

func (pg *PG) DeleteFlexLegacyContainer(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteFlexLegacyMetric

func (pg *PG) DeleteFlexLegacyMetric(ctx context.Context, id int64) (exists bool, err error)

func (*PG) DeleteMetric

func (pg *PG) DeleteMetric(ctx context.Context, id int64) (exists bool, err error)

func (*PG) DeleteMetricRefkey

func (pg *PG) DeleteMetricRefkey(ctx context.Context, id int64) (exists bool, err error)

func (*PG) DeleteReverseProxyHTTP

func (pg *PG) DeleteReverseProxyHTTP(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteReverseProxyHTTPPath

func (pg *PG) DeleteReverseProxyHTTPPath(ctx context.Context, proxyId int32, id int32) (exists bool, err error)

func (*PG) DeleteReverseProxyRTSP

func (pg *PG) DeleteReverseProxyRTSP(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteSNMPv2cContainer

func (pg *PG) DeleteSNMPv2cContainer(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteTeam

func (pg *PG) DeleteTeam(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteTrapCategoryRelation

func (pg *PG) DeleteTrapCategoryRelation(ctx context.Context, trapId int16) (exists bool, err error)

func (*PG) DeleteTrapListener

func (pg *PG) DeleteTrapListener(ctx context.Context, id int32) (exists bool, err error)

func (*PG) DeleteUser

func (pg *PG) DeleteUser(ctx context.Context, id int32) (e bool, err error)

func (*PG) ExistsFlexLegacyContainerTargetPortAndSerialNumber

func (pg *PG) ExistsFlexLegacyContainerTargetPortAndSerialNumber(ctx context.Context, id int32, target string, serialNumber string) (r FlexLegacyContainerExistsContainerTargetAndSerialNumberRespose, err error)

func (*PG) ExistsRelUserTeam

func (pg *PG) ExistsRelUserTeam(ctx context.Context, userId int32, teamId int32) (r TeamsExistsRelUserTeamResponse, err error)

func (*PG) GetAPIKeys

func (pg *PG) GetAPIKeys(ctx context.Context, userId int32) (keys []models.APIKeyInfo, err error)

func (*PG) GetAckNotificationInfo

func (pg *PG) GetAckNotificationInfo(ctx context.Context, ack models.AlarmAck) (notification models.AckNotificationInfo, err error)

func (*PG) GetAlamProfileAlarmEndpoints

func (pg *PG) GetAlamProfileAlarmEndpoints(ctx context.Context, filters QueryFilters[AlarmEndpointQueryFilters]) (endpoints []models.AlarmEndpoint, err error)

func (*PG) GetAlarmCategories

func (pg *PG) GetAlarmCategories(ctx context.Context, filters QueryFilters[AlarmCategoriesQueryFilters]) (categories []models.AlarmCategory, err error)

func (*PG) GetAlarmCategoriesSimplifiedByIds

func (pg *PG) GetAlarmCategoriesSimplifiedByIds(ctx context.Context, ids []int32) (categories []models.AlarmCategorySimplified, err error)

func (*PG) GetAlarmCategory

func (pg *PG) GetAlarmCategory(ctx context.Context, id int32) (exists bool, category models.AlarmCategory, err error)

func (*PG) GetAlarmCategorySimplified

func (pg *PG) GetAlarmCategorySimplified(ctx context.Context, id int32) (exists bool, category models.AlarmCategorySimplified, err error)

func (*PG) GetAlarmCategorySimplifiedByTrapId

func (pg *PG) GetAlarmCategorySimplifiedByTrapId(ctx context.Context, trapId int16) (exists bool, category models.AlarmCategorySimplified, err error)

func (*PG) GetAlarmCategorySimplifiedFromAlarmStreak

func (pg *PG) GetAlarmCategorySimplifiedFromAlarmStreak(ctx context.Context, metricId int64, streak int32) (exists bool, autoStreak bool, category models.AlarmCategorySimplified, err error)

func (*PG) GetAlarmEndpoint

func (pg *PG) GetAlarmEndpoint(ctx context.Context, id int32) (exists bool, endpoint models.AlarmEndpoint, err error)

func (*PG) GetAlarmEndpoints

func (pg *PG) GetAlarmEndpoints(ctx context.Context, filters QueryFilters[AlarmEndpointQueryFilters]) (endpoints []models.AlarmEndpoint, err error)

func (*PG) GetAlarmExpressions

func (pg *PG) GetAlarmExpressions(ctx context.Context, filters QueryFilters[AlarmExpressionQueryFilters]) (expressions []models.AlarmExpression, err error)

func (*PG) GetAlarmNotificationInfo

func (pg *PG) GetAlarmNotificationInfo(ctx context.Context, occurency models.AlarmOccurency) (notification models.AlarmNotificationInfo, err error)

func (*PG) GetAlarmProfile

func (pg *PG) GetAlarmProfile(ctx context.Context, id int32) (exists bool, profile models.AlarmProfile, err error)

func (*PG) GetAlarmProfileCategories

func (pg *PG) GetAlarmProfileCategories(ctx context.Context, profileId int32, limit int, offset int) (categories []models.AlarmCategory, err error)

func (*PG) GetAlarmProfileEmail

func (pg *PG) GetAlarmProfileEmail(ctx context.Context, profileId int32, id int32) (exists bool, email models.AlarmProfileEmail, err error)

func (*PG) GetAlarmProfileEmails

func (pg *PG) GetAlarmProfileEmails(ctx context.Context, filters QueryFilters[AlarmProfileEmailQueryFilters]) (emails []models.AlarmProfileEmail, err error)

func (*PG) GetAlarmProfileWppPhone

func (pg *PG) GetAlarmProfileWppPhone(ctx context.Context, profileId int32, id int32) (exists bool, phone models.AlarmProfileWppPhone, err error)

func (*PG) GetAlarmProfileWppPhones

func (pg *PG) GetAlarmProfileWppPhones(ctx context.Context, filters QueryFilters[AlarmProfileWppPhonesQueryFilters]) (phones []models.AlarmProfileWppPhone, err error)

func (*PG) GetAlarmProfiles

func (pg *PG) GetAlarmProfiles(ctx context.Context, filters QueryFilters[AlarmProfileQueryFilters]) (profiles []models.AlarmProfileSimplified, err error)

func (*PG) GetAlarmProfilesOnAckFromCategory

func (pg *PG) GetAlarmProfilesOnAckFromCategory(ctx context.Context, categoryId int32) (profiles []models.AlarmProfileOnAck, err error)

func (*PG) GetAlarmProfilesOnAlarmFromCategory

func (pg *PG) GetAlarmProfilesOnAlarmFromCategory(ctx context.Context, categoryId int32) (profiles []models.AlarmProfileOnAlarm, err error)

func (*PG) GetAlarmProfilesOnClearedFromCategory

func (pg *PG) GetAlarmProfilesOnClearedFromCategory(ctx context.Context, categoryId int32) (profiles []models.AlarmProfileOnCleared, err error)

func (*PG) GetAlarmState

func (pg *PG) GetAlarmState(ctx context.Context, metricId int64) (exists bool, state models.AlarmState, err error)

func (*PG) GetAlarmStateRecognition

func (pg *PG) GetAlarmStateRecognition(ctx context.Context, metricId int64) (exists bool, recognition int16, err error)

func (*PG) GetAlarmStreak

func (pg *PG) GetAlarmStreak(ctx context.Context, id int32) (exists bool, streak models.AlarmStreak, err error)

func (*PG) GetAlarmStreaks

func (pg *PG) GetAlarmStreaks(ctx context.Context, filters QueryFilters[AlarmStreakQueryFilters]) (streaks []models.AlarmStreak, err error)

func (*PG) GetAllAlarmProfileEmails

func (pg *PG) GetAllAlarmProfileEmails(ctx context.Context, id int32) (emails []string, err error)

func (*PG) GetAllAlarmProfileEndpoints

func (pg *PG) GetAllAlarmProfileEndpoints(ctx context.Context, id int32) (endpoints []models.AlarmEndpoint, err error)

func (*PG) GetAllAlarmProfileWppPhones

func (pg *PG) GetAllAlarmProfileWppPhones(ctx context.Context, id int32) (phones []int64, err error)

func (*PG) GetAllCounterWhitelist

func (pg *PG) GetAllCounterWhitelist(ctx context.Context) (userIds []int32, err error)

func (*PG) GetAllPingMetrics

func (pg *PG) GetAllPingMetrics(ctx context.Context, containerId int32) (metrics []models.Metric[models.PingMetric], err error)

func (*PG) GetAllReverseProxiesHTTP

func (pg *PG) GetAllReverseProxiesHTTP(ctx context.Context) (proxies []models.ReverseProxyHTTP, err error)

func (*PG) GetAllReverseProxiesHTTPPath

func (pg *PG) GetAllReverseProxiesHTTPPath(ctx context.Context, proxyId int32) (paths []models.ReverseProxyHTTPPath, err error)

func (*PG) GetBasePlan

func (pg *PG) GetBasePlan(ctx context.Context) (plan models.ServerBasePlan, err error)

func (*PG) GetBasicContainer

func (pg *PG) GetBasicContainer(ctx context.Context, id int32) (exists bool, container models.Container[struct{}], err error)

func (*PG) GetBasicContainers

func (pg *PG) GetBasicContainers(ctx context.Context, filters QueryFilters[BaseContainerQueryFilters]) (containers []models.Container[struct{}], err error)

func (*PG) GetBasicMetric

func (pg *PG) GetBasicMetric(ctx context.Context, id int64) (exists bool, metric models.Metric[struct{}], err error)

func (*PG) GetBasicMetrics

func (pg *PG) GetBasicMetrics(ctx context.Context, filters QueryFilters[BasicMetricQueryFilters]) (metrics []models.Metric[struct{}], err error)

func (*PG) GetClearedAlarmNotificationInfo

func (pg *PG) GetClearedAlarmNotificationInfo(ctx context.Context, occurency models.AlarmOccurency) (notification models.ClearedNotificationInfo, err error)

func (*PG) GetContainer

func (pg *PG) GetContainer(ctx context.Context, id int32, t containertype.ContainerType) (exists bool, container models.BaseContainer, err error)

func (*PG) GetContainerAlarmRecognition

func (pg *PG) GetContainerAlarmRecognition(ctx context.Context, id int32) (alarmed bool, ack bool, err error)

func (*PG) GetContainerType

func (pg *PG) GetContainerType(ctx context.Context, id int32) (exists bool, t containertype.ContainerType, err error)

func (*PG) GetContainersAlarmMap

func (pg *PG) GetContainersAlarmMap(ctx context.Context, filters QueryFilters[BaseContainerQueryFilters]) (containers []models.ContainerAlarmMap, err error)

func (*PG) GetCounterWhitelist

func (pg *PG) GetCounterWhitelist(ctx context.Context, limit int, offset int) (userIds []int32, err error)

func (*PG) GetCustomQueries

func (pg *PG) GetCustomQueries(ctx context.Context, filters QueryFilters[CustomQueryQueryFilters]) (cqs []models.CustomQuery, err error)

func (*PG) GetCustomQuery

func (pg *PG) GetCustomQuery(ctx context.Context, id int32) (exists bool, cq models.CustomQuery, err error)

func (*PG) GetCustomQuerySimplified

func (pg *PG) GetCustomQuerySimplified(ctx context.Context, id int32) (exists bool, cq models.CustomQuerySimplified, err error)

func (*PG) GetDashboard

func (pg *PG) GetDashboard(ctx context.Context, id int32) (exist bool, dashboard models.Dashboard, err error)

func (*PG) GetDashboardAlarmRecognition

func (pg *PG) GetDashboardAlarmRecognition(ctx context.Context, id int32) (alarmed bool, ack bool, err error)

func (*PG) GetDashboardGroup

func (pg *PG) GetDashboardGroup(ctx context.Context, id int32) (exist bool, group models.DashboardGroup, err error)

func (*PG) GetDashboardGroupUserId

func (pg *PG) GetDashboardGroupUserId(ctx context.Context, id int32) (exist bool, userId int32, err error)

func (*PG) GetDashboardGroups

func (pg *PG) GetDashboardGroups(ctx context.Context, filters QueryFilters[DashboardsGroupsQueryFilters]) (groups []models.DashboardGroup, err error)

func (*PG) GetDashboardTeams

func (pg *PG) GetDashboardTeams(ctx context.Context, filters QueryFilters[DashboardsTeamsQueryFilters]) (teams []models.Team, err error)

func (*PG) GetDashboardsFavorites

func (pg *PG) GetDashboardsFavorites(ctx context.Context, filters QueryFilters[DashboardsQueryFilters], userId int32) (dashboards []models.DashboardSimplifed, err error)

func (*PG) GetDashboardsFavoritesWithPermissions

func (pg *PG) GetDashboardsFavoritesWithPermissions(ctx context.Context, filters QueryFilters[DashboardsQueryFilters], userId int32) (dashboards []models.DashboardSimplifed, err error)

func (*PG) GetDashboardsSimplified

func (pg *PG) GetDashboardsSimplified(ctx context.Context, filters QueryFilters[DashboardsQueryFilters]) (dashboards []models.DashboardSimplifed, err error)

func (*PG) GetDashboardsSimplifiedFromGroup

func (pg *PG) GetDashboardsSimplifiedFromGroup(ctx context.Context, filters QueryFilters[DashboardsQueryFilters], groupId int32) (dashboards []models.DashboardSimplifed, err error)

func (*PG) GetDashboardsSimplifiedWithPermission

func (pg *PG) GetDashboardsSimplifiedWithPermission(ctx context.Context, filters QueryFilters[DashboardsQueryFilters], userId int32) (dashboards []models.DashboardSimplifed, err error)

func (*PG) GetDashboardsSimplifiedWithPermissionFromGroup

func (pg *PG) GetDashboardsSimplifiedWithPermissionFromGroup(ctx context.Context, filters QueryFilters[DashboardsQueryFilters], userId int32, groupId int32) (dashboards []models.DashboardSimplifed, err error)

func (*PG) GetDataPolicies

func (pg *PG) GetDataPolicies(ctx context.Context) (dps []models.DataPolicy, err error)

func (*PG) GetDataPolicy

func (pg *PG) GetDataPolicy(ctx context.Context, id int16) (exists bool, dp models.DataPolicy, err error)

func (*PG) GetEnabledContainersIds

func (pg *PG) GetEnabledContainersIds(ctx context.Context, containerType containertype.ContainerType, limit int, offset int) (ids []int32, err error)

func (*PG) GetFirstDataPolicyId

func (pg *PG) GetFirstDataPolicyId(ctx context.Context) (exists bool, id int32, err error)

func (*PG) GetFlexLegacyContainer

func (pg *PG) GetFlexLegacyContainer(ctx context.Context, id int32) (exists bool, container models.Container[models.FlexLegacyContainer], err error)

func (*PG) GetFlexLegacyContainerIdByTargetPort

func (pg *PG) GetFlexLegacyContainerIdByTargetPort(ctx context.Context, target string) (exists bool, id int32, err error)

func (*PG) GetFlexLegacyContainerProtocol

func (pg *PG) GetFlexLegacyContainerProtocol(ctx context.Context, id int32) (exists bool, container models.FlexLegacyContainer, err error)

func (*PG) GetFlexLegacyContainerPullingInterval

func (pg *PG) GetFlexLegacyContainerPullingInterval(ctx context.Context, id int32) (exists bool, interval int32, err error)

func (*PG) GetFlexLegacyContainerSNMPConfig

func (pg *PG) GetFlexLegacyContainerSNMPConfig(ctx context.Context, id int32) (exists bool, container models.FlexLegacyContainer, err error)

func (*PG) GetFlexLegacyContainerTarget

func (pg *PG) GetFlexLegacyContainerTarget(ctx context.Context, id int32) (exists bool, target string, err error)

func (*PG) GetFlexLegacyContainers

func (pg *PG) GetFlexLegacyContainers(ctx context.Context, filters QueryFilters[FlexLegacyContainerQueryFilters]) (containers []models.Container[models.FlexLegacyContainer], err error)

func (*PG) GetFlexLegacyDatalogDownloadRegistry

func (pg *PG) GetFlexLegacyDatalogDownloadRegistry(ctx context.Context, containerId int32) (exists bool, r models.FlexLegacyDatalogDownloadRegistry, err error)

func (*PG) GetFlexLegacyMetric

func (pg *PG) GetFlexLegacyMetric(ctx context.Context, id int64) (exists bool, metric models.Metric[models.FlexLegacyMetric], err error)

func (*PG) GetFlexLegacyMetricByPortPortType

func (pg *PG) GetFlexLegacyMetricByPortPortType(ctx context.Context, containerId int32, port int16, portType int16) (exists bool, id int64, alarmEnabled bool, metricType metric.MetricType, err error)

func (*PG) GetFlexLegacyMetricDetails

func (pg *PG) GetFlexLegacyMetricDetails(ctx context.Context, id int64) (exists bool, details string, err error)

func (*PG) GetFlexLegacyMetricProtocolSimplified

func (pg *PG) GetFlexLegacyMetricProtocolSimplified(ctx context.Context, id int64) (exists bool, metric models.FlexLegacyMetricSimplified, err error)

func (*PG) GetFlexLegacyMetrics

func (pg *PG) GetFlexLegacyMetrics(ctx context.Context, filters QueryFilters[FlexLegacyMetricQueryFilters]) (metrics []models.Metric[models.FlexLegacyMetric], err error)

func (*PG) GetFlexLegacyMetricsRequests

func (pg *PG) GetFlexLegacyMetricsRequests(ctx context.Context, containerId int32) (metrics []models.FlexLegacyDatalogMetricRequest, err error)

func (*PG) GetHttpAction

func (pg *PG) GetHttpAction(ctx context.Context, id int32) (exists bool, action models.Action[models.HttpAction], err error)

func (*PG) GetHttpActions

func (pg *PG) GetHttpActions(ctx context.Context, filters QueryFilters[HttpActionFilters]) (actions []models.Action[models.HttpAction], err error)

func (*PG) GetLoginInfo

func (pg *PG) GetLoginInfo(ctx context.Context, username string) (r UsersLoginInfoResponse, err error)

func (*PG) GetMetric

func (pg *PG) GetMetric(ctx context.Context, id int64) (exists bool, metric models.BaseMetric, err error)

func (*PG) GetMetricAddDataForm

func (pg *PG) GetMetricAddDataForm(ctx context.Context, refkey string) (exists bool, form models.BasicMetricAddDataForm, err error)

func (*PG) GetMetricAlarmExpressions

func (pg *PG) GetMetricAlarmExpressions(ctx context.Context, id int64) (expressions []models.AlarmExpressionSimplified, err error)

func (*PG) GetMetricDHSEnabled

func (pg *PG) GetMetricDHSEnabled(ctx context.Context, id int64) (exists bool, enabled bool, err error)

func (*PG) GetMetricEvaluableExpression

func (pg *PG) GetMetricEvaluableExpression(ctx context.Context, id int64) (exists bool, expression string, err error)

func (*PG) GetMetricRTSConfig

func (pg *PG) GetMetricRTSConfig(ctx context.Context, id int64) (exists bool, RTSConfig models.RTSMetricConfig, err error)

func (*PG) GetMetricRefkeys

func (pg *PG) GetMetricRefkeys(ctx context.Context, metricId int64) (rks []models.MetricRefkey, err error)

func (*PG) GetMetricRequest

func (pg *PG) GetMetricRequest(ctx context.Context, id int64) (r GetMetricRequestResult, err error)

func (*PG) GetMetricsAlarmExpressions

func (pg *PG) GetMetricsAlarmExpressions(ctx context.Context, ids []int64) (expressions [][]models.AlarmExpressionSimplified, err error)

func (*PG) GetMetricsEvaluableExpressions

func (pg *PG) GetMetricsEvaluableExpressions(ctx context.Context, ids []int64) (expressions []models.MetricEvaluableExpression, err error)

func (*PG) GetMetricsRequestsAndIntervals

func (pg *PG) GetMetricsRequestsAndIntervals(ctx context.Context, limit int, offset int) (r []GetMetricRequestAndIntervalResult, err error)

func (*PG) GetPingContainer

func (pg *PG) GetPingContainer(ctx context.Context, id int32) (exists bool, container models.Container[models.PingContainer], err error)

func (*PG) GetPingContainers

func (pg *PG) GetPingContainers(ctx context.Context, filters QueryFilters[PingContainerQueryFilters]) (containers []models.Container[models.PingContainer], err error)

func (*PG) GetPingMetric

func (pg *PG) GetPingMetric(ctx context.Context, id int64) (exists bool, metric models.Metric[models.PingMetric], err error)

func (*PG) GetPingMetrics

func (pg *PG) GetPingMetrics(ctx context.Context, filters QueryFilters[PingMetricQueryFilters]) (metrics []models.Metric[models.PingMetric], err error)

func (*PG) GetPriceTable

func (pg *PG) GetPriceTable(ctx context.Context) (table models.ServerPriceTable, err error)

func (*PG) GetRefkey

func (pg *PG) GetRefkey(ctx context.Context, refkey string) (exists bool, rk models.MetricRefkey, err error)

func (*PG) GetReverseProxiesHTTP

func (pg *PG) GetReverseProxiesHTTP(ctx context.Context, filters QueryFilters[ReverseProxyHTTPQueryFilters]) (proxies []models.ReverseProxyHTTP, err error)

func (*PG) GetReverseProxiesRTSP

func (pg *PG) GetReverseProxiesRTSP(ctx context.Context, filters QueryFilters[ReverseProxyRTSPQueryFilters]) (proxies []models.ReverseProxyRTSP, err error)

func (*PG) GetReverseProxyHTTP

func (pg *PG) GetReverseProxyHTTP(ctx context.Context, id int32) (exists bool, proxy models.ReverseProxyHTTP, err error)

func (*PG) GetReverseProxyHTTPPath

func (pg *PG) GetReverseProxyHTTPPath(ctx context.Context, proxyId int32, id int32) (exists bool, path models.ReverseProxyHTTPPath, err error)

func (*PG) GetReverseProxyHTTPPaths

func (pg *PG) GetReverseProxyHTTPPaths(ctx context.Context, filters QueryFilters[ReverseProxyHTTPPathQueryFilters]) (paths []models.ReverseProxyHTTPPath, err error)

func (*PG) GetReverseProxyRTSP

func (pg *PG) GetReverseProxyRTSP(ctx context.Context, id int32) (exists bool, proxy models.ReverseProxyRTSP, err error)

func (*PG) GetReverseProxyRTSPByPath

func (pg *PG) GetReverseProxyRTSPByPath(ctx context.Context, path string) (exists bool, proxy models.ReverseProxyRTSP, err error)

func (*PG) GetSNMPv2cAction

func (pg *PG) GetSNMPv2cAction(ctx context.Context, id int32) (exists bool, action models.Action[models.SNMPv2cAction], err error)

func (*PG) GetSNMPv2cActions

func (pg *PG) GetSNMPv2cActions(ctx context.Context, filters QueryFilters[SNMPv2cActionFilters]) (actions []models.Action[models.SNMPv2cAction], err error)

func (*PG) GetSNMPv2cContainer

func (pg *PG) GetSNMPv2cContainer(ctx context.Context, id int32) (exists bool, container models.Container[models.SNMPv2cContainer], err error)

func (*PG) GetSNMPv2cContainerProtocol

func (pg *PG) GetSNMPv2cContainerProtocol(ctx context.Context, id int32) (exists bool, container models.SNMPv2cContainer, err error)

func (*PG) GetSNMPv2cContainerPullingInterval

func (pg *PG) GetSNMPv2cContainerPullingInterval(ctx context.Context, id int32) (exists bool, interval int32, err error)

func (*PG) GetSNMPv2cGetContainers

func (pg *PG) GetSNMPv2cGetContainers(ctx context.Context, filters QueryFilters[SNMPv2cContainerQueryFilters]) (containers []models.Container[models.SNMPv2cContainer], err error)

func (*PG) GetSNMPv2cMetric

func (pg *PG) GetSNMPv2cMetric(ctx context.Context, id int64) (exists bool, metric models.Metric[models.SNMPMetric], err error)

func (*PG) GetSNMPv2cMetricProtocolSimplified

func (pg *PG) GetSNMPv2cMetricProtocolSimplified(ctx context.Context, id int64) (exists bool, metric models.SNMPMetricSimplified, err error)

func (*PG) GetSNMPv2cMetrics

func (pg *PG) GetSNMPv2cMetrics(ctx context.Context, filters QueryFilters[SNMPv2cMetricQueryFilters]) (metrics []models.Metric[models.SNMPMetric], err error)

func (*PG) GetSNMPv2cMetricsByIds

func (pg *PG) GetSNMPv2cMetricsByIds(ctx context.Context, ids []int64) (metrics []models.SNMPMetric, err error)

func (*PG) GetTeam

func (pg *PG) GetTeam(ctx context.Context, id int32) (exists bool, team models.Team, err error)

func (*PG) GetTeamMembers

func (pg *PG) GetTeamMembers(ctx context.Context, filters QueryFilters[MemberQueryFilters]) (users []models.User, err error)

func (*PG) GetTeams

func (pg *PG) GetTeams(ctx context.Context, filters QueryFilters[TeamQueryFilters]) (teams []models.Team, err error)

func (*PG) GetTrapCategoriesRelations

func (pg *PG) GetTrapCategoriesRelations(ctx context.Context, limit int, offset int) (rels []models.TrapCategoryRelation, err error)

func (*PG) GetTrapCategoriesRelationsByIds

func (pg *PG) GetTrapCategoriesRelationsByIds(ctx context.Context, trapIds []int16) (rels []models.TrapCategoryRelation, err error)

func (*PG) GetTrapCategoryRelations

func (pg *PG) GetTrapCategoryRelations(ctx context.Context) (rels []models.TrapCategoryRelation, err error)

func (*PG) GetTrapListener

func (pg *PG) GetTrapListener(ctx context.Context, id int32) (exists bool, listener models.TrapListener, err error)

func (*PG) GetTrapListeners

func (pg *PG) GetTrapListeners(ctx context.Context) (listeners []models.TrapListener, err error)

func (*PG) GetUserRole

func (pg *PG) GetUserRole(ctx context.Context, id int32) (exists bool, role roles.Role, err error)

func (*PG) GetUserTeams

func (pg *PG) GetUserTeams(ctx context.Context, userId int32, limit int, offset int) (teams []models.Team, err error)

func (*PG) GetUserWithoutPW

func (pg *PG) GetUserWithoutPW(ctx context.Context, id int32) (exists bool, user models.UserWithoutPW, err error)

func (*PG) GetUsers

func (pg *PG) GetUsers(ctx context.Context, filters QueryFilters[UserQueryFilters]) (users []models.User, err error)

func (*PG) MetricAlarmExpressionRelExists

func (pg *PG) MetricAlarmExpressionRelExists(ctx context.Context, expressionId int32, metricId int64) (r AlarmExpressionExistsMetricAndRelationResponse, err error)

func (*PG) MetricAndCategoryExists

func (pg *PG) MetricAndCategoryExists(ctx context.Context, metricId int64, categoryId int32) (metricExists bool, categoryExists bool, err error)

func (*PG) MetricAndRefkeyExists

func (pg *PG) MetricAndRefkeyExists(ctx context.Context, metricId int64, containerType container.ContainerType, refkey string, id int64) (metricExists bool, refkeyExists bool, err error)

func (*PG) MetricContainerAndDataPolicyExists

func (pg *PG) MetricContainerAndDataPolicyExists(ctx context.Context, base models.BaseMetric) (r MetricsExistsContainerAndDataPolicyResponse, err error)

func (*PG) MetricEnabled

func (pg *PG) MetricEnabled(ctx context.Context, id int32) (r MetricsEnabledResponse, err error)

func (*PG) PingContainerTargetExists

func (pg *PG) PingContainerTargetExists(ctx context.Context, id int32, target string) (exists bool, err error)

func (*PG) RemoveActionsFromDashboard

func (pg *PG) RemoveActionsFromDashboard(ctx context.Context, dasboardId int32, actions []int64) (err error)

func (*PG) RemoveCategoryFromAlarmProfile

func (pg *PG) RemoveCategoryFromAlarmProfile(ctx context.Context, profileId int32, categoryId int32) (exists bool, err error)

func (*PG) RemoveDashboardFromGroup

func (pg *PG) RemoveDashboardFromGroup(ctx context.Context, groupId int32, dashboardId int32) (err error)

func (*PG) RemoveMetricAlarmExpressionRel

func (pg *PG) RemoveMetricAlarmExpressionRel(ctx context.Context, expressionId int32, metricId int64) (exists bool, err error)

func (*PG) RemoveMetricsFromDashboard

func (pg *PG) RemoveMetricsFromDashboard(ctx context.Context, dasboardId int32, metrics []int64) (err error)

func (*PG) RemoveTeamFromDashboard

func (pg *PG) RemoveTeamFromDashboard(ctx context.Context, dashboardId int32, teamId int32) (exists bool, err error)

func (*PG) RemoveTeamMember

func (pg *PG) RemoveTeamMember(ctx context.Context, userId int32, teamId int32) (exists bool, err error)

func (*PG) RemoveUserFromCounterWhitelist

func (pg *PG) RemoveUserFromCounterWhitelist(ctx context.Context, userId int32) (exists bool, err error)

func (*PG) ReverseProxyHTTPHostPortExists

func (pg *PG) ReverseProxyHTTPHostPortExists(ctx context.Context, host string, port int32, id int32) (exists bool, err error)

func (*PG) ReverseProxyHTTPPathExists

func (pg *PG) ReverseProxyHTTPPathExists(ctx context.Context, proxyId int32, path string, id int32) (proxyExists bool, pathExists bool, err error)

func (*PG) ReverseProxyRTSPPathExists

func (pg *PG) ReverseProxyRTSPPathExists(ctx context.Context, path string, id int32) (exists bool, err error)

func (*PG) TeamMemberExists

func (pg *PG) TeamMemberExists(ctx context.Context, teamId int32, userId int32) (exists bool, err error)

func (*PG) TeamsIsRoot

func (pg *PG) TeamsIsRoot(ctx context.Context, id int32) (root bool, err error)

func (*PG) TrapCategoryRelationExists

func (pg *PG) TrapCategoryRelationExists(ctx context.Context, trapId int16) (exists bool, err error)

func (*PG) TrapListenerHostPortExists

func (pg *PG) TrapListenerHostPortExists(ctx context.Context, host string, port int32, id int32) (exists bool, err error)

func (*PG) UpdateAlarmCategory

func (pg *PG) UpdateAlarmCategory(ctx context.Context, category models.AlarmCategory) (exists bool, err error)

func (*PG) UpdateAlarmEndpoint

func (pg *PG) UpdateAlarmEndpoint(ctx context.Context, endpoint models.AlarmEndpoint) (exists bool, err error)

func (*PG) UpdateAlarmExpression

func (pg *PG) UpdateAlarmExpression(ctx context.Context, exp models.AlarmExpression) (exists bool, err error)

func (*PG) UpdateAlarmProfile

func (pg *PG) UpdateAlarmProfile(ctx context.Context, profile models.AlarmProfile) (exists bool, err error)

func (*PG) UpdateAlarmProfileEmail

func (pg *PG) UpdateAlarmProfileEmail(ctx context.Context, profileId int32, email models.AlarmProfileEmail) (exists bool, err error)

func (*PG) UpdateAlarmProfileWppPhone

func (pg *PG) UpdateAlarmProfileWppPhone(ctx context.Context, profileId int32, wpp models.AlarmProfileWppPhone) (exists bool, err error)

func (*PG) UpdateAlarmState

func (pg *PG) UpdateAlarmState(ctx context.Context, state models.AlarmState) (exists bool, err error)

func (*PG) UpdateAlarmStreak

func (pg *PG) UpdateAlarmStreak(ctx context.Context, streak models.AlarmStreak) (exists bool, err error)

func (*PG) UpdateBasePlan

func (pg *PG) UpdateBasePlan(ctx context.Context, plan models.ServerBasePlan) (err error)

func (*PG) UpdateBasicContainer

func (pg *PG) UpdateBasicContainer(ctx context.Context, container models.Container[struct{}]) (exists bool, err error)

func (*PG) UpdateBasicMetric

func (pg *PG) UpdateBasicMetric(ctx context.Context, metric models.Metric[struct{}]) (exists bool, err error)

func (*PG) UpdateCustomQuery

func (pg *PG) UpdateCustomQuery(ctx context.Context, cq models.CustomQuery) (exists bool, err error)

func (*PG) UpdateDashboard

func (pg *PG) UpdateDashboard(ctx context.Context, dashboard models.Dashboard) (exists bool, err error)

func (*PG) UpdateDashboardGroup

func (pg *PG) UpdateDashboardGroup(ctx context.Context, group models.DashboardGroup) (exists bool, err error)

func (*PG) UpdateDataPolicy

func (pg *PG) UpdateDataPolicy(ctx context.Context, dp models.DataPolicy) (tx *sql.Tx, exists bool, err error)

func (*PG) UpdateFlexLegacyContainer

func (pg *PG) UpdateFlexLegacyContainer(ctx context.Context, container models.Container[models.FlexLegacyContainer]) (exists bool, err error)

func (*PG) UpdateFlexLegacyDatalogDownloadRegistry

func (pg *PG) UpdateFlexLegacyDatalogDownloadRegistry(ctx context.Context, r models.FlexLegacyDatalogDownloadRegistry) (exists bool, err error)

func (*PG) UpdateFlexLegacyMetric

func (pg *PG) UpdateFlexLegacyMetric(ctx context.Context, metric models.Metric[models.FlexLegacyMetric]) (exists bool, err error)

func (*PG) UpdateHttpAction

func (pg *PG) UpdateHttpAction(ctx context.Context, action models.Action[models.HttpAction]) (exists bool, err error)

func (*PG) UpdateMetricRefkey

func (pg *PG) UpdateMetricRefkey(ctx context.Context, rk models.MetricRefkey) (exists bool, err error)

func (*PG) UpdatePingContainer

func (pg *PG) UpdatePingContainer(ctx context.Context, container models.Container[models.PingContainer]) (exists bool, err error)

func (*PG) UpdatePingMetric

func (pg *PG) UpdatePingMetric(ctx context.Context, metric models.Metric[models.PingMetric]) (exists bool, err error)

func (*PG) UpdatePriceTable

func (pg *PG) UpdatePriceTable(ctx context.Context, table models.ServerPriceTable) (err error)

func (*PG) UpdateReverseProxyHTTP

func (pg *PG) UpdateReverseProxyHTTP(ctx context.Context, proxy models.ReverseProxyHTTP) (exists bool, err error)

func (*PG) UpdateReverseProxyHTTPPath

func (pg *PG) UpdateReverseProxyHTTPPath(ctx context.Context, path models.ReverseProxyHTTPPath) (exists bool, err error)

func (*PG) UpdateReverseProxyRTSP

func (pg *PG) UpdateReverseProxyRTSP(ctx context.Context, proxy models.ReverseProxyRTSP) (exists bool, err error)

func (*PG) UpdateSNMPv2cAction

func (pg *PG) UpdateSNMPv2cAction(ctx context.Context, action models.Action[models.SNMPv2cAction]) (exists bool, err error)

func (*PG) UpdateSNMPv2cContainer

func (pg *PG) UpdateSNMPv2cContainer(ctx context.Context, container models.Container[models.SNMPv2cContainer]) (exists bool, err error)

func (*PG) UpdateSNMPv2cMetric

func (pg *PG) UpdateSNMPv2cMetric(ctx context.Context, m models.Metric[models.SNMPMetric]) (exists bool, err error)

func (*PG) UpdateTeam

func (pg *PG) UpdateTeam(ctx context.Context, team models.Team) (exists bool, err error)

func (*PG) UpdateTrapListener

func (pg *PG) UpdateTrapListener(ctx context.Context, tl models.TrapListener) (exists bool, err error)

func (*PG) UpdateUser

func (pg *PG) UpdateUser(ctx context.Context, user models.User) (exists bool, err error)

func (*PG) UpdateUserKeepPW

func (pg *PG) UpdateUserKeepPW(ctx context.Context, user models.User) (exists bool, err error)

func (*PG) UpdateUserLastActivity

func (pg *PG) UpdateUserLastActivity(ctx context.Context, userId int32, now time.Time) (exists bool, err error)

func (*PG) UserExists

func (pg *PG) UserExists(ctx context.Context, id int32) (exists bool, err error)

func (*PG) UserTeamDasboardRelationExists

func (pg *PG) UserTeamDasboardRelationExists(ctx context.Context, userId int32, dashboardId int32) (exists bool, err error)

func (*PG) UsernameAndEmailExists

func (pg *PG) UsernameAndEmailExists(ctx context.Context, username string, email string, userId int32) (usernameExists bool, emailExists bool, err error)

func (*PG) UsernameExists

func (pg *PG) UsernameExists(ctx context.Context, username string) (exists bool, err error)

type PingContainerQueryFilters

type PingContainerQueryFilters struct {
	Type           containertype.ContainerType `type:"=" column:"type"`
	Name           string                      `type:"ilike" column:"name"`
	Descr          string                      `type:"ilike" column:"descr"`
	CreatedAtStart int64                       `type:">=" column:"created_at"`
	CreatedAtStop  int64                       `type:"<=" column:"created_at"`
	Enabled        *bool                       `type:"=" column:"enabled"`
	Target         string                      `type:"ilike" column:"target"`
}

type PingMetricQueryFilters

type PingMetricQueryFilters struct {
	ContainerType container.ContainerType `type:"=" column:"container_type"`
	ContainerId   int32                   `type:"=" column:"container_id"`
	Name          string                  `type:"ilike" column:"name"`
	Descr         string                  `type:"ilike" column:"descr"`
	Enabled       *bool                   `type:"=" column:"enabled"`
	DataPolicyId  int16                   `type:"=" column:"data_policy_id"`
}

type QueryFilters

type QueryFilters[T any] struct {

	// CustomFilters is the custom filters for
	// each type of query.
	CustomFilters T
	// Limit is the limit of number of rows
	// returned.
	Limit int
	// Offset is the search offset.
	Offset int
	// OrderBy is the order by column.
	OrderBy string
	// OrderByFn is the order by function.
	OrderByFn string
	// contains filtered or unexported fields
}

type ReverseProxyHTTPPathQueryFilters

type ReverseProxyHTTPPathQueryFilters struct {
	ProxyId int32  `type:"=" column:"proxy_id"`
	Name    string `type:"ilike" column:"name"`
	Descr   string `type:"ilike" column:"descr"`
	Path    string `type:"ilike" column:"path"`
	URL     string `type:"ilike" column:"url"`
}

type ReverseProxyHTTPQueryFilters

type ReverseProxyHTTPQueryFilters struct {
	Name  string `type:"ilike" column:"name"`
	Descr string `type:"ilike" column:"descr"`
	Host  string `type:"ilike" column:"host"`
	Port  int32  `type:"=" column:"port"`
}

type ReverseProxyRTSPQueryFilters

type ReverseProxyRTSPQueryFilters struct {
	Name  string `type:"ilike" column:"name"`
	Descr string `type:"ilike" column:"descr"`
	Path  string `type:"ilike" column:"path"`
	URL   string `type:"ilike" column:"url"`
}

type SNMPv2cActionFilters

type SNMPv2cActionFilters struct {
	Name        string `type:"ilike" column:"name"`
	Descr       string `type:"ilike" column:"descr"`
	OID         string `type:"ilike" column:"oid"`
	ContainerId int32  `type:"=" column:"container_id"`
}

type SNMPv2cContainerQueryFilters

type SNMPv2cContainerQueryFilters struct {
	Type           containertype.ContainerType `type:"=" column:"type"`
	Name           string                      `type:"ilike" column:"name"`
	Descr          string                      `type:"ilike" column:"descr"`
	CreatedAtStart int64                       `type:">=" column:"created_at"`
	CreatedAtStop  int64                       `type:"<=" column:"created_at"`
	Enabled        *bool                       `type:"=" column:"enabled"`
	Target         string                      `type:"ilike" column:"target"`
}

type SNMPv2cMetricQueryFilters

type SNMPv2cMetricQueryFilters struct {
	ContainerType container.ContainerType `type:"=" column:"container_type"`
	ContainerId   int32                   `type:"=" column:"container_id"`
	Name          string                  `type:"ilike" column:"name"`
	Descr         string                  `type:"ilike" column:"descr"`
	Enabled       *bool                   `type:"=" column:"enabled"`
	DataPolicyId  int16                   `type:"=" column:"data_policy_id"`
}

type TeamQueryFilters

type TeamQueryFilters struct {
	Name  string `type:"ilike" column:"name"`
	Descr string `type:"ilike" column:"descr"`
}

type TeamsExistsRelUserTeamResponse

type TeamsExistsRelUserTeamResponse struct {
	// RelationExist is the relation existence.
	RelationExist bool
	// UserExists is the user existence.
	UserExists bool
	// TeamExists is the team existence.
	TeamExists bool
}

TeamsExistsRelUserTeamResponse is the response for ExistsRelUserTeam handler.

type UserQueryFilters

type UserQueryFilters struct {
	FirstName string     `type:"ilike" column:"first_name"`
	LastName  string     `type:"ilike" column:"last_name"`
	Username  string     `type:"ilike" column:"username"`
	Role      roles.Role `type:"=" column:"role"`
	Email     string     `type:"ilike" column:"email"`
}

type UsersLoginInfoResponse

type UsersLoginInfoResponse struct {
	// Exists is the user existence.
	Exists bool
	// Id is the user id.
	Id int
	// Role is the user role.
	Role roles.Role
	// Password is the user password.
	Password string
}

UsersLoginInfoResponse is the response for GetLoginInfo handler.

Jump to

Keyboard shortcuts

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