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>
31 lines
744 B
Go
31 lines
744 B
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package remotecluster
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// Response represents the bytes replied from a remote server when a message is sent.
|
|
type Response struct {
|
|
Status string `json:"status"`
|
|
Err string `json:"err"`
|
|
Payload json.RawMessage `json:"payload"`
|
|
}
|
|
|
|
// IsSuccess returns true if the response status indicates success.
|
|
func (r *Response) IsSuccess() bool {
|
|
return r.Status == ResponseStatusOK
|
|
}
|
|
|
|
// SetPayload serializes an arbitrary struct as a RawMessage.
|
|
func (r *Response) SetPayload(v any) error {
|
|
raw, err := json.Marshal(v)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
r.Payload = raw
|
|
return nil
|
|
}
|