corehub

package
v0.0.0-...-8c2001a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoreHub

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

func New

func New(coredb store.CoreDB) *CoreHub

func (*CoreHub) AddDomain

func (c *CoreHub) AddDomain(domain *entities.TenantDomain) (int64, error)

func (*CoreHub) AddSystemEvent

func (c *CoreHub) AddSystemEvent(data *entities.SystemEvent) error

func (*CoreHub) AddSystemKV

func (c *CoreHub) AddSystemKV(tenantId string, data *entities.SystemKV) error

func (*CoreHub) AddTargetApp

func (c *CoreHub) AddTargetApp(data *entities.TargetApp) (int64, error)

func (*CoreHub) AddTargetHook

func (c *CoreHub) AddTargetHook(data *entities.TargetHook) (int64, error)

func (*CoreHub) AddTenant

func (c *CoreHub) AddTenant(tenant *entities.Tenant) error

func (*CoreHub) AddUser

func (c *CoreHub) AddUser(user *entities.User, data *entities.UserData) error

func (*CoreHub) AddUserDevice

func (c *CoreHub) AddUserDevice(tenantId string, user string, data *entities.UserDevice) error

func (*CoreHub) AddUserGroup

func (c *CoreHub) AddUserGroup(ug *entities.UserGroup) error

func (*CoreHub) AddUserGroupAuth

func (c *CoreHub) AddUserGroupAuth(data *entities.UserGroupAuth) error

func (*CoreHub) AddUserGroupData

func (c *CoreHub) AddUserGroupData(data *entities.UserGroupData) error

func (*CoreHub) AddUserMessage

func (c *CoreHub) AddUserMessage(msg *entities.UserMessage) (int64, error)

func (*CoreHub) AgentDel

func (c *CoreHub) AgentDel(tenantId, pid, agentId string) error

func (*CoreHub) AgentExtensionDel

func (c *CoreHub) AgentExtensionDel(tenantId, pid, aid string, id int64) error

func (*CoreHub) AgentExtensionGet

func (c *CoreHub) AgentExtensionGet(tenantId, pid, aid string, id int64) (*entities.AgentExtension, error)

func (*CoreHub) AgentExtensionList

func (c *CoreHub) AgentExtensionList(tenantId, pid, aid string) ([]*entities.AgentExtension, error)

func (*CoreHub) AgentExtensionListByPlug

func (c *CoreHub) AgentExtensionListByPlug(tenantId, pid string) ([]*entities.AgentExtension, error)

func (*CoreHub) AgentExtensionNew

func (c *CoreHub) AgentExtensionNew(tenantId string, data *entities.AgentExtension) error

extension

func (*CoreHub) AgentExtensionUpdate

func (c *CoreHub) AgentExtensionUpdate(tenantId, pid, aid string, id int64, data map[string]any) error

func (*CoreHub) AgentGet

func (c *CoreHub) AgentGet(tenantId, pid, id string) (*entities.Agent, error)

func (*CoreHub) AgentLinkDel

func (c *CoreHub) AgentLinkDel(tenantId, pid, aid string, id int64) error

func (*CoreHub) AgentLinkGet

func (c *CoreHub) AgentLinkGet(tenantId, pid, aid string, id int64) (*entities.AgentLink, error)
func (c *CoreHub) AgentLinkList(tenantId, pid, aid string) ([]*entities.AgentLink, error)

func (*CoreHub) AgentLinkListByPlug

func (c *CoreHub) AgentLinkListByPlug(tenantId, pid string) ([]*entities.AgentLink, error)

func (*CoreHub) AgentLinkListReverse

func (c *CoreHub) AgentLinkListReverse(tenantId, pid, aid string) ([]*entities.AgentLink, error)

func (*CoreHub) AgentLinkNew

func (c *CoreHub) AgentLinkNew(tenantId string, data *entities.AgentLink) error

link

func (*CoreHub) AgentLinkUpdate

func (c *CoreHub) AgentLinkUpdate(tenantId, pid, aid string, id int64, data map[string]any) error

func (*CoreHub) AgentList

func (c *CoreHub) AgentList(tenantId, pid string) ([]*entities.Agent, error)

func (*CoreHub) AgentNew

func (c *CoreHub) AgentNew(tenantId string, data *entities.Agent) error

func (*CoreHub) AgentResourceDel

func (c *CoreHub) AgentResourceDel(tenantId, pid, aid, slug string) error

