Documentation
¶
Index ¶
- Variables
- func AttemptToStoreSubscriptionTrigger(t backend.SubscriptionTriggerWritable) backend.SubscriptionTriggerResponseValue
- func AttemptToStoreSubscriptionTriggerUnknown() backend.SubscriptionTriggerResponseValue
- func DefaultBrowsers() []backend.BrowserPathParam
- type FeatureResult
- type FeatureResultVisitor
- type GetFeatureResult
- type MovedFeatureResult
- type QueryParseError
- type RegularFeatureResult
- type SavedSearchNotificationEvent
- type SplitFeatureResult
- type UserProfile
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidPageToken indicates the page token is invalid. // Raised by the adapter layer to let the server layer know that the // page token did not meet the expected encoding in the database layer. ErrInvalidPageToken = errors.New("invalid page token") // ErrUserMaxSavedSearches indicates the user has reached the maximum // number of allowed saved searches. ErrUserMaxSavedSearches = errors.New("user has reached the maximum number of allowed saved searches") // ErrUserMaxBookmarks indicates the user has reached the maximum // number of allowed bookmarks. ErrUserMaxBookmarks = errors.New("user has reached the maximum number of allowed bookmarks") // ErrUserMaxSubscriptions indicates the user has reached the maximum // number of allowed subscriptions. ErrUserMaxSubscriptions = errors.New("user has reached the maximum number of allowed subscriptions") // ErrUserMaxNotificationChannels indicates the user has reached the maximum // number of allowed notification channels. ErrUserMaxNotificationChannels = errors.New("user has reached the maximum number of allowed notification channels") // ErrUserNotAuthorizedForAction indicates the user is not authorized to execute the requested action. ErrUserNotAuthorizedForAction = errors.New("user not authorized to execute action") // ErrEntityDoesNotExist indicates the entity does not exist. ErrEntityDoesNotExist = errors.New("entity does not exist") // ErrJSONMarshal indicates a failure when marshalling data from a generic interface{} for conversion. // This typically happens during the data conversion from a database type to a JSON byte slice. ErrJSONMarshal = errors.New("failed to marshal data for JSON conversion") // ErrJSONUnmarshal indicates a failure when unmarshalling JSON data into a target struct. // This suggests a mismatch between the data stored in the database and the expected data contract. ErrJSONUnmarshal = errors.New("failed to unmarshal JSON data") // ErrEmptyJSONValue is a sentinel error indicating that the JSON value from the database // was valid but empty (e.g., an empty array or object). This allows callers to distinguish // between a missing value and an explicitly empty one. ErrEmptyJSONValue = errors.New("JSON value is empty") // ErrSavedSearchMaxDepthExceeded indicates that the saved search expansion exceeded the maximum depth. ErrSavedSearchMaxDepthExceeded = errors.New("saved search expansion exceeded maximum depth") // ErrSavedSearchCycleDetected indicates a cycle was detected in saved search expansion. ErrSavedSearchCycleDetected = errors.New("cycle detected in saved search expansion") // ErrSavedSearchNotFound indicates the saved search was not found. ErrSavedSearchNotFound = errors.New("saved search not found") // ErrHotlistNotFound indicates the hotlist was not found. ErrHotlistNotFound = errors.New("hotlist not found") // ErrQueryConsistsEntirelyOfSavedSearch indicates the query consists entirely of a saved search. ErrQueryConsistsEntirelyOfSavedSearch = errors.New( "query cannot consist entirely of a single saved search or hotlist", ) )
Functions ¶
func AttemptToStoreSubscriptionTrigger ¶
func AttemptToStoreSubscriptionTrigger(t backend.SubscriptionTriggerWritable) backend.SubscriptionTriggerResponseValue
AttemptToStoreSubscriptionTrigger attempts to convert the given subscription trigger writable into a subscription trigger response value. If the conversion fails, it logs a warning and returns an empty SubscriptionTriggerResponseValue.
func AttemptToStoreSubscriptionTriggerUnknown ¶
func AttemptToStoreSubscriptionTriggerUnknown() backend.SubscriptionTriggerResponseValue
AttemptToStoreSubscriptionTriggerUnknown attempts to convert an unknown subscription trigger into a subscription trigger response value. If the conversion fails, it logs a warning and returns an empty SubscriptionTriggerResponseValue.
func DefaultBrowsers ¶
func DefaultBrowsers() []backend.BrowserPathParam
Types ¶
type FeatureResult ¶
type FeatureResult interface {
Visit(ctx context.Context, visitor FeatureResultVisitor) error
}
FeatureResult is the interface that all concrete results implement. The Visit method allows a visitor to operate on the concrete type.
type FeatureResultVisitor ¶
type FeatureResultVisitor interface {
VisitRegularFeature(ctx context.Context, result RegularFeatureResult) error
VisitMovedFeature(ctx context.Context, result MovedFeatureResult) error
VisitSplitFeature(ctx context.Context, result SplitFeatureResult) error
}
FeatureResultVisitor defines the methods for visiting each result type.
type GetFeatureResult ¶
type GetFeatureResult struct {
// contains filtered or unexported fields
}
GetFeatureResult is a container for the result of a GetFeature operation.
func NewGetFeatureResult ¶
func NewGetFeatureResult(result FeatureResult) *GetFeatureResult
NewGetFeatureResult creates a new GetFeatureResult.
func (GetFeatureResult) Visit ¶
func (g GetFeatureResult) Visit(ctx context.Context, v FeatureResultVisitor) error
Visit allows a visitor to operate on the result.
type MovedFeatureResult ¶
type MovedFeatureResult struct {
// contains filtered or unexported fields
}
MovedFeatureResult represents a result for a moved feature.
func NewMovedFeatureResult ¶
func NewMovedFeatureResult(newFeatureID string) *MovedFeatureResult
NewMovedFeatureResult creates a new MovedFeatureResult for a moved feature.
func (MovedFeatureResult) NewFeatureID ¶
func (m MovedFeatureResult) NewFeatureID() string
func (MovedFeatureResult) Visit ¶
func (m MovedFeatureResult) Visit(ctx context.Context, v FeatureResultVisitor) error
type QueryParseError ¶
func (*QueryParseError) Error ¶
func (e *QueryParseError) Error() string
type RegularFeatureResult ¶
type RegularFeatureResult struct {
// contains filtered or unexported fields
}
RegularFeatureResult represents a result for a regular feature.
func NewRegularFeatureResult ¶
func NewRegularFeatureResult(feature *backend.Feature) *RegularFeatureResult
RegularFeatureResult creates a new RegularFeatureResult for a regular feature.
func (RegularFeatureResult) Feature ¶
func (r RegularFeatureResult) Feature() *backend.Feature
func (RegularFeatureResult) Visit ¶
func (r RegularFeatureResult) Visit(ctx context.Context, v FeatureResultVisitor) error
type SavedSearchNotificationEvent ¶
type SavedSearchNotificationEvent struct {
ID string
SavedSearchID string
SnapshotType string
Timestamp time.Time
EventType string
Reasons []string
BlobPath string
DiffBlobPath string
Summary []byte // JSON bytes
}
SavedSearchNotificationEvent represents a change event for a saved search. This is the domain model used by the API layer.
type SplitFeatureResult ¶
type SplitFeatureResult struct {
// contains filtered or unexported fields
}
SplitFeatureResult represents a result for a split feature.
func NewSplitFeatureResult ¶
func NewSplitFeatureResult(splitFeature backend.FeatureEvolutionSplit) *SplitFeatureResult
NewSplitFeatureResult creates a new SplitFeatureResult for a split feature.
func (SplitFeatureResult) SplitFeature ¶
func (s SplitFeatureResult) SplitFeature() backend.FeatureEvolutionSplit
func (SplitFeatureResult) Visit ¶
func (s SplitFeatureResult) Visit(ctx context.Context, v FeatureResultVisitor) error