resolvers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetItem

func GetItem(ctx context.Context, db *gorm.DB, out interface{}, id *string) error

GetItem ...

func GetItemForRelation

func GetItemForRelation(ctx context.Context, db *gorm.DB, obj interface{}, relation string, out interface{}) error

Types

type EntityFilter

type EntityFilter interface {
	Apply(ctx context.Context, wheres *[]string, values *[]interface{}, joins *[]string) error
}

type EntityFilterQuery

type EntityFilterQuery interface {
	Apply(ctx context.Context, wheres *[]string, values *[]interface{}, joins *[]string) error
}

type EntityResultType

type EntityResultType struct {
	Offset *int
	Limit  *int
	Query  EntityFilterQuery
	Sort   []EntitySort
	Filter EntityFilter
}

func (*EntityResultType) GetCount

func (r *EntityResultType) GetCount(ctx context.Context, db *gorm.DB, out interface{}) (count int, err error)

GetCount ...

func (*EntityResultType) GetItems

func (r *EntityResultType) GetItems(ctx context.Context, db *gorm.DB, alias string, out interface{}) error

GetResultTypeItems ...

func (*EntityResultType) GetSortStrings

func (r *EntityResultType) GetSortStrings() []string

type EntitySort

type EntitySort interface {
	String() string
}

Jump to

Keyboard shortcuts

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