Documentation ¶
Index ¶
- type Attribute
- type AttributeType
- type AttributeTypeID
- type ListOption
- type NullAttributeTypeID
- type Repository
- func (s *Repository) Attribute(ctx context.Context, id int64) (bool, Attribute, error)
- func (s *Repository) AttributeTypes(ctx context.Context) ([]AttributeType, error)
- func (s *Repository) Attributes(ctx context.Context, zoneID int64, parentID int64) ([]Attribute, error)
- func (s *Repository) ListOptions(ctx context.Context, attributeID int64) ([]ListOption, error)
- func (s *Repository) TopUserBrands(ctx context.Context, userID int64, limit uint) ([]TopUserBrand, error)
- func (s *Repository) TotalValues(ctx context.Context) (int32, error)
- func (s *Repository) TotalZoneAttrs(ctx context.Context, zoneID int64) (int32, error)
- func (s *Repository) Units(ctx context.Context) ([]Unit, error)
- func (s *Repository) ZoneAttributes(ctx context.Context, zoneID int64) ([]ZoneAttribute, error)
- func (s *Repository) Zones(ctx context.Context) ([]Zone, error)
- type TopUserBrand
- type Unit
- type Zone
- type ZoneAttribute
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct { ID int64 `db:"id"` Name string `db:"name"` ParentID sql.NullInt64 `db:"parent_id"` Description sql.NullString `db:"description"` TypeID NullAttributeTypeID `db:"type_id"` UnitID sql.NullInt64 `db:"unit_id"` Multiple bool `db:"multiple"` Precision sql.NullInt32 `db:"precision"` }
type AttributeType ¶
type AttributeType struct { ID AttributeTypeID `db:"id"` Name string `db:"name"` }
type AttributeTypeID ¶
type AttributeTypeID int32
const ( TypeUnknown AttributeTypeID = 0 TypeString AttributeTypeID = 1 TypeInteger AttributeTypeID = 2 TypeFloat AttributeTypeID = 3 TypeText AttributeTypeID = 4 TypeBoolean AttributeTypeID = 5 TypeList AttributeTypeID = 6 TypeTree AttributeTypeID = 7 )
type ListOption ¶
type NullAttributeTypeID ¶
type NullAttributeTypeID struct { AttributeTypeID AttributeTypeID Valid bool // Valid is true if AttributeTypeID is not NULL }
func (*NullAttributeTypeID) Scan ¶
func (n *NullAttributeTypeID) Scan(value any) error
Scan implements the Scanner interface.
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository Main Object.
func NewRepository ¶
func NewRepository( db *goqu.Database, ) *Repository
NewRepository constructor.
func (*Repository) AttributeTypes ¶
func (s *Repository) AttributeTypes(ctx context.Context) ([]AttributeType, error)
func (*Repository) Attributes ¶
func (*Repository) ListOptions ¶
func (s *Repository) ListOptions(ctx context.Context, attributeID int64) ([]ListOption, error)
func (*Repository) TopUserBrands ¶ added in v1.76.0
func (s *Repository) TopUserBrands( ctx context.Context, userID int64, limit uint, ) ([]TopUserBrand, error)
func (*Repository) TotalValues ¶ added in v1.72.0
func (s *Repository) TotalValues(ctx context.Context) (int32, error)
func (*Repository) TotalZoneAttrs ¶ added in v1.72.0
func (*Repository) ZoneAttributes ¶
func (s *Repository) ZoneAttributes(ctx context.Context, zoneID int64) ([]ZoneAttribute, error)
type TopUserBrand ¶ added in v1.76.0
type ZoneAttribute ¶
Click to show internal directories.
Click to hide internal directories.