api

package
v0.0.0-...-c5aacf0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCreateFunction

func CheckCreateFunction(connectionUri, name string)

func CheckDeleteFunction

func CheckDeleteFunction(connectionUri, name string)

func CreateAppRuntime

func CreateAppRuntime(namespace string, name string)

func CreateDatabase

func CreateDatabase(namespace string)

func CreateFunction

func CreateFunction(name, namespace string)

func CreateMongoDatabase

func CreateMongoDatabase()

func DeleteAppRuntime

func DeleteAppRuntime(namespace string, name string)

func DeleteFunction

func DeleteFunction(name, namespace string)

func GetAppRuntime

func GetAppRuntime(namespace string, name string) (*runtimev1.Runtime, error)

func GetMongoDbConnectionUri

func GetMongoDbConnectionUri() string

func GetMongoDbHostname

func GetMongoDbHostname() string

func InstallMongoDb

func InstallMongoDb(namespace string)

func UninstallMongoDb

func UninstallMongoDb(namespace string)

Types

type MongoManager

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

func NewMongoManager

func NewMongoManager(context context.Context, connectionURI string) (*MongoManager, error)

NewMongoManager creates a new MongoManager

func (*MongoManager) CreateDatabase

func (m *MongoManager) CreateDatabase(databaseName string, username string, password string) error

CreateDatabase creates the database returns the connection uri

func (*MongoManager) DatabaseExists

func (m *MongoManager) DatabaseExists(databaseName string) (bool, error)

DatabaseExists check if database exists

func (*MongoManager) Disconnect

func (m *MongoManager) Disconnect() error

Disconnect disconnects from the database

func (*MongoManager) RemoveUser

func (m *MongoManager) RemoveUser(databaseName string, username string) error

RemoveUser remove the database user

Jump to

Keyboard shortcuts

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