aerospike

package
v0.0.0-...-fc8cd90 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (interface{}, error)

New creates a new Aerospike instance

Types

type Aerospike

type Aerospike struct {

	// Access control parameters for Aerospike DB
	Username string `json:"username" mapstructure:"username" structs:"username"`
	Password string `json:"password" mapstructure:"password" structs:"password"`
	AuthMode string `json:"auth_mode" mapstructure:"auth_mode" structs:"auth_mode"`

	// Seed IP and Port for Aerospike DB
	DbHost string `json:"db_host" mapstructure:"db_host" structs:"db_host"`
	DbPort uint16 `json:"db_port" mapstructure:"db_port" structs:"db_port"`

	// Connection timeout
	Timeout uint16 `json:"timeout" mapstructure:"timeout" structs:"timeout"`

	// TLS Configurations for Aerospike DB
	CertFile          string `json:"cert_file" mapstructure:"cert_file" structs:"cert_file"`
	KeyFile           string `json:"key_file" mapstructure:"key_file" structs:"key_file"`
	KeyFilePassphrase string `json:"key_file_passphrase" mapstructure:"key_file_passphrase" structs:"key_file_passphrase"`
	TLSName           string `json:"tls_name" mapstructure:"tls_name" structs:"tls_name"`
	RootCA            string `json:"root_ca" mapstructure:"root_ca" structs:"root_ca"`

	// Other parameters
	RawConfig map[string]interface{}
	TypeName  string
	// contains filtered or unexported fields
}

Aerospike Object

func NewAerospike

func NewAerospike() *Aerospike

NewAerospike initializes Aerospike instance

func (*Aerospike) Close

func (a *Aerospike) Close() error

Close closes all client connections to Aerospike DB nodes

func (*Aerospike) DeleteUser

func (a *Aerospike) DeleteUser(ctx context.Context, delUserReq dbplugin.DeleteUserRequest) (dbplugin.DeleteUserResponse, error)

DeleteUser from the database.

func (*Aerospike) Initialize

func (a *Aerospike) Initialize(ctx context.Context, initReq dbplugin.InitializeRequest) (dbplugin.InitializeResponse, error)

Initialize the database plugin. Parses configuration, initializes Aerospike client and verifies the connections

func (*Aerospike) NewUser

func (a *Aerospike) NewUser(ctx context.Context, newUserReq dbplugin.NewUserRequest) (dbplugin.NewUserResponse, error)

NewUser creates a new user within the database.

func (*Aerospike) Type

func (a *Aerospike) Type() (string, error)

Type returns the name of the backend database

func (*Aerospike) UpdateUser

func (a *Aerospike) UpdateUser(ctx context.Context, updateUserReq dbplugin.UpdateUserRequest) (dbplugin.UpdateUserResponse, error)

UpdateUser updates an existing user within the database.

type NewUserStatement

type NewUserStatement struct {
	Roles []string `json:"roles"`
}

NewUserStatement Object

Jump to

Keyboard shortcuts

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