v1alpha3

package
v0.7.74 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RelationshipFilter

type RelationshipFilter struct {
	Id               string
	Kind             string
	Greedy           bool //when set to true - instead of an exact match, kind will be prefix matched
	SubType          string
	RelationshipType string
	Version          string
	ModelName        string
	OrderOn          string
	Sort             string //asc or desc. Default behavior is asc
	Limit            int    //If 0 or  unspecified then all records are returned and limit is not used
	Offset           int
	Status           string
}

For now, only filtering by Kind and SubType are allowed. In the future, we will add support to query using `selectors` (using CUE) TODO: Add support for Model

func (*RelationshipFilter) Create

func (rf *RelationshipFilter) Create(m map[string]interface{})

Create the filter from map[string]interface{}

func (*RelationshipFilter) Get

func (relationshipFilter *RelationshipFilter) Get(db *database.Handler) ([]entity.Entity, int64, int, error)

func (*RelationshipFilter) GetById

func (rf *RelationshipFilter) GetById(db *database.Handler) (entity.Entity, error)

Jump to

Keyboard shortcuts

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