func (*CoreHub) AgentResourceGet

func (c *CoreHub) AgentResourceGet(tenantId, pid, aid, slug string) (*entities.AgentResource, error)

func (*CoreHub) AgentResourceList

func (c *CoreHub) AgentResourceList(tenantId, pid, aid string) ([]*entities.AgentResource, error)

func (*CoreHub) AgentResourceNew

func (c *CoreHub) AgentResourceNew(tenantId string, data *entities.AgentResource) error

resource

func (*CoreHub) AgentResourceUpdate

func (c *CoreHub) AgentResourceUpdate(tenantId, pid, aid, slug string, data map[string]any) error

func (*CoreHub) AgentUpdate

func (c *CoreHub) AgentUpdate(tenantId, pid, id string, data map[string]any) error

func (*CoreHub) BprintDel

func (c *CoreHub) BprintDel(tenantId, id string) error

func (*CoreHub) BprintGet

func (c *CoreHub) BprintGet(tenantId, id string) (*entities.BPrint, error)

func (*CoreHub) BprintList

func (c *CoreHub) BprintList(tenantId, group string) ([]*entities.BPrint, error)

func (*CoreHub) BprintNew

func (c *CoreHub) BprintNew(tenantId string, et *entities.BPrint) error

func (*CoreHub) BprintUpdate

func (c *CoreHub) BprintUpdate(tenantId, id string, data map[string]any) error

func (*CoreHub) DeleteUserMessages

func (c *CoreHub) DeleteUserMessages(tenantId, userId string, id []int64) error

func (*CoreHub) GetAuthZ

func (c *CoreHub) GetAuthZ(tenantId, group string) store.AuthZ

func (*CoreHub) GetDomain

func (c *CoreHub) GetDomain(tenantId string, id int64) (*entities.TenantDomain, error)

func (*CoreHub) GetDomainByName

func (c *CoreHub) GetDomainByName(tenantId string, name string) (*entities.TenantDomain, error)

func (*CoreHub) GetFlowMap

func (c *CoreHub) GetFlowMap(tenantId string) (*flowmap.Data, error)

func (*CoreHub) GetSystemKV

func (c *CoreHub) GetSystemKV(tenantId, key, ktype string) (*entities.SystemKV, error)

func (*CoreHub) GetTargetApp

func (c *CoreHub) GetTargetApp(tenantId, ttype string, id int64) (*entities.TargetApp, error)

func (*CoreHub) GetTargetHook

func (c *CoreHub) GetTargetHook(tenantId, ttype string, id int64) (*entities.TargetHook, error)

func (*CoreHub) GetTenant

func (c *CoreHub) GetTenant(tenant string) (*entities.Tenant, error)

func (*CoreHub) GetUserByEmail

func (c *CoreHub) GetUserByEmail(tenantId string, email string) (*entities.User, error)

func (*CoreHub) GetUserByID

func (c *CoreHub) GetUserByID(tenantId string, username string) (*entities.User, error)

func (*CoreHub) GetUserData

func (c *CoreHub) GetUserData(tenantId string, slug string) (*entities.UserData, error)

func (*CoreHub) GetUserDevice

func (c *CoreHub) GetUserDevice(tenantId string, user string, id int64) (*entities.UserDevice, error)

func (*CoreHub) GetUserGroup

func (c *CoreHub) GetUserGroup(tenantId string, slug string) (*entities.UserGroup, error)

func (*CoreHub) GetUserGroupAuth

func (c *CoreHub) GetUserGroupAuth(tenantId string, gslug string, id int64) (*entities.UserGroupAuth, error)

func (*CoreHub) GetUserGroupData

func (c *CoreHub) GetUserGroupData(tenantId string, gslug string, id int64) (*entities.UserGroupData, error)

func (*CoreHub) Inject

func (c *CoreHub) Inject(app xtypes.App)

func (*CoreHub) ListDomain

func (c *CoreHub) ListDomain(tenantId string) ([]*entities.TenantDomain, error)

func (*CoreHub) ListResourcePairs

func (c *CoreHub) ListResourcePairs(tenantId string, pid, aid string) ([]entities.ResourcePair, error)

func (*CoreHub) ListSystemEvent

func (c *CoreHub) ListSystemEvent(last int64) ([]*entities.SystemEvent, error)

func (*CoreHub) ListSystemKV

