v2

package
v1.0.70 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAccountAudit

func AddAccountAudit(theAccount *models.AccountSchema, auditType models.AuditType, message string) error

func AddAccountIntegration

func AddAccountIntegration(theAccount *models.AccountSchema, name string, integrationType models.IntegrationType, url string, eventTypes []models.IntegrationEventType) error

func AddAgentStat

func AddAgentStat(theAgent *modelsv2.AgentSchema, runningState bool, cpu float64, memory float32) error

func AddIntegrationEvent

func AddIntegrationEvent(theAccount *v2.AccountSchema, eventType v2.IntegrationEventType, payload interface{}) error

func BuildDiscordEventPayload

func BuildDiscordEventPayload(eventType v2.IntegrationEventType, payload interface{}) (*discordwebhook.Message, error)

func CreateAccount

func CreateAccount(theUser *models.UserSchema, accountName string) error

func CreateAgentTask

func CreateAgentTask(theAgent *modelsv2.AgentSchema, action string, data interface{}) error

func CreateAgentWorkflow

func CreateAgentWorkflow(accountId primitive.ObjectID, PostData *modelsv2.CreateAgentWorkflowData) (string, error)

func CreateUser added in v1.0.70

func CreateUser(eid string, email string, username string) (*models.UserSchema, error)

func DeleteAccountIntegration

func DeleteAccountIntegration(integrationId primitive.ObjectID) error

func DeleteAgent

func DeleteAgent(theAccount *modelsv2.AccountSchema, agentId primitive.ObjectID) error

func GetAccountIntegrationsWithEventType

func GetAccountIntegrationsWithEventType(theAccount *v2.AccountSchema, eventType v2.IntegrationEventType) ([]*v2.AccountIntegrationSchema, error)

func GetAgentLog

func GetAgentLog(theAgent *modelsv2.AgentSchema, logType string) (*modelsv2.AgentLogSchema, error)

func GetAgentStats

func GetAgentStats(theAgent *modelsv2.AgentSchema) ([]*modelsv2.AgentStatSchema, error)

func GetAllModsFromAPI

func GetAllModsFromAPI() ([]models.ModSchema, error)

func GetDBModCount

func GetDBModCount() (int64, error)

func GetModCountFromAPI

func GetModCountFromAPI() (int, error)

func GetModsFromAPI

func GetModsFromAPI(offset int) ([]models.ModSchema, error)

func GetModsFromDB

func GetModsFromDB(page int, sort string, direction string, search string) (*[]models.ModSchema, error)

func GetMyAccountAudit

func GetMyAccountAudit(theUser *models.UserSchema) (*[]models.AccountAuditSchema, error)

func GetMyAccountIntegrations

func GetMyAccountIntegrations(theAccount *models.AccountSchema) (*[]models.AccountIntegrationSchema, error)

func GetMyAccountIntegrationsEvents

func GetMyAccountIntegrationsEvents(integrationId primitive.ObjectID) ([]v2.IntegrationEventSchema, error)

func GetMyAccountUsers

func GetMyAccountUsers(theAccount *models.AccountSchema) (*[]models.UserSchema, error)

func GetMyUser

func GetMyUser(id primitive.ObjectID, externalId string, email string, username string) (*models.UserSchema, error)

func GetMyUserAccount

func GetMyUserAccount(theUser *models.UserSchema) (*models.AccountSchema, error)

func GetMyUserAccountAgents

func GetMyUserAccountAgents(theAccount *modelsv2.AccountSchema, agentId primitive.ObjectID) ([]*modelsv2.AgentSchema, error)

func GetMyUserLinkedAccounts

func GetMyUserLinkedAccounts(theUser *models.UserSchema) (*[]models.AccountSchema, error)

func InitIntegrationService

func InitIntegrationService() error

func InitModService

func InitModService()

func InitWorkflowService

func InitWorkflowService()

func InstallMod

func InstallMod(theAgent *modelsv2.AgentSchema, modReference string, version string) error

func JoinAccount

func JoinAccount(theUser *models.UserSchema, joinCode string) error

func ProcessWorkflow

func ProcessWorkflow(workflow *v2.WorkflowSchema) error

func ProcessWorkflows

func ProcessWorkflows() error

func PurgeAgentStats

func PurgeAgentStats() error

func RegisterWorkflowAction

func RegisterWorkflowAction(name string, handler v2.IWorkflowAction)

func ShutdownIntegrationService

func ShutdownIntegrationService() error

func ShutdownModService

func ShutdownModService() error

func ShutdownWorkflowService

func ShutdownWorkflowService() error

func SwitchAccount

func SwitchAccount(theUser *models.UserSchema, accountId primitive.ObjectID) error

func UninstallMod

func UninstallMod(theAgent *modelsv2.AgentSchema, modReference string) error

func UpdateAccountIntegration

func UpdateAccountIntegration(integrationId primitive.ObjectID, name string, integrationType models.IntegrationType, url string, eventTypes []models.IntegrationEventType) error

func UpdateAgentSettings

func UpdateAgentSettings(theAccount *modelsv2.AccountSchema, PostData *types.APIUpdateServerSettingsRequest) error

func UpdateMod

func UpdateMod(theAgent *modelsv2.AgentSchema, modReference string) error

func UpdateModsInDB

func UpdateModsInDB() error

func UpdateUserProfilePicture

func UpdateUserProfilePicture(theUser *models.UserSchema, avatarUrl string) error

func ValidateStatus

func ValidateStatus(obj *v2.WorkflowSchema)

Types

type ClaimServerAction

type ClaimServerAction struct{}

func (ClaimServerAction) Execute

func (a ClaimServerAction) Execute(action *v2.WorkflowAction, d interface{}, theAccount *v2.AccountSchema) error

type CreateAgentAction

type CreateAgentAction struct{}

func (CreateAgentAction) Execute

func (a CreateAgentAction) Execute(action *v2.WorkflowAction, d interface{}, theAccount *v2.AccountSchema) error

type InstallServerAction

type InstallServerAction struct{}

func (InstallServerAction) Execute

func (a InstallServerAction) Execute(action *v2.WorkflowAction, d interface{}, theAccount *v2.AccountSchema) error

type StartServerAction

type StartServerAction struct{}

func (StartServerAction) Execute

func (a StartServerAction) Execute(action *v2.WorkflowAction, d interface{}, theAccount *v2.AccountSchema) error

type WaitForInstallAction

type WaitForInstallAction struct{}

func (WaitForInstallAction) Execute

func (a WaitForInstallAction) Execute(action *v2.WorkflowAction, d interface{}, theAccount *v2.AccountSchema) error

type WaitForOnlineAction

type WaitForOnlineAction struct{}

func (WaitForOnlineAction) Execute

func (a WaitForOnlineAction) Execute(action *v2.WorkflowAction, d interface{}, theAccount *v2.AccountSchema) error

type WaitForRunningAction

type WaitForRunningAction struct{}

func (WaitForRunningAction) Execute

func (a WaitForRunningAction) Execute(action *v2.WorkflowAction, d interface{}, theAccount *v2.AccountSchema) error

Jump to

Keyboard shortcuts

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