coredb

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func New

func New(session db.Session, vendor string) *DB

func (*DB) AddBlob

func (d *DB) AddBlob(sess db.Session, tenantId string, hash string) error

func (*DB) AddDomain

func (d *DB) AddDomain(domain *entities.TenantDomain) (int64, error)

func (*DB) AddSystemEvent

func (d *DB) AddSystemEvent(data *entities.SystemEvent) error

func (*DB) AddSystemKV

func (d *DB) AddSystemKV(tenantId string, data *entities.SystemKV) error

func (*DB) AddTargetApp

func (d *DB) AddTargetApp(data *entities.TargetApp) (int64, error)

func (*DB) AddTargetHook

func (d *DB) AddTargetHook(data *entities.TargetHook) (int64, error)

func (*DB) AddTenant

func (d *DB) AddTenant(tenant *entities.Tenant) error

func (*DB) AddUser

func (d *DB) AddUser(user *entities.User, data *entities.UserData) error

func (*DB) AddUserDevice

func (d *DB) AddUserDevice(tenantId string, user string, data *entities.UserDevice) error

func (*DB) AddUserGroup

func (d *DB) AddUserGroup(group *entities.UserGroup) error

func (*DB) AddUserGroupAuth

func (d *DB) AddUserGroupAuth(data *entities.UserGroupAuth) error

func (*DB) AddUserGroupData

func (d *DB) AddUserGroupData(data *entities.UserGroupData) error

func (*DB) AddUserMessage

func (d *DB) AddUserMessage(msg *entities.UserMessage) (int64, error)

func (*DB) AgentDel

func (d *DB) AgentDel(tenantId, pid, agentId string) error

func (*DB) AgentExtensionDel

func (d *DB) AgentExtensionDel(tenantId, pid, aid string, id int64) error

func (*DB) AgentExtensionGet

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

func (*DB) AgentExtensionList

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

func (*DB) AgentExtensionListByPlug

func (d *DB) AgentExtensionListByPlug(tenantId, pid string) ([]*entities.AgentExtension, error)

func (*DB) AgentExtensionNew

func (d *DB) AgentExtensionNew(tenantId string, data *entities.AgentExtension) error

func (*DB) AgentExtensionUpdate

func (d *DB) AgentExtensionUpdate(tenantId, pid, aid string, id int64, data map[string]interface{}) error

func (*DB) AgentGet

func (d *DB) AgentGet(tenantId, pid, id string) (*entities.Agent, error)

func (*DB) AgentLinkDel

func (d *DB) AgentLinkDel(tenantId, pid, aid string, id int64) error

func (*DB) AgentLinkGet

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

func (*DB) AgentLinkListByPlug

func (d *DB) AgentLinkListByPlug(tenantId, pid string) ([]*entities.AgentLink, error)

func (*DB) AgentLinkListReverse

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

func (*DB) AgentLinkNew

func (d *DB) AgentLinkNew(tenantId string, data *entities.AgentLink) error

func (*DB) AgentLinkUpdate

func (d *DB) AgentLinkUpdate(tenantId, pid, aid string, id int64, data map[string]interface{}) error

func (*DB) AgentList

func (d *DB) AgentList(tenantId, pid string) ([]*entities.Agent, error)

func (*DB) AgentNew

func (d *DB) AgentNew(tenantId string, data *entities.Agent) error

func (*DB) AgentResourceDel

func (d *DB) AgentResourceDel(tenantId, pid, aid, slug string) error

func (*DB) AgentResourceGet

func (d *DB) AgentResourceGet(tenantId, pid, aid, slug string) (*entities.AgentResource, error)

func (*DB) AgentResourceList

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

func (*DB) AgentResourceNew

func (d *DB) AgentResourceNew(tenantId string, data *entities.AgentResource) error

func (*DB) AgentResourceUpdate

func (d *DB) AgentResourceUpdate(tenantId, pid, aid, slug string, data map[string]interface{}) error

func (*DB) AgentUpdate

func (d *DB) AgentUpdate(tenantId, pid, id string, data map[string]interface{}) error

func (*DB) BprintDel

func (d *DB) BprintDel(tenantId, id string) error

func (*DB) BprintGet

func (d *DB) BprintGet(tenantId, id string) (*entities.BPrint, error)

func (*DB) BprintList

func (d *DB) BprintList(tenantId, group string) ([]*entities.BPrint, error)

func (*DB) BprintNew

func (d *DB) BprintNew(tenantId string, et *entities.BPrint) error

func (*DB) BprintUpdate

func (d *DB) BprintUpdate(tenantId, id string, data map[string]interface{}) error

func (*DB) DeleteUserMessages

