api

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AVG_HISTORY_LIMIT = 20
)

Variables

This section is empty.

Functions

func RegisterEventAppCreatedListener

func RegisterEventAppCreatedListener(publisher sse.Publisher)

func RegisterEventDeviceStatusListener

func RegisterEventDeviceStatusListener(publisher sse.Publisher)

func RegisterEventTestCreatedListener

func RegisterEventTestCreatedListener(publisher sse.Publisher)

func RegisterEventTestRunFinishedListener

func RegisterEventTestRunFinishedListener(publisher sse.Publisher)

func RegisterNewTestLogEntryListener

func RegisterNewTestLogEntryListener(publisher sse.Publisher)

func RegisterNewTestProtocolListener

func RegisterNewTestProtocolListener(publisher sse.Publisher)

func RegisterNewTestProtocolLogListener

func RegisterNewTestProtocolLogListener(publisher sse.Publisher)

Types

type ErrorResponse

type ErrorResponse struct {
	Message string
}

type RunTestRequest

type RunTestRequest struct {
	AppBinaryID int
	Params      string
}

type Service

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

func New

func New(logger *logrus.Logger, db *gorm.DB, ip net.IP, dm manager.Devices, sm manager.Sessions, config config.Service) *Service

func (*Service) PublishEvent

func (s *Service) PublishEvent(event sse.Event)

func (*Service) RegisterRoutes

func (s *Service) RegisterRoutes(r *gin.Engine) error

func (*Service) ResolveApp

func (s *Service) ResolveApp(context *gin.Context)

func (*Service) ResolveProject

func (s *Service) ResolveProject(context *gin.Context)

func (*Service) WithApp

func (s *Service) WithApp(wrapperFunction func(*gin.Context, *models.Project, *models.App)) func(*gin.Context)

func (*Service) WithProject

func (s *Service) WithProject(wrapperFunction func(*gin.Context, *models.Project)) func(*gin.Context)

type Session

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

func (*Session) Close

func (s *Session) Close() error

func (*Session) GetAppParameter

func (s *Session) GetAppParameter() *app.Parameter

func (*Session) GetDevice

func (s *Session) GetDevice() device.Device

func (*Session) GetDeviceLock

func (s *Session) GetDeviceLock() *manager.DeviceLock

func (*Session) GetLastAccess

func (s *Session) GetLastAccess() time.Time

func (*Session) GetLogger

func (s *Session) GetLogger() *logrus.Entry

func (*Session) GetSessionID

func (s *Session) GetSessionID() string

func (*Session) GetStorage

func (s *Session) GetStorage() manager.Storage

func (*Session) HandleDisconnect

func (s *Session) HandleDisconnect()

func (*Session) SetDeviceLock

func (s *Session) SetDeviceLock(lock *manager.DeviceLock)

func (*Session) SetLastAccess

func (s *Session) SetLastAccess(now time.Time)

func (*Session) WaitForConnection

func (s *Session) WaitForConnection() error

Jump to

Keyboard shortcuts

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