Documentation
¶
Index ¶
- Variables
- type BasicOps
- type BitwiseOps
- type CountOps
- type FieldOps
- type Manager
- func (m *Manager) BitCount(key string, start, end int64) (int64, error)
- func (m *Manager) BitField(key string, commands []models.BitFieldCommand) ([]int64, error)
- func (m *Manager) BitFieldRO(key string, commands []models.BitFieldCommand) ([]int64, error)
- func (m *Manager) BitOp(operation string, destkey string, keys ...string) (int64, error)
- func (m *Manager) BitPos(key string, bit int, start, end int64, reverse bool) (int64, error)
- func (m *Manager) GetBit(key string, offset int64) (int, error)
- func (m *Manager) GetBitmap(key string) []byte
- func (m *Manager) SetBit(key string, offset int64, value int) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrOutOfBoundsOffset = fmt.Errorf("ERR requested bit offset is out of bounds")
ErrOutOfBoundsOffset is returned when the requested bit offset is beyond the bitmap's bounds.
Functions ¶
This section is empty.
Types ¶
type BasicOps ¶
type BasicOps struct {
// contains filtered or unexported fields
}
BasicOps handles basic bitmap operations
func NewBasicOps ¶
NewBasicOps creates a new BasicOps instance
func (*BasicOps) CreateBitmap ¶
CreateBitmap creates a new bitmap of given size
func (*BasicOps) GetBit ¶
GetBit retrieves the bit value (0 or 1) at the given offset within the bitmap associated with the key. If the key is not found, it returns 0 and nil error. If the value associated with the key is not a byte slice, it returns an error. If the offset is beyond the bounds of the bitmap, it returns 0 and nil error.
type BitwiseOps ¶
type BitwiseOps struct {
// contains filtered or unexported fields
}
func NewBitwiseOps ¶
func NewBitwiseOps(basicOps *BasicOps) *BitwiseOps
type CountOps ¶
type CountOps struct {
// contains filtered or unexported fields
}
func NewCountOps ¶
type FieldOps ¶
type FieldOps struct {
// contains filtered or unexported fields
}
func NewFieldOps ¶
func (*FieldOps) BitFieldRO ¶
BitFieldRO executes read-only bitfield operations
Click to show internal directories.
Click to hide internal directories.