router

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFilters

func GetFilters(paginationFilter *PaginationRequest, timeFilter *TimeFilterRequest) (*apiPb.Pagination, *apiPb.TimeFilter, error)

func GetIncidentListSorting

func GetIncidentListSorting(direction apiPb.SortDirection, sortBy apiPb.SortIncidentList) *apiPb.SortingIncidentList

func GetNotificationList

func GetNotificationList(ownerType apiPb.ComponentOwnerType, ownerId string) *apiPb.GetListRequest

func GetSchedulerListSorting

func GetSchedulerListSorting(direction apiPb.SortDirection, sortBy apiPb.SortSchedulerList) *apiPb.SortingSchedulerList

func GetStringValueFromString

func GetStringValueFromString(str string) *wrappers.StringValue

func GetTransactionListSorting

func GetTransactionListSorting(direction apiPb.SortDirection, sortBy apiPb.SortTransactionList) *apiPb.SortingTransactionList

Types

type AgentHistory

type AgentHistory struct {
	Pagination  *PaginationRequest
	TimeFilters *TimeFilterRequest
	Type        apiPb.TypeAgentStat `form:"type"`
}

type Application

type Application struct {
	Host    string `json:"host"`
	Name    string `json:"name" binding:"required"`
	AgentId string `json:"agentId"`
}

type CreateNotificationMethod

type CreateNotificationMethod struct {
	Type          apiPb.NotificationMethodType `json:"type"`
	Name          string                       `json:"name" binding:"required"`
	SlackConfig   *apiPb.SlackMethod           `json:"slackConfig,omitempty"`
	WebHookConfig *apiPb.WebHookMethod         `json:"webhookConfig,omitempty"`
}

type CreateRuleRequest

type CreateRuleRequest struct {
	Rule      string                   `json:"rule" binding:"required"`
	Name      string                   `json:"name"`
	AutoClose bool                     `json:"autoClose"`
	OwnerType apiPb.ComponentOwnerType `json:"ownerType"`
	OwnerId   string                   `json:"ownerId" binding:"required"`
}

type D

type D struct {
	Data interface{} `json:"data,omitempty"`
}

type E

type E struct {
	Error error `json:"error"`
}

type GetIncidentListRequest

type GetIncidentListRequest struct {
	Pagination    *PaginationRequest
	TimeFilters   *TimeFilterRequest
	Status        apiPb.IncidentStatus   `form:"status"`
	RuleId        string                 `form:"ruleId"`
	SortBy        apiPb.SortIncidentList `form:"sort_by"`
	SortDirection apiPb.SortDirection    `form:"sort_direction"`
}

type GetTransactionGroupRequest

type GetTransactionGroupRequest struct {
	TimeFilters       *TimeFilterRequest
	GroupType         apiPb.GroupTransaction  `form:"group_by"`
	TransactionType   apiPb.TransactionType   `form:"transaction_type"`
	TransactionStatus apiPb.TransactionStatus `form:"transaction_status"`
}

type GetTransactionListRequest

type GetTransactionListRequest struct {
	Pagination        *PaginationRequest
	TimeFilters       *TimeFilterRequest
	SortBy            apiPb.SortTransactionList `form:"sort_by"`
	SortDirection     apiPb.SortDirection       `form:"sort_direction"`
	TransactionType   apiPb.TransactionType     `form:"transaction_type"`
	TransactionStatus apiPb.TransactionStatus   `form:"transaction_status"`
	HostFilter        string                    `form:"host"`
	NameFilter        string                    `form:"name"`
	PathFilter        string                    `form:"path"`
	MethodFilter      string                    `form:"method"`
}

type LinkNotificationMethod

type LinkNotificationMethod struct {
	OwnerId   string                   `json:"ownerId" binding:"required"`
	OwnerType apiPb.ComponentOwnerType `json:"ownerType" binding:"required"`
}

type ListOfNotificationMethods

type ListOfNotificationMethods struct {
	OwnerId   string                   `form:"ownerId"`
	OwnerType apiPb.ComponentOwnerType `form:"ownerType"`
}

type ListRulesByOwnerIdRequest

type ListRulesByOwnerIdRequest struct {
	OwnerType apiPb.ComponentOwnerType `form:"ownerType"`
	OwnerId   string                   `form:"ownerId"  binding:"required"`
}

type PaginationRequest

type PaginationRequest struct {
	Page  int32 `form:"page"`
	Limit int32 `form:"limit"`
}

type Router

type Router interface {
	GetEngine() *gin.Engine
}

func New

func New(handlers handlers.Handlers) Router

type RuleIdRequest

type RuleIdRequest struct {
	RuleId string `json:"ruleId"`
}

type Scheduler

type Scheduler struct {
	Type                apiPb.SchedulerType        `json:"type"`
	Interval            int32                      `json:"interval" binding:"required"`
	Timeout             int32                      `json:"timeout"`
	Name                string                     `json:"name"`
	HTTPConfig          *apiPb.HttpConfig          `json:"httpConfig,omitempty"`
	TCPConfig           *apiPb.TcpConfig           `json:"tcpConfig,omitempty"`
	HTTPValueConfig     *apiPb.HttpJsonValueConfig `json:"httpValueConfig,omitempty"`
	GRPCConfig          *apiPb.GrpcConfig          `json:"grpcConfig,omitempty"`
	SiteMapConfig       *apiPb.SiteMapConfig       `json:"siteMapConfig,omitempty"`
	SSLExpirationConfig *apiPb.SslExpirationConfig `json:"sslExpirationConfig,omitempty"`
}

type SchedulerHistory

type SchedulerHistory struct {
	Pagination    *PaginationRequest
	TimeFilters   *TimeFilterRequest
	Status        apiPb.SchedulerCode     `form:"status"`
	SortDirection apiPb.SortDirection     `form:"sort_direction"`
	SortBy        apiPb.SortSchedulerList `form:"sort_by"`
}

type SchedulerUptimeRequest

type SchedulerUptimeRequest struct {
	TimeRange *TimeFilterRequest
}

type TimeFilterRequest

type TimeFilterRequest struct {
	DateFrom *time.Time `form:"dateFrom" time_format:"2006-01-02T15:04:05Z07:00"`
	DateTo   *time.Time `form:"dateTo" time_format:"2006-01-02T15:04:05Z07:00"`
}

type Transaction

type Transaction struct {
	Id       string                  `json:"id" binding:"required"`
	ParentID string                  `json:"parentId"`
	Name     string                  `json:"name" binding:"required"`
	DateFrom transactionTime         `json:"dateFrom" time_format:"unixNano" binding:"required"`
	DateTo   transactionTime         `json:"dateTo" time_format:"unixNano" binding:"required"`
	Status   apiPb.TransactionStatus `json:"status"`
	Type     apiPb.TransactionType   `json:"type"`
	Meta     *struct {
		Host   string `json:"host"`
		Path   string `json:"path"`
		Method string `json:"method"`
	} `json:"meta,omitempty"`
	Error *struct {
		Message string `json:"message"`
	} `json:"error,omitempty"`
}

type ValidateRuleRequest

type ValidateRuleRequest struct {
	OwnerType apiPb.ComponentOwnerType `json:"ownerType"`
	Rule      string                   `json:"rule" binding:"required"`
}

Jump to

Keyboard shortcuts

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