func (c *CoreHub) ListSystemKV(tenantId, ktype, prefix string, last int64) ([]*entities.SystemKV, error)

func (*CoreHub) ListTargetApp

func (c *CoreHub) ListTargetApp(tenantId string, cond map[string]any) ([]*entities.TargetApp, error)

func (*CoreHub) ListTargetAppByPlug

func (c *CoreHub) ListTargetAppByPlug(tenantId, plug string) ([]*entities.TargetApp, error)

func (*CoreHub) ListTargetAppByType

func (c *CoreHub) ListTargetAppByType(tenantId, ttype, target string) ([]*entities.TargetApp, error)

func (*CoreHub) ListTargetAppByUgroup

func (c *CoreHub) ListTargetAppByUgroup(tenantId, ugroup string) ([]*entities.TargetApp, error)

func (*CoreHub) ListTargetHook

func (c *CoreHub) ListTargetHook(tenantId string, cond map[string]any) ([]*entities.TargetHook, error)

func (*CoreHub) ListTargetHookByPlug

func (c *CoreHub) ListTargetHookByPlug(tenantId, plug string) ([]*entities.TargetHook, error)

func (*CoreHub) ListTargetHookByType

func (c *CoreHub) ListTargetHookByType(tenantId, ttype, target string) ([]*entities.TargetHook, error)

func (*CoreHub) ListTenant

func (c *CoreHub) ListTenant() ([]*entities.Tenant, error)

func (*CoreHub) ListUserDevice

func (c *CoreHub) ListUserDevice(tenantId string, user string) ([]*entities.UserDevice, error)

func (*CoreHub) ListUserGroupAuth

func (c *CoreHub) ListUserGroupAuth(tenantId string, gslug string) ([]*entities.UserGroupAuth, error)

func (*CoreHub) ListUserGroupData

func (c *CoreHub) ListUserGroupData(tenantId string, gslug string) ([]*entities.UserGroupData, error)

func (*CoreHub) ListUserGroups

func (c *CoreHub) ListUserGroups(tenantId string) ([]*entities.UserGroup, error)

func (*CoreHub) ListUserMessages

func (c *CoreHub) ListUserMessages(tenantId string, data *entities.UserMessageReq) ([]*entities.UserMessage, error)

func (*CoreHub) ListUsers

func (c *CoreHub) ListUsers(tenantId string) ([]*entities.User, error)

func (*CoreHub) ListUsersByGroup

func (c *CoreHub) ListUsersByGroup(tenantId, group string) ([]*entities.User, error)

func (*CoreHub) ListUsersMulti

func (c *CoreHub) ListUsersMulti(tenantId string, ids ...string) ([]*entities.User, error)

func (*CoreHub) Ping

func (c *CoreHub) Ping() error

func (*CoreHub) PlugDel

func (c *CoreHub) PlugDel(tenantId, pid string) error

func (*CoreHub) PlugGet

func (c *CoreHub) PlugGet(tenantId, pid string) (*entities.Plug, error)

func (*CoreHub) PlugList

func (c *CoreHub) PlugList(tenantId string, cond map[string]any) ([]*entities.Plug, error)

func (*CoreHub) PlugListByBprint

func (c *CoreHub) PlugListByBprint(tenantId, bid string) ([]*entities.Plug, error)

func (*CoreHub) PlugNew

func (c *CoreHub) PlugNew(tenantId string, pg *entities.Plug) error

func (*CoreHub) PlugUpdate

func (c *CoreHub) PlugUpdate(tenantId string, id string, data map[string]any) error

func (*CoreHub) QuerySystemEvent

func (c *CoreHub) QuerySystemEvent(query store.EventQuery) ([]*entities.SystemEvent, error)

func (*CoreHub) ReadUserMessages

func (c *CoreHub) ReadUserMessages(tenantId, userId string, id []int64) error

func (*CoreHub) RemoveDomain

func (c *CoreHub) RemoveDomain(tenantId string, id int64) error

func (*CoreHub) RemoveSystemEvent

func (c *CoreHub) RemoveSystemEvent(id int64) error

func (*CoreHub) RemoveSystemKV

func (c *CoreHub) RemoveSystemKV(tenantId, key, ktype string) error

func (*CoreHub) RemoveTargetApp

func (c *CoreHub) RemoveTargetApp(tenantId, ttype string, id int64) error

func (*CoreHub) RemoveTargetHook

