query

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query struct {
	// contains filtered or unexported fields
}

func New

func New(config configuration.Config) (result *Query, err error)

func (*Query) AddModifier

func (this *Query) AddModifier(token auth.Token, resourceKind string, elements []map[string]interface{}, modifierString string, rights string, sortBy string, sortDesc bool) (result []map[string]interface{}, err error, code int)

func (*Query) CheckGroups

func (this *Query) CheckGroups(kind string, resource string, groups []string, rights string) (err error)

func (*Query) CheckListUserOrGroup

func (this *Query) CheckListUserOrGroup(token auth.Token, kind string, ids []string, rights string) (allowed map[string]bool, err error)

func (*Query) CheckUser

func (this *Query) CheckUser(kind string, resource string, user string, rights string) (err error)

func (*Query) CheckUserOrGroup

func (this *Query) CheckUserOrGroup(tokenStr string, kind string, resource string, rights string) (err error)

func (*Query) CheckUserOrGroupFromAuthToken

func (this *Query) CheckUserOrGroupFromAuthToken(token auth.Token, kind string, resource string, rights string) (err error)

func (*Query) Export

func (this *Query) Export() (exports map[string][]model.ResourceRights, err error)

func (*Query) ExportKind

func (this *Query) ExportKind(kind string, limit int, offset int) (result []model.ResourceRights, err error)

func (*Query) ExportKindAll

func (this *Query) ExportKindAll(kind string) (result []model.ResourceRights, err error)

func (*Query) GetClient

func (this *Query) GetClient() *opensearch.Client

func (*Query) GetConditionFilter

func (this *Query) GetConditionFilter(token auth.Token, condition model.ConditionConfig) (map[string]interface{}, error)

func (*Query) GetFilter

func (this *Query) GetFilter(token auth.Token, selection model.Selection) (result map[string]interface{}, err error)

func (*Query) GetFullListForUserOrGroup

func (this *Query) GetFullListForUserOrGroup(kind string, user string, groups []string, rights string) (result []map[string]interface{}, err error)

func (*Query) GetList

func (this *Query) GetList(token auth.Token, kind string, queryCommons model.QueryListCommons) (result []map[string]interface{}, err error)

func (*Query) GetListForGroup

func (this *Query) GetListForGroup(kind string, groups []string, rights string) (result []string, err error)

func (*Query) GetListForUser

func (this *Query) GetListForUser(kind string, user string, rights string) (result []string, err error)

func (*Query) GetListForUserOrGroup

func (this *Query) GetListForUserOrGroup(kind string, user string, groups []string, rights string, limitStr string, offsetStr string) (result []map[string]interface{}, err error)

func (*Query) GetListFromIds

func (this *Query) GetListFromIds(token auth.Token, kind string, ids []string, queryCommons model.QueryListCommons) (result []map[string]interface{}, err error)

func (*Query) GetListTotalForUserOrGroup

func (this *Query) GetListTotalForUserOrGroup(token auth.Token, kind string, rights string) (result int64, err error)

func (*Query) GetListWithSelection

func (this *Query) GetListWithSelection(token auth.Token, kind string, queryCommons model.QueryListCommons, selection model.Selection) (result []map[string]interface{}, err error)

func (*Query) GetResourceEntry

func (this *Query) GetResourceEntry(kind string, resource string) (result model.Entry, version model.ResourceVersion, err error)

func (*Query) GetResourceInterface

func (this *Query) GetResourceInterface(kind string, resource string, result interface{}) (version model.ResourceVersion, err error)

func (*Query) GetRights

func (this *Query) GetRights(tokenStr string, kind string, resource string) (result model.ResourceRights, err error)

func (*Query) GetRightsToAdministrate

func (this *Query) GetRightsToAdministrate(kind string, user string, groups []string) (result []model.ResourceRights, err error)

func (*Query) GetTermAggregation

func (this *Query) GetTermAggregation(tokenStr string, kind string, rights string, field string, limit int) (result []model.TermAggregationResultElement, err error)

func (*Query) Import

func (this *Query) Import(imports map[string][]model.ResourceRights) (err error)

func (*Query) ImportResource

func (this *Query) ImportResource(kind string, resource model.ResourceRights) (err error)

func (*Query) List

func (this *Query) List(tokenStr string, kind string, options model.ListOptions) (result []map[string]interface{}, err error)

func (*Query) Query

func (this *Query) Query(tokenStr string, query model.QueryMessage) (result interface{}, code int, err error)

func (*Query) ResourceExists

func (this *Query) ResourceExists(kind string, resource string) (exists bool, err error)

func (*Query) SearchList

func (this *Query) SearchList(token auth.Token, kind string, query string, queryCommons model.QueryListCommons, selection *model.Selection) (result []map[string]interface{}, err error)

SearchList does a text search with query on the feature_search index the function allows optionally additional filtering with the selection parameter. when unneeded this parameter may be nil.

func (*Query) SearchListAll

func (this *Query) SearchListAll(kind string, query string, user string, groups []string, rights string) (result []map[string]interface{}, err error)

func (*Query) SearchListTotal

func (this *Query) SearchListTotal(token auth.Token, kind string, query string, rights string) (result int64, err error)

func (*Query) SearchOrderedList

func (this *Query) SearchOrderedList(kind string, query string, user string, groups []string, queryCommons model.QueryListCommons) (result []map[string]interface{}, err error)

func (*Query) SearchRightsToAdministrate

func (this *Query) SearchRightsToAdministrate(kind string, user string, groups []string, query string, limitStr string, offsetStr string) (result []model.ResourceRights, err error)

func (*Query) SelectByFeature

func (this *Query) SelectByFeature(token auth.Token, kind string, feature string, value string, queryCommons model.QueryListCommons) (result []map[string]interface{}, err error)

func (*Query) SelectByFeatureTotal

func (this *Query) SelectByFeatureTotal(token auth.Token, kind string, field string, value string, rights string) (result int64, err error)

func (*Query) SelectByFieldAll

func (this *Query) SelectByFieldAll(kind string, field string, value string, user string, groups []string, rights string) (result []map[string]interface{}, err error)

func (*Query) Total

func (this *Query) Total(tokenStr string, kind string, options model.ListOptions) (result int64, err error)

type WithTotal

type WithTotal struct {
	Total  int64       `json:"total"`
	Result interface{} `json:"result"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL