constants

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: Apache-2.0 Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package constants provides application-wide constant definitions.

Index

Constants

View Source
const (
	ArticleTypeEmailExternal        = 1
	ArticleTypeEmailInternal        = 2
	ArticleTypeEmailNotificationExt = 3
	ArticleTypeEmailNotificationInt = 4
	ArticleTypePhone                = 5
	ArticleTypeFax                  = 6
	ArticleTypeSMS                  = 7
	ArticleTypeWebRequest           = 8
	ArticleTypeNoteInternal         = 9
	ArticleTypeNoteExternal         = 10
	ArticleTypeNoteReport           = 11
	ArticleTypeChatExternal         = 12
	ArticleTypeChatInternal         = 13
)

Article type IDs are GoatFlow's API vocabulary for "what kind of article is this". They are NOT stored: the OTRS 6+ schema persists an article as communication_channel_id + is_visible_for_customer, and internal/core/channel_mapping.go is the single translation between the two. The IDs MUST remain stable because API clients send them.

View Source
const (
	ArticleSenderAgent    = 1
	ArticleSenderSystem   = 2
	ArticleSenderCustomer = 3
)

Sender (author/origin) type IDs.

View Source
const (
	CommunicationChannelEmail    = 1
	CommunicationChannelPhone    = 2
	CommunicationChannelInternal = 3
	CommunicationChannelChat     = 4
)

Communication channel IDs seeded by migrations/*/000002_minimal_data (table communication_channel).

View Source
const (
	DefaultSessionTimeout     = 57600 // 16 hours total lifetime
	DefaultSessionIdleTimeout = 7200  // 2 hours idle window
	MaxSessionTimeout         = 604800
	MinSessionTimeout         = 3600
	MinSessionIdleTimeout     = 300
	RefreshTokenTimeout       = 604800
	SessionWarningTime        = 300
)

Session timeout constants (in seconds).

Variables

View Source
var ArticleTypesMetadata = map[int]ArticleTypeMeta{
	ArticleTypeEmailExternal:        {ID: ArticleTypeEmailExternal, Name: "email-external", CustomerVisible: true, UserSelectable: true},
	ArticleTypeEmailInternal:        {ID: ArticleTypeEmailInternal, Name: "email-internal", CustomerVisible: false, UserSelectable: false, InternalOnly: true},
	ArticleTypeEmailNotificationExt: {ID: ArticleTypeEmailNotificationExt, Name: "email-notification-ext", CustomerVisible: true, UserSelectable: false},
	ArticleTypeEmailNotificationInt: {ID: ArticleTypeEmailNotificationInt, Name: "email-notification-int", CustomerVisible: false, UserSelectable: false, InternalOnly: true},
	ArticleTypePhone:                {ID: ArticleTypePhone, Name: "phone", CustomerVisible: true, UserSelectable: true},
	ArticleTypeFax:                  {ID: ArticleTypeFax, Name: "fax", CustomerVisible: true, UserSelectable: false},
	ArticleTypeSMS:                  {ID: ArticleTypeSMS, Name: "sms", CustomerVisible: true, UserSelectable: false},
	ArticleTypeWebRequest:           {ID: ArticleTypeWebRequest, Name: "webrequest", CustomerVisible: true, UserSelectable: false},
	ArticleTypeNoteInternal:         {ID: ArticleTypeNoteInternal, Name: "note-internal", CustomerVisible: false, UserSelectable: true, InternalOnly: true},
	ArticleTypeNoteExternal:         {ID: ArticleTypeNoteExternal, Name: "note-external", CustomerVisible: true, UserSelectable: true},
	ArticleTypeNoteReport:           {ID: ArticleTypeNoteReport, Name: "note-report", CustomerVisible: false, UserSelectable: false, InternalOnly: true},
	ArticleTypeChatExternal:         {ID: ArticleTypeChatExternal, Name: "chat-external", CustomerVisible: true, UserSelectable: false},
	ArticleTypeChatInternal:         {ID: ArticleTypeChatInternal, Name: "chat-internal", CustomerVisible: false, UserSelectable: false, InternalOnly: true},
}

ArticleTypesMetadata provides lookup by ID.

InteractionTypeOrdering is the order for UI selection.

View Source
var SessionTimeoutOptions = map[string]int{
	"System Default": 0,
	"1 hour":         3600,
	"2 hours":        7200,
	"4 hours":        14400,
	"8 hours":        28800,
	"16 hours":       57600,
	"24 hours":       86400,
	"3 days":         259200,
	"7 days":         604800,
}

Predefined timeout options for user preferences (in seconds).

Functions

This section is empty.

Types

type ArticleTypeMeta

type ArticleTypeMeta struct {
	ID              int
	Name            string
	CustomerVisible bool // default visibility
	UserSelectable  bool // can appear in UI selection list
	InternalOnly    bool // never customer visible regardless of flag
}

ArticleTypeMeta holds metadata for each article type.

type InteractionType

type InteractionType string

InteractionType is a high-level UI-driven abstraction used to map user intent to a concrete article type + visibility rules. This keeps handler logic simple and centralized.

const (
	InteractionEmail        InteractionType = "email"
	InteractionPhone        InteractionType = "phone"
	InteractionInternalNote InteractionType = "internal_note"
	InteractionExternalNote InteractionType = "external_note" // may be phased in later
)

Jump to

Keyboard shortcuts

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