customAttribute

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package customAttribute handles the management of custom attributes for contacts and conversations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func New

func New(opts Opts) (*Manager, error)

New creates and returns a new instance of the Manager.

func (*Manager) Create

Create creates a new custom attribute.

func (*Manager) Delete

func (m *Manager) Delete(id int) error

Delete deletes a custom attribute by ID.

func (*Manager) Get

func (m *Manager) Get(id int) (models.CustomAttribute, error)

Get retrieves a custom attribute by ID.

func (*Manager) GetAll

func (m *Manager) GetAll(appliesTo string) ([]models.CustomAttribute, error)

GetAll retrieves all custom attributes.

func (*Manager) Update

func (m *Manager) Update(id int, attr models.CustomAttribute) (models.CustomAttribute, error)

Update updates a custom attribute by ID.

type Opts

type Opts struct {
	DB   *sqlx.DB
	Lo   *logf.Logger
	I18n *i18n.I18n
}

Opts contains options for initializing the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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