controllers

package
v0.0.0-...-a8fe247 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeOK         = 0
	CodeAuthError  = -1
	CodeWrongParam = -2

	CodeExceededLimits = -4
	CodeNotExist       = -5
	CodeAlreadyExist   = -6

	CodeAreaTooLarge = -1001
)

Variables

This section is empty.

Functions

func GetFullScreenshotImage

func GetFullScreenshotImage(c *gin.Context)

func GetHistoryImage

func GetHistoryImage(c *gin.Context)

func Init

func Init()

func InternalErrorResponse

func InternalErrorResponse(c *gin.Context, err error)

func JSONResponse

func JSONResponse(c *gin.Context, code int, detail string, data interface{})

func NotificationAddServerChan

func NotificationAddServerChan(c *gin.Context)

func NotificationList

func NotificationList(c *gin.Context)

func SentryCreate

func SentryCreate(c *gin.Context)

SentryCreate creates a new sentry

func SentryInfo

func SentryInfo(c *gin.Context)

func SentryList

func SentryList(c *gin.Context)

func SentryRemove

func SentryRemove(c *gin.Context)

func SentryRequestFullScreenshot

func SentryRequestFullScreenshot(c *gin.Context)

url the url of the page that needs screenshot

func SentryUpdate

func SentryUpdate(c *gin.Context)

func SentryWaitFullScreenshot

func SentryWaitFullScreenshot(c *gin.Context)

func UserCreateWithVerification

func UserCreateWithVerification(c *gin.Context)

UserCreateWithVerification checks verification code and create the user in the user database

func UserGetSignUpVerification

func UserGetSignUpVerification(c *gin.Context)

UserGetSignUpVerification gets user email, generate Verification code and wait to be validated

func UserInfo

func UserInfo(c *gin.Context)

UserInfo returns users' information, including email

func UserLogin

func UserLogin(c *gin.Context)

UserLogin takes email and password and generate login token if succeed

func UserUpdateSettings

func UserUpdateSettings(c *gin.Context)

func WorkerFetchTask

func WorkerFetchTask(c *gin.Context)

func WorkerInit

func WorkerInit(c *gin.Context)

func WorkerSubmitTask

func WorkerSubmitTask(c *gin.Context)

Types

type NotificationListItemJSON

type NotificationListItemJSON struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Type      string    `json:"type"`
	Detail    string    `json:"detail"`
	CreatedAt time.Time `json:"createAt"`
}

type NotificationMethodJson

type NotificationMethodJson struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
}

type SentryImageJson

type SentryImageJson struct {
	File      string    `json:"file"`
	CreatedAt time.Time `json:"createdAt"`
}

type SentryJSON

type SentryJSON struct {
	ID            string                 `json:"id"`
	Name          string                 `json:"name"`
	RunningState  int                    `json:"runningState"`
	Notification  NotificationMethodJson `json:"notification"`
	LastCheckTime *time.Time             `json:"lastCheckTime"`
	Interval      int                    `json:"interval"`
	CheckCount    int                    `json:"checkCount"`
	NotifyCount   int                    `json:"notifyCount"`
	ImageHistory  []SentryImageJson      `json:"imageHistory"`
	Task          map[string]interface{} `json:"task"`
	CreatedAt     time.Time              `json:"createdAt"`
}

type SentryListItemJSON

type SentryListItemJSON struct {
	ID            string     `json:"id"`
	Name          string     `json:"name"`
	URL           string     `json:"url"`
	RunningState  int        `json:"runningState"`
	LastCheckTime *time.Time `json:"lastCheckTime"`
}

type UserInfoJSON

type UserInfoJSON struct {
	Email     string    `json:"email"`
	Language  string    `json:"language"`
	TimeZone  string    `json:"timeZone"`
	CreatedAt time.Time `json:"createdAt"`
}

Jump to

Keyboard shortcuts

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