Documentation
¶
Index ¶
Constants ¶
View Source
const LikeWildcard = '%'
LikeWildcard specifies which wildcard symbol should be used in `like` expression of `logs condition`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteLogsRequest ¶
type DeleteLogsRequest struct { Condition string // IDs is the list of Log IDs should be deleted. IDs []string // MarkOnly allows not to delete the records physically, but mark it for deletion MarkOnly bool }
DeleteLogsRequest specifies the DeleteLogs parameters
type Log ¶
type Log interface { // AppendRecords allows to insert records into the log by its ID AppendRecords(ctx context.Context, request *solaris.AppendRecordsRequest) (*solaris.AppendRecordsResult, error) // QueryRecords allows to retrieve records by the request QueryRecords(ctx context.Context, request QueryRecordsRequest) ([]*solaris.Record, error) }
Log interface exposes an API for working with a Log records.
type LogCondEval ¶
type LogCondEval struct {
// contains filtered or unexported fields
}
LogCondEval describes the dialect/grammar of how to interpret the AST tree nodes for `logs condition` expression
func NewLogCondEval ¶
func NewLogCondEval(dialect map[string]ql.ParamDialect[*solaris.Log, any]) *LogCondEval
NewLogCondEval creates the new LogCondEval
func (LogCondEval) Eval ¶
func (lce LogCondEval) Eval(log *solaris.Log, expr *ql.Expression) (bool, error)
Eval evaluates `logs condition` for a specific log entity
type LogHelper ¶
type LogHelper struct {
// contains filtered or unexported fields
}
func NewLogHelper ¶
func NewLogHelper() *LogHelper
func (*LogHelper) AppendRecords ¶
func (*LogHelper) QueryRecords ¶
func (l *LogHelper) QueryRecords(ctx context.Context, request QueryRecordsRequest) ([]*solaris.Record, error)
type Logs ¶
type Logs interface { // CreateLog creates a new log and returns its descriptor with the new ID CreateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error) // GetLogByID returns Log by its ID. It returns the errors.ErrNotExist if the log is marked for delete, // or it doesn't exist GetLogByID(ctx context.Context, id string) (*solaris.Log, error) // UpdateLog update the Log object information. The Log is matched by the log ID UpdateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error) // QueryLogs returns the list of Log objects matched to the query request QueryLogs(ctx context.Context, qr QueryLogsRequest) (*solaris.QueryLogsResult, error) // DeleteLogs allows to either mark or delete logs permanently DeleteLogs(ctx context.Context, request DeleteLogsRequest) (*solaris.CountResult, error) }
Logs provides an interface to manage the logs meta-information
type QueryLogsRequest ¶
type QueryLogsRequest struct { Condition string // IDs is the list of Log IDs should be selected. If the value is not empty, the Condition field is disregarded IDs []string // Deleted search between deleted Deleted bool Page string Limit int64 }
QueryLogsRequest is used for selecting list of known logs
type QueryRecordsRequest ¶
type QueryRecordsRequest struct { // Condition defines the filtering constrains Condition string // LogID where records should be read LogID string // descending specifies that the result should be sorted in the descending order Descending bool // StartID provides the first record ID it can be read (inclusive) StartID string // limit contains the number of records to be returned Limit int64 }
Click to show internal directories.
Click to hide internal directories.