Documentation ¶
Overview ¶
Code generated by github.com/ecordell/optgen. DO NOT EDIT.
Index ¶
- Variables
- type Cursor
- type QueryOptions
- type QueryOptionsOption
- type ResourceRelation
- type ReverseQueryOptions
- type ReverseQueryOptionsOption
- func WithAfterForReverse(afterForReverse Cursor) ReverseQueryOptionsOption
- func WithLimitForReverse(limitForReverse *uint64) ReverseQueryOptionsOption
- func WithResRelation(resRelation *ResourceRelation) ReverseQueryOptionsOption
- func WithSortForReverse(sortForReverse SortOrder) ReverseQueryOptionsOption
- type SortOrder
Constants ¶
This section is empty.
Variables ¶
var (
// LimitOne is a constant *uint64 that can be used with WithLimit requests.
LimitOne = &one
)
Functions ¶
This section is empty.
Types ¶
type Cursor ¶
type Cursor *core.RelationTuple
type QueryOptions ¶
type QueryOptions struct { Limit *uint64 Usersets []*core.ObjectAndRelation Sort SortOrder After Cursor }
QueryOptions are the options that can affect the results of a normal forward query.
func NewQueryOptionsWithOptions ¶
func NewQueryOptionsWithOptions(opts ...QueryOptionsOption) *QueryOptions
NewQueryOptionsWithOptions creates a new QueryOptions with the passed in options set
func QueryOptionsWithOptions ¶
func QueryOptionsWithOptions(q *QueryOptions, opts ...QueryOptionsOption) *QueryOptions
QueryOptionsWithOptions configures an existing QueryOptions with the passed in options set
func (*QueryOptions) ToOption ¶
func (q *QueryOptions) ToOption() QueryOptionsOption
ToOption returns a new QueryOptionsOption that sets the values from the passed in QueryOptions
type QueryOptionsOption ¶
type QueryOptionsOption func(q *QueryOptions)
func SetUsersets ¶
func SetUsersets(usersets []*v1.ObjectAndRelation) QueryOptionsOption
SetUsersets returns an option that can set Usersets on a QueryOptions
func WithAfter ¶
func WithAfter(after Cursor) QueryOptionsOption
WithAfter returns an option that can set After on a QueryOptions
func WithLimit ¶
func WithLimit(limit *uint64) QueryOptionsOption
WithLimit returns an option that can set Limit on a QueryOptions
func WithSort ¶
func WithSort(sort SortOrder) QueryOptionsOption
WithSort returns an option that can set Sort on a QueryOptions
func WithUsersets ¶
func WithUsersets(usersets *v1.ObjectAndRelation) QueryOptionsOption
WithUsersets returns an option that can append Usersetss to QueryOptions.Usersets
type ResourceRelation ¶
ResourceRelation combines a resource object type and relation.
type ReverseQueryOptions ¶
type ReverseQueryOptions struct { ResRelation *ResourceRelation LimitForReverse *uint64 SortForReverse SortOrder AfterForReverse Cursor }
ReverseQueryOptions are the options that can affect the results of a reverse query.
func NewReverseQueryOptionsWithOptions ¶
func NewReverseQueryOptionsWithOptions(opts ...ReverseQueryOptionsOption) *ReverseQueryOptions
NewReverseQueryOptionsWithOptions creates a new ReverseQueryOptions with the passed in options set
func ReverseQueryOptionsWithOptions ¶
func ReverseQueryOptionsWithOptions(r *ReverseQueryOptions, opts ...ReverseQueryOptionsOption) *ReverseQueryOptions
ReverseQueryOptionsWithOptions configures an existing ReverseQueryOptions with the passed in options set
func (*ReverseQueryOptions) ToOption ¶
func (r *ReverseQueryOptions) ToOption() ReverseQueryOptionsOption
ToOption returns a new ReverseQueryOptionsOption that sets the values from the passed in ReverseQueryOptions
type ReverseQueryOptionsOption ¶
type ReverseQueryOptionsOption func(r *ReverseQueryOptions)
func WithAfterForReverse ¶
func WithAfterForReverse(afterForReverse Cursor) ReverseQueryOptionsOption
WithAfterForReverse returns an option that can set AfterForReverse on a ReverseQueryOptions
func WithLimitForReverse ¶
func WithLimitForReverse(limitForReverse *uint64) ReverseQueryOptionsOption
WithLimitForReverse returns an option that can set LimitForReverse on a ReverseQueryOptions
func WithResRelation ¶
func WithResRelation(resRelation *ResourceRelation) ReverseQueryOptionsOption
WithResRelation returns an option that can set ResRelation on a ReverseQueryOptions
func WithSortForReverse ¶
func WithSortForReverse(sortForReverse SortOrder) ReverseQueryOptionsOption
WithSortForReverse returns an option that can set SortForReverse on a ReverseQueryOptions