Versions in this module Expand all Collapse all v0 v0.4.0 Nov 7, 2023 Changes in this version + const AuditActionCreate + const AuditActionDelete + const AuditActionGet + const AuditActionList + const AuditActionSearch + const AuditActionUpdate + const FilterActionCreate + const FilterActionDelete + const FilterActionRead + const FilterActionUpdate + const OperationBetween + const OperationContains + const OperationEqual + const OperationExists + const OperationGreaterThan + const OperationGreaterThanEqual + const OperationIn + const OperationLessThan + const OperationLessThanEqual + const OperationNotContains + const OperationNotEqual + const OperationNotIn + const OperationStartsWith + type FilterBase interface + Filter func(user *types.User, filters map[string][]string, action string) (interface{}, error) + Operations func() OperationMap + type Filtering struct + func (f *Filtering) Filter(user *types.User, filters map[string][]string, action string) (interface{}, error) + func (f *Filtering) MultiFilter(user *types.User, key string, values []string) (interface{}, error) + type LocalFiltering struct + func (f *LocalFiltering) And(condition1, condition2 interface{}) bool + func (f *LocalFiltering) Contains(attr string, value interface{}) bool + func (f *LocalFiltering) Equals(attr string, value interface{}) bool + func (f *LocalFiltering) Exists(attr string, value interface{}) bool + func (f *LocalFiltering) GreaterThan(attr string, value interface{}) bool + func (f *LocalFiltering) GreaterThanEqual(attr string, value interface{}) bool + func (f *LocalFiltering) In(attr string, values interface{}) bool + func (f *LocalFiltering) LessThan(attr string, value interface{}) bool + func (f *LocalFiltering) LessThanEqual(attr string, value interface{}) bool + func (f *LocalFiltering) NotContains(attr string, value interface{}) bool + func (f *LocalFiltering) NotEqual(attr string, value interface{}) bool + func (f *LocalFiltering) NotIn(attr string, values interface{}) bool + func (f *LocalFiltering) Or(condition1, condition2 interface{}) bool + func (f *LocalFiltering) StartsWith(attr string, value interface{}) bool + type OperationMap map[string]func(string, interface{}) (interface{}, error) + type Scoutr struct + Config config.Config + Filtering FilterBase + func (api *Scoutr) BuildParams(req types.Request) map[string][]string + func (api *Scoutr) CanAccessEndpoint(method string, path string, user *types.User, request *types.Request) bool + func (api *Scoutr) GetConfig() config.Config + func (api *Scoutr) MergePermissions(user *types.User, group *types.Group) + func (api *Scoutr) PostProcess(data []types.Record, user *types.User) + func (api *Scoutr) UserIdentifier(user *types.User) string + func (api *Scoutr) ValidateFields(validation map[string]types.FieldValidation, requiredFields []string, ...) error + func (api *Scoutr) ValidateRequest(req types.Request, user *types.User) error + func (api *Scoutr) ValidateUser(user *types.User) error + func (api Scoutr) GetUser(id string, userData *types.UserData) (*types.User, error) + func (api Scoutr) InitializeRequest(req types.Request) (*types.User, error) + func (api Scoutr) PrepareCreate(request types.Request, data map[string]interface{}, ...) (*types.User, error) + type ScoutrBase interface + CanAccessEndpoint func(string, string, *types.User, *types.Request) bool + GetConfig func() config.Config + type ScoutrFilters interface + And func(condition1 interface{}, condition2 interface{}) interface{} + Between func(key string, values interface{}) (interface{}, error) + Contains func(key string, value interface{}) (interface{}, error) + Equals func(key string, value interface{}) (interface{}, error) + Exists func(key string, value interface{}) (interface{}, error) + GreaterThan func(key string, value interface{}) (interface{}, error) + GreaterThanEqual func(key string, value interface{}) (interface{}, error) + In func(key string, values interface{}) (interface{}, error) + LessThan func(key string, value interface{}) (interface{}, error) + LessThanEqual func(key string, value interface{}) (interface{}, error) + NotContains func(key string, value interface{}) (interface{}, error) + NotEqual func(key string, value interface{}) (interface{}, error) + NotIn func(key string, values interface{}) (interface{}, error) + Or func(condition1 interface{}, condition2 interface{}) interface{} + StartsWith func(key string, value interface{}) (interface{}, error) + type ScoutrProvider interface + Create func(request types.Request, item map[string]interface{}, ...) error + Delete func(request types.Request, partitionKey map[string]interface{}) error + Get func(request types.Request, id string) (types.Record, error) + GetAuth func(string) (*types.User, error) + GetEntitlements func([]string) ([]types.User, error) + GetGroup func(string) (*types.Group, error) + History func(request types.Request, key string, value string, ...) ([]types.History, error) + List func(request types.Request) ([]types.Record, error) + ListAuditLogs func(request types.Request, pathParams map[string]string, ...) ([]types.AuditLog, error) + ListUniqueValues func(request types.Request, uniqueKey string) ([]string, error) + Patch func(request types.Request, partitionKey map[string]interface{}, ...) (interface{}, error) + Search func(request types.Request, key string, values []string) ([]types.Record, error) + Update func(request types.Request, partitionKey map[string]interface{}, ...) (interface{}, error)