mongo

package
v0.0.0-...-05c855c Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(id string, ident string, col string) error

Delete removes the given id from the given collection

func DeleteVPN

func DeleteVPN(id string, col string) error

DeleteVPN removes the given id from the given collection

func Deserialize

func Deserialize(id string, parm string, col string, t reflect.Type) (interface{}, error)

Deserialize read interface from disk

func GetDevicesForPushNotifications

func GetDevicesForPushNotifications() ([]*model.Device, error)

GetDevicesForPushNotifications from MongoDB

func Initialize

func Initialize() error

Initialize the mongo db and create the indexes

func ReadAccountForUser

func ReadAccountForUser(email string, accountid string) (*model.Account, error)

ReadAccountForUser from MongoDB

func ReadAllAccounts

func ReadAllAccounts(email string) ([]*model.Account, error)

ReadAllAccounts from MongoDB

func ReadAllAccountsForID

func ReadAllAccountsForID(id string) ([]*model.Account, error)

ReadAllAccountsForID from MongoDB

func ReadAllDevices

func ReadAllDevices(param string, id string) ([]*model.Device, error)

ReadAllDevices from MongoDB

func ReadAllNetworks

func ReadAllNetworks(param string, id string) ([]*model.Network, error)

ReadAllNetworks from MongoDB

func ReadAllServers

func ReadAllServers() ([]*model.Server, error)

ReadAllServers from MongoDB

func ReadAllServices

func ReadAllServices(accountid string) ([]*model.Service, error)

ReadAllServices from MongoDB

func ReadAllSubscriptions

func ReadAllSubscriptions(accountid string) ([]*model.Subscription, error)

ReadAllSubscriptions from MongoDB

func ReadAllUsers

func ReadAllUsers() []*model.User

ReadAllUsers from MongoDB

func ReadAllVPNs

func ReadAllVPNs(param string, id string) ([]*model.VPN, error)

ReadAllHosts from MongoDB

func ReadDevicesAndVPNsForAccount

func ReadDevicesAndVPNsForAccount(accountid string) ([]*model.Device, error)

ReadDevicesAndVPNsForAccount

func ReadServiceHost

func ReadServiceHost(id string) ([]*model.Service, error)

ReadServiceHost from MongoDB

func ReadServices

func ReadServices(param string, id string) ([]*model.Service, error)

ReadAllServices from MongoDB

func ReadVPNsforNetwork

func ReadVPNsforNetwork(netid string) ([]*model.VPN, error)

ReadVPNsforNetwork from MongoDB

func Serialize

func Serialize(id string, parm string, col string, c interface{}) error

Serialize write interface to disk

func UpsertUser

func UpsertUser(user *model.User) error

UpsertUser to MongoDB

Types

This section is empty.

Jump to

Keyboard shortcuts

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