service

package
v0.0.0-...-1b34132 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthCheckRecord

type HealthCheckRecord struct{}

func (HealthCheckRecord) DeleteByMonitorCode

func (HealthCheckRecord) DeleteByMonitorCode(ctx *appcontext.AppContext, code string, ownerID primitive.ObjectID) error

func (HealthCheckRecord) GetRecentRecordOfMonitor

func (HealthCheckRecord) GetRecentRecordOfMonitor(ctx *appcontext.AppContext, code string) (*mongodb.HealthCheckRecord, error)

func (HealthCheckRecord) GetResponseTimeChartDataInTimeRange

func (HealthCheckRecord) GetResponseTimeChartDataInTimeRange(ctx *appcontext.AppContext, ownerID primitive.ObjectID, code string, startTime, endTime time.Time) ([]modelresponse.HealthCheckRecordResponseTimeChartData, error)

func (HealthCheckRecord) GetResponseTimeMetricsInTimeRange

func (HealthCheckRecord) GetResponseTimeMetricsInTimeRange(ctx *appcontext.AppContext, ownerID primitive.ObjectID, code string, startTime, endTime time.Time) (*modelresponse.HealthCheckRecordResponseTimeMetrics, error)

func (HealthCheckRecord) IsTargetCheckedToday

func (HealthCheckRecord) IsTargetCheckedToday(ctx *appcontext.AppContext, code string) bool

func (HealthCheckRecord) NewRecord

type Monitor

type Monitor struct{}

func (Monitor) CreateDomain

func (s Monitor) CreateDomain(ctx *appcontext.AppContext, domain, scheme string, ownerID primitive.ObjectID) (*mongodb.Monitor, error)

func (Monitor) CreateHTTP

func (s Monitor) CreateHTTP(ctx *appcontext.AppContext, http string, ownerID primitive.ObjectID) (*mongodb.Monitor, error)

func (Monitor) CreateICMP

func (s Monitor) CreateICMP(ctx *appcontext.AppContext, icmp string, ownerID primitive.ObjectID) (*mongodb.Monitor, error)

func (Monitor) CreateTCP

func (s Monitor) CreateTCP(ctx *appcontext.AppContext, tcp string, ownerID primitive.ObjectID) (*mongodb.Monitor, error)

func (Monitor) DeleteByID

func (Monitor) DeleteByID(ctx *appcontext.AppContext, monitorID string, ownerID primitive.ObjectID) error

func (Monitor) FindByOwnerID

func (Monitor) FindByOwnerID(ctx *appcontext.AppContext, ownerID primitive.ObjectID, filter MonitorFindByUserIDFilter) ([]mongodb.Monitor, error)

func (Monitor) IsTargetExisted

func (Monitor) IsTargetExisted(ctx *appcontext.AppContext, monitorType mongodb.MonitorType, target string, userID primitive.ObjectID) bool

func (Monitor) StatsByCode

func (Monitor) StatsByCode(ctx *appcontext.AppContext, ownerID primitive.ObjectID, code string) (*modelresponse.Stats, error)

type MonitorFindByUserIDFilter

type MonitorFindByUserIDFilter struct {
	Type    string
	Keyword string
	Page    int64
}

type User

type User struct{}

func (User) CreateWithGitHubData

func (User) CreateWithGitHubData(ctx *appcontext.AppContext, githubData sso.GitHubUserData) (*mongodb.User, error)

func (User) CreateWithGoogleData

func (User) CreateWithGoogleData(ctx *appcontext.AppContext, googleData sso.GoogleUserData) (*mongodb.User, error)

func (User) FindByGitHubID

func (User) FindByGitHubID(ctx *appcontext.AppContext, githubID string) (*mongodb.User, error)

func (User) FindByGoogleID

func (User) FindByGoogleID(ctx *appcontext.AppContext, googleID string) (*mongodb.User, error)

func (User) FindByID

func (User) FindByID(ctx *appcontext.AppContext, id primitive.ObjectID) (*mongodb.User, error)

func (User) FindOrCreateWithPlatformID

func (User) FindOrCreateWithPlatformID(ctx *appcontext.AppContext, platform, roomID string, u modelcommand.User) (*mongodb.User, error)

Jump to

Keyboard shortcuts

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