entity

package
v1.0.2 Latest Latest
Warning

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

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

README

Entity

That agnostic implementation to wrap common operations with single entity

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAttributeNotFound = errors.New("not found attribute")

Functions

This section is empty.

Types

type Operation

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

func NewOperation

func NewOperation(
	client aerospike.Namespace,
	setName string,
	pk interface{},
	sendKey bool,
	expiration uint32,
) *Operation

func (*Operation) Execute

func (h *Operation) Execute(operations []*as.Operation) error

func (*Operation) Exists

func (h *Operation) Exists() (bool, as.Error)

func (*Operation) Get

func (h *Operation) Get(bins ...string) (*as.Record, error)

func (*Operation) GetBin

func (h *Operation) GetBin(binName string) (interface{}, error)

func (*Operation) GetNamespace

func (h *Operation) GetNamespace() aerospike.Namespace

type Operations

type Operations interface {
	Execute([]*as.Operation) error
	GetNamespace() aerospike.Namespace
	Get(bins ...string) (*as.Record, error)
	GetBin(binName string) (interface{}, error)
	Exists() (bool, as.Error)
}

Directories

Path Synopsis
Package mock_entity is a generated GoMock package.
Package mock_entity is a generated GoMock package.

Jump to

Keyboard shortcuts

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