func (d *DB) DeleteUserMessages(tenantId, userId string, id []int64) error

func (*DB) Execute

func (d *DB) Execute(qstr string) error

func (*DB) GetDomain

func (d *DB) GetDomain(tenantId string, id int64) (*entities.TenantDomain, error)

func (*DB) GetDomainByName

func (d *DB) GetDomainByName(tenantId string, name string) (*entities.TenantDomain, error)

func (*DB) GetFlowMap

func (d *DB) GetFlowMap(tenantId string) (*flowmap.Data, error)

func (*DB) GetInnerDriver

func (d *DB) GetInnerDriver() interface{}

func (*DB) GetSystemKV

func (d *DB) GetSystemKV(tenantId, key, ktype string) (*entities.SystemKV, error)

func (*DB) GetTargetApp

func (d *DB) GetTargetApp(tenantId, ttype string, id int64) (*entities.TargetApp, error)

func (*DB) GetTargetHook

func (d *DB) GetTargetHook(tenantId, ttype string, id int64) (*entities.TargetHook, error)

func (*DB) GetTenant

func (d *DB) GetTenant(slug string) (*entities.Tenant, error)

func (*DB) GetUserByEmail

func (d *DB) GetUserByEmail(tenantId string, email string) (*entities.User, error)

func (*DB) GetUserByID

func (d *DB) GetUserByID(tenantId string, username string) (*entities.User, error)

func (*DB) GetUserData

func (d *DB) GetUserData(tenantId string, slug string) (*entities.UserData, error)

func (*DB) GetUserDevice

func (d *DB) GetUserDevice(tenantId string, user string, id int64) (*entities.UserDevice, error)

func (*DB) GetUserGroup

func (d *DB) GetUserGroup(tenantId string, slug string) (*entities.UserGroup, error)

func (*DB) GetUserGroupAuth

func (d *DB) GetUserGroupAuth(tenantId string, gslug string, id int64) (*entities.UserGroupAuth, error)

func (*DB) GetUserGroupData

func (d *DB) GetUserGroupData(tenantId string, gslug string, id int64) (*entities.UserGroupData, error)

func (*DB) ListDomain

func (d *DB) ListDomain(tenantId string) ([]*entities.TenantDomain, error)

func (*DB) ListResourcePairs

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

func (*DB) ListSystemEvent

func (d *DB) ListSystemEvent(last int64) ([]*entities.SystemEvent, error)

func (*DB) ListSystemKV

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

func (*DB) ListTargetApp

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

func (*DB) ListTargetAppByPlug

func (d *DB) ListTargetAppByPlug(tenantId, plug string) ([]*entities.TargetApp, error)

func (*DB) ListTargetAppByType

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

func (*DB) ListTargetAppByUgroup

func (d *DB) ListTargetAppByUgroup(tenantId, ugroup string) ([]*entities.TargetApp, error)

func (*DB) ListTargetHook

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

func (*DB) ListTargetHookByPlug

func (d *DB) ListTargetHookByPlug(tenantId, plug string) ([]*entities.TargetHook, error)

func (*DB) ListTargetHookByType

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

func (*DB) ListTenant

func (d *DB) ListTenant() ([]*entities.Tenant, error)

func (*DB) ListUserDevice

func (d *DB) ListUserDevice(tenantId string, user string) ([]*entities.UserDevice, error)

func (*DB) ListUserGroupAuth

func (d *DB) ListUserGroupAuth(tenantId string, gslug string) ([]*entities.UserGroupAuth, error)

func (*DB) ListUserGroupData

func (d *DB) ListUserGroupData(tenantId string, gslug string) ([]*entities.UserGroupData, error)

func (*DB) ListUserGroups

func (d *DB) ListUserGroups(tenantId string) ([]*entities.UserGroup, error)

func (*DB) ListUserMessages

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

func (*DB) ListUsers

func (d *DB) ListUsers(tenantId string) ([]*entities.User, error)

func (*DB) ListUsersByGroup

func (d *DB) ListUsersByGroup(tenantId string, groupid string) ([]*entities.User, error)

func (*DB) ListUsersMulti

func (d *DB) ListUsersMulti(tenantId string, users ...string) ([]*entities.User, error)

func (*DB) Ping

func (d *DB) Ping() error

func (*DB) PlugDel

func (d *DB) PlugDel(tenantId, pid string) error

func (*DB) PlugGet

func (d *DB) PlugGet(tenantId, pid string) (*entities.Plug, error)

func (*DB) PlugList

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

func (*DB) PlugListByBprint

func (d *DB) PlugListByBprint(tenantId, bprint string) ([]*entities.Plug, error)

