csat

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package csat contains the logic for managing CSAT.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCSATAlreadyExists = errors.New("CSAT already exists")
)

Functions

This section is empty.

Types

type Manager

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

Manager manages CSAT.

func New

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

New creates and returns a new instance of the Manager.

func (*Manager) Create

func (m *Manager) Create(conversationID int) (models.CSATResponse, error)

Create creates a new CSAT for the given conversation ID.

func (*Manager) Get

func (m *Manager) Get(uuid string) (models.CSATResponse, error)

Get retrieves the CSAT for the given UUID.

func (*Manager) MakePublicURL

func (m *Manager) MakePublicURL(appBaseURL, uuid string) string

MakePublicURL returns the public URL for the given CSAT UUID.

func (*Manager) UpdateResponse

func (m *Manager) UpdateResponse(uuid string, score int, feedback string) error

UpdateResponse updates the CSAT response for the given csat.

type Opts

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

Opts contains options for initializing the Manager.

Directories

Path Synopsis
package models has the models for the customer satisfaction survey responses.
package models has the models for the customer satisfaction survey responses.

Jump to

Keyboard shortcuts

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