orientdb

package module
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithRootPassword

func WithRootPassword(password string) testcontainers.CustomizeRequestOption

WithRootPassword sets the root password for the OrientDB container via the ORIENTDB_ROOT_PASSWORD environment variable.

Types

type Container

type Container struct {
	testcontainers.Container
}

Container represents the OrientDB container type used in the module.

func Run

Run creates an instance of the OrientDB container type.

Example
package main

import (
	"context"
	"fmt"
	"log"

	"github.com/testcontainers/testcontainers-go"
	"github.com/testcontainers/testcontainers-go/modules/orientdb"
)

func main() {
	// runOrientDB {
	ctx := context.Background()

	orientdbContainer, err := orientdb.Run(ctx, "orientdb:3.2",
		orientdb.WithRootPassword("rootpwd"),
	)
	defer func() {
		if err := testcontainers.TerminateContainer(orientdbContainer); err != nil {
			log.Printf("failed to terminate container: %s", err)
		}
	}()
	if err != nil {
		log.Printf("failed to start container: %s", err)
		return
	}
	// }

	state, err := orientdbContainer.State(ctx)
	if err != nil {
		log.Printf("failed to get container state: %s", err)
		return
	}

	fmt.Println(state.Running)

}
Output:
true

func (*Container) ServerURL

func (c *Container) ServerURL(ctx context.Context) (string, error)

ServerURL returns the OrientDB binary remote protocol URL for Java/JDBC clients, in the format "remote:<host>:<port>".

func (*Container) StudioURL

func (c *Container) StudioURL(ctx context.Context) (string, error)

StudioURL returns the OrientDB Studio web UI URL, in the format "http://<host>:<port>".

Jump to

Keyboard shortcuts

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