func (*DB) PlugNew

func (d *DB) PlugNew(tenantId string, pg *entities.Plug) error

func (*DB) PlugUpdate

func (d *DB) PlugUpdate(tenantId string, id string, data map[string]interface{}) error

func (*DB) QuerySystemEvent

func (d *DB) QuerySystemEvent(query store.EventQuery) ([]*entities.SystemEvent, error)

func (*DB) ReadUserMessages

func (d *DB) ReadUserMessages(tenantId, userId string, id []int64) error

func (*DB) RemoveBlob

func (d *DB) RemoveBlob(sess db.Session, tenantId string, hash string) error

func (*DB) RemoveDomain

func (d *DB) RemoveDomain(tenantId string, id int64) error

func (*DB) RemoveSystemEvent

func (d *DB) RemoveSystemEvent(id int64) error

func (*DB) RemoveSystemKV

func (d *DB) RemoveSystemKV(tenantId, key, ktype string) error

func (*DB) RemoveTargetApp

func (d *DB) RemoveTargetApp(tenantId, ttype string, id int64) error

func (*DB) RemoveTargetHook

func (d *DB) RemoveTargetHook(tenantId, ttype string, id int64) error

func (*DB) RemoveTenant

func (d *DB) RemoveTenant(slug string) error

func (*DB) RemoveUser

func (d *DB) RemoveUser(tenantId string, username string) error

func (*DB) RemoveUserDevice

func (d *DB) RemoveUserDevice(tenantId string, user string, id int64) error

func (*DB) RemoveUserGroup

func (d *DB) RemoveUserGroup(tenantId string, slug string) error

func (*DB) RemoveUserGroupAuth

func (d *DB) RemoveUserGroupAuth(tenantId, gslug string, id int64) error

func (*DB) RemoveUserGroupData

func (d *DB) RemoveUserGroupData(tenantId, gslug string, id int64) error

func (*DB) RemoveUserMessage

func (d *DB) RemoveUserMessage(tenantId string, userId string, id int64) error

func (*DB) RepoDel

func (d *DB) RepoDel(tenantId string, id int64) error

func (*DB) RepoGet

func (d *DB) RepoGet(tenantId string, id int64) (*entities.Repo, error)

func (*DB) RepoList

func (d *DB) RepoList(tenantId string) ([]*entities.Repo, error)

func (*DB) RepoNew

func (d *DB) RepoNew(tenantId string, data *entities.Repo) error

func (*DB) RepoUpdate

func (d *DB) RepoUpdate(tenantId string, id int64, data map[string]interface{}) error

func (*DB) ResourceDel

func (d *DB) ResourceDel(tenantId, rid string) error

func (*DB) ResourceGet

func (d *DB) ResourceGet(tenantId, rid string) (*entities.Resource, error)

func (*DB) ResourceList

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

func (*DB) ResourceNew

func (d *DB) ResourceNew(tenantId string, obj *entities.Resource) error

func (*DB) ResourceUpdate

func (d *DB) ResourceUpdate(tenantId string, id string, data map[string]interface{}) error

func (*DB) ResourcesByTarget

func (d *DB) ResourcesByTarget(tenantId string, target string) ([]*entities.Resource, error)

func (*DB) ResourcesMulti

func (d *DB) ResourcesMulti(tenantId string, rids ...string) ([]*entities.Resource, error)

func (*DB) UpdateDomain

func (d *DB) UpdateDomain(tenantId string, id int64, data map[string]interface{}) error

func (*DB) UpdateSystemKV

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

func (*DB) UpdateTargetApp

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

func (*DB) UpdateTargetHook

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

func (*DB) UpdateTenant

func (d *DB) UpdateTenant(slug string, data map[string]interface{}) error

func (*DB) UpdateUser

func (d *DB) UpdateUser(tenantId, user string, data map[string]interface{}) error

func (*DB) UpdateUserData

func (d *DB) UpdateUserData(tenantId, slug string, data map[string]interface{}) error

func (*DB) UpdateUserDevice

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

func (*DB) UpdateUserGroup

func (d *DB) UpdateUserGroup(tenantId, slug string, data map[string]interface{}) error

func (*DB) UpdateUserGroupAuth

func (d *DB) UpdateUserGroupAuth(tenantId string, gslug string, id int64, data map[string]interface{}) error

func (*DB) UpdateUserGroupData

func (d *DB) UpdateUserGroupData(tenantId string, gslug string, id int64, data map[string]interface{}) error

func (*DB) UserMessageSetRead

func (d *DB) UserMessageSetRead(tenantId, user string, id int64) error

Jump to

Keyboard shortcuts

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