neo4j

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeBasicAuth    = "BasicAuth"
	TypeKerberosAuth = "KerberosAuth"
	TypeBearerAuth   = "BearerAuth"
)
View Source
const EnvPrefix = "NEO4J"

EnvPrefix environment prefix for gremlin config

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	neo4j.DriverWithContext
	// contains filtered or unexported fields
}

func GetConnection

func GetConnection(
	ctx context.Context,
	cfg *ConnectionConfig,
) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

type ConnectionConfig

type ConnectionConfig struct {
	Login    string `env:"_LOGIN" envDefault:"neo4j"`
	Password string `env:"_PASSWORD" envDefault:""`
	Realm    string `env:"_REALM" envDefault:""`
	Ticket   string `env:"_TICKET" envDefault:""`
	Token    string `env:"_TOKEN" envDefault:""`
	Host     string `env:"_HOST" envDefault:"neo4j://127.0.0.1:8080"`
	TypeAuth string `env:"_AUTH" envDefault:"NoAuth"`
}

ConnectionConfig contains required data for gremlin

func GetConnectionConfigFromEnv

func GetConnectionConfigFromEnv() (*ConnectionConfig, error)

GetConnectionConfigFromEnv return aerospike configs bases on environment variables

func (*ConnectionConfig) TokenManager

func (c *ConnectionConfig) TokenManager(m auth.TokenManager) auth.TokenManager

Jump to

Keyboard shortcuts

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