Full Mattermost server source with integrated Community Enterprise features. Includes vendor directory for offline/air-gapped builds. Structure: - enterprise-impl/: Enterprise feature implementations - enterprise-community/: Init files that register implementations - enterprise/: Bridge imports (community_imports.go) - vendor/: All dependencies for offline builds Build (online): go build ./cmd/mattermost Build (offline/air-gapped): go build -mod=vendor ./cmd/mattermost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 lines
1.1 KiB
Go
33 lines
1.1 KiB
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package model
|
|
|
|
// ValueType indicates whether a value is a literal or another attribute.
|
|
type ValueType int
|
|
|
|
const (
|
|
LiteralValue ValueType = iota
|
|
AttrValue
|
|
)
|
|
|
|
// Condition represents a single logical condition (e.g., user.attributes.Team == "Engineering").
|
|
type Condition struct {
|
|
// Left-hand side attribute selector (e.g., "user.attributes.Team").
|
|
Attribute string `json:"attribute"`
|
|
// The comparison operator.
|
|
Operator string `json:"operator"`
|
|
// Right-hand side value(s). Can be a single value or a slice for 'in'.
|
|
Value any `json:"value"`
|
|
// Type of the Value (LiteralValue or AttributeValue). Needed for comparisons like user.attr1 == user.attr2.
|
|
ValueType ValueType `json:"value_type"`
|
|
// Type of the Attribute (e.g., "text", "select", "multiselect").
|
|
AttributeType string `json:"attribute_type"`
|
|
}
|
|
|
|
// VisualExpression represents a series of conditions combined with logical AND.
|
|
type VisualExpression struct {
|
|
// Conditions is a list of individual conditions that will be ANDed together.
|
|
Conditions []Condition `json:"conditions"`
|
|
}
|