Documentation
¶
Index ¶
- Variables
- func AreSet(buf []byte, bitpos ...uint) (bool, error)
- type BitSet
- func (bs *BitSet) AreSet(bitpos ...uint) bool
- func (bs *BitSet) IsAllocated(bitpos uint) bool
- func (bs *BitSet) IsSet(bitpos uint) bool
- func (bs *BitSet) Len() uint
- func (bs *BitSet) Reset(bitpos uint)
- func (bs *BitSet) Scan(value interface{}) error
- func (bs *BitSet) Set(bitpos ...uint)
- func (bs *BitSet) String() string
- func (bs *BitSet) Valid() bool
- func (bs BitSet) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrParseFailed = errors.New("invalid character found")
ErrParseFailed returns if Parse function found character out of ranges 0..9, a..f, A..F
Functions ¶
Types ¶
type BitSet ¶
type BitSet struct {
// contains filtered or unexported fields
}
BitSet holds set of bits using slice of bytes.
func (*BitSet) AreSet ¶
AreSet returns true if every bit with position bit pos is equal 1. Return false if bitops or bs are empty.
func (*BitSet) IsAllocated ¶
IsAllocated returns true if space for the bit with position bitpos is allocated already.
func (*BitSet) IsSet ¶
IsSet returns true if bit with position bitpos is 1. Returns false if bitpos above maximal setted bitpos.
func (*BitSet) Scan ¶
Scan implements database/sql Scanner. It's expected that PostgresSQL type BIT VARYING is used.
func (*BitSet) String ¶
String returns hex representation of bit array. Every 8 bits as 2 hex digits.
Click to show internal directories.
Click to hide internal directories.