boolset

package
v4.0.0-...-0bb0ab8 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrValueNotSupported = errors.New("value not supported")
)

Functions

func Set

func Set[T constraints.Integer](flag T, enabled bool, bs *BooleanSet)

Set sets a BooleanSet value.

func Sets

func Sets[T constraints.Integer](val map[T]bool, bs *BooleanSet)

Sets set BooleanSet values in batch.

Types

type BooleanSet

type BooleanSet []byte

func FromString

func FromString(data string) (*BooleanSet, error)

FromString convert from base64 encoded boolset.

func (*BooleanSet) Enabled

func (b *BooleanSet) Enabled(flag int) bool

func (*BooleanSet) MarshalBinary

func (b *BooleanSet) MarshalBinary() (data []byte, err error)

func (*BooleanSet) Scan

func (b *BooleanSet) Scan(src any) error

Scan implements the sql.Scanner method.

func (*BooleanSet) String

func (b *BooleanSet) String() (data string, err error)

func (*BooleanSet) UnmarshalBinary

func (b *BooleanSet) UnmarshalBinary(data []byte) error

func (*BooleanSet) Value

func (b *BooleanSet) Value() (driver.Value, error)

Value implements the driver.Valuer method.

Jump to

Keyboard shortcuts

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