Documentation ¶
Index ¶
- Constants
- type Datastore
- type SQLiteStore
- func (s *SQLiteStore) EngineStatus(ctx context.Context) (model.Event, error)
- func (s *SQLiteStore) GetFields(ctx context.Context) (model.FieldGroups, error)
- func (s *SQLiteStore) GetResource(ctx context.Context, id string) (*model.Resource, error)
- func (s *SQLiteStore) GetResources(ctx context.Context, jsonQuery []byte) (model.ResourcesResponse, error)
- func (s *SQLiteStore) Ping() error
- func (s *SQLiteStore) Stats(context.Context) (model.Stats, error)
- func (s *SQLiteStore) WriteEvent(ctx context.Context, event model.Event) error
- func (s *SQLiteStore) WriteResources(ctx context.Context, resources model.Resources) error
Constants ¶
View Source
const ( //limit number of resource returned DefaultLimit = 25 LimitMaxValue = 2000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
type Datastore interface { GetResource(context.Context, string) (*model.Resource, error) GetResources(context.Context, []byte) (model.ResourcesResponse, error) WriteResources(context.Context, model.Resources) error Stats(context.Context) (model.Stats, error) WriteEvent(context.Context, model.Event) error EngineStatus(ctx context.Context) (model.Event, error) Ping() error }
Datastore provides an interface to read/write/update to a store
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
func NewSQLiteStore ¶
func (*SQLiteStore) EngineStatus ¶ added in v0.0.11
func (*SQLiteStore) GetFields ¶ added in v0.0.10
func (s *SQLiteStore) GetFields(ctx context.Context) (model.FieldGroups, error)
TODO remove this api
func (*SQLiteStore) GetResource ¶ added in v0.0.10
func (*SQLiteStore) GetResources ¶
func (s *SQLiteStore) GetResources(ctx context.Context, jsonQuery []byte) (model.ResourcesResponse, error)
func (*SQLiteStore) Ping ¶ added in v0.0.10
func (s *SQLiteStore) Ping() error
func (*SQLiteStore) WriteEvent ¶ added in v0.0.11
func (*SQLiteStore) WriteResources ¶
Click to show internal directories.
Click to hide internal directories.