func (c *CoreHub) RemoveTargetHook(tenantId, ttype string, id int64) error

func (*CoreHub) RemoveTenant

func (c *CoreHub) RemoveTenant(slug string) error

func (*CoreHub) RemoveUser

func (c *CoreHub) RemoveUser(tenantId string, username string) error

func (*CoreHub) RemoveUserDevice

func (c *CoreHub) RemoveUserDevice(tenantId string, user string, id int64) error

func (*CoreHub) RemoveUserGroup

func (c *CoreHub) RemoveUserGroup(tenantId string, ugslug string) error

func (*CoreHub) RemoveUserGroupAuth

func (c *CoreHub) RemoveUserGroupAuth(tenantId, gslug string, id int64) error

func (*CoreHub) RemoveUserGroupData

func (c *CoreHub) RemoveUserGroupData(tenantId, gslug string, id int64) error

func (*CoreHub) RemoveUserMessage

func (c *CoreHub) RemoveUserMessage(tenantId string, username string, id int64) error

func (*CoreHub) RepoDel

func (c *CoreHub) RepoDel(tenantId string, id int64) error

func (*CoreHub) RepoGet

func (c *CoreHub) RepoGet(tenantId string, id int64) (*entities.Repo, error)

func (*CoreHub) RepoList

func (c *CoreHub) RepoList(tenantId string) ([]*entities.Repo, error)

func (*CoreHub) RepoNew

func (c *CoreHub) RepoNew(tenantId string, data *entities.Repo) error

func (*CoreHub) RepoUpdate

func (c *CoreHub) RepoUpdate(tenantId string, id int64, data map[string]any) error

func (*CoreHub) ResourceDel

func (c *CoreHub) ResourceDel(tenantId, rid string) error

func (*CoreHub) ResourceGet

func (c *CoreHub) ResourceGet(tenantId, rid string) (*entities.Resource, error)

func (*CoreHub) ResourceList

func (c *CoreHub) ResourceList(tenantId string, cond map[string]any) ([]*entities.Resource, error)

func (*CoreHub) ResourceNew

func (c *CoreHub) ResourceNew(tenantId string, obj *entities.Resource) error

resource

func (*CoreHub) ResourceUpdate

func (c *CoreHub) ResourceUpdate(tenantId string, id string, data map[string]any) error

func (*CoreHub) ResourcesByTarget

func (c *CoreHub) ResourcesByTarget(tenantId string, target string) ([]*entities.Resource, error)

func (*CoreHub) ResourcesMulti

func (c *CoreHub) ResourcesMulti(tenantId string, rids ...string) ([]*entities.Resource, error)

func (*CoreHub) UpdateDomain

func (c *CoreHub) UpdateDomain(tenantId string, id int64, data map[string]any) error

func (*CoreHub) UpdateSystemKV

func (c *CoreHub) UpdateSystemKV(tenantId, key, ktype string, data map[string]any) error

func (*CoreHub) UpdateTargetApp

func (c *CoreHub) UpdateTargetApp(tenantId, ttype string, id int64, data map[string]any) error

func (*CoreHub) UpdateTargetHook

func (c *CoreHub) UpdateTargetHook(tenantId, ttype string, id int64, data map[string]any) error

func (*CoreHub) UpdateTenant

func (c *CoreHub) UpdateTenant(slug string, data map[string]any) error

func (*CoreHub) UpdateUser

func (c *CoreHub) UpdateUser(tenantId, user string, data map[string]any) error

func (*CoreHub) UpdateUserData

func (c *CoreHub) UpdateUserData(tenantId, slug string, data map[string]any) error

func (*CoreHub) UpdateUserDevice

func (c *CoreHub) UpdateUserDevice(tenantId string, user string, id int64, data map[string]any) error

func (*CoreHub) UpdateUserGroup

func (c *CoreHub) UpdateUserGroup(tenantId, slug string, data map[string]any) error

func (*CoreHub) UpdateUserGroupAuth

func (c *CoreHub) UpdateUserGroupAuth(tenantId string, gslug string, id int64, data map[string]any) error

func (*CoreHub) UpdateUserGroupData

func (c *CoreHub) UpdateUserGroupData(tenantId string, gslug string, id int64, data map[string]any) error

func (*CoreHub) UserMessageSetRead

func (c *CoreHub) UserMessageSetRead(tenantId, user string, id int64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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