options

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Code generated by github.com/ecordell/optgen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (

	// LimitOne is a constant *uint64 that can be used with WithLimit requests.
	LimitOne = &one
)

Functions

This section is empty.

Types

type QueryOptions

type QueryOptions struct {
	Limit    *uint64
	Usersets []*core.ObjectAndRelation
}

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 added in v1.5.0

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 WithLimit

func WithLimit(limit *uint64) QueryOptionsOption

WithLimit returns an option that can set Limit on a QueryOptions

func WithUsersets

func WithUsersets(usersets *v1.ObjectAndRelation) QueryOptionsOption

WithUsersets returns an option that can append Usersetss to QueryOptions.Usersets

type ResourceRelation

type ResourceRelation struct {
	Namespace string
	Relation  string
}

ResourceRelation combines a resource object type and relation.

type ReverseQueryOptions

type ReverseQueryOptions struct {
	ReverseLimit *uint64
	ResRelation  *ResourceRelation
}

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 added in v1.5.0

ToOption returns a new ReverseQueryOptionsOption that sets the values from the passed in ReverseQueryOptions

type ReverseQueryOptionsOption

type ReverseQueryOptionsOption func(r *ReverseQueryOptions)

func WithResRelation

func WithResRelation(resRelation *ResourceRelation) ReverseQueryOptionsOption

WithResRelation returns an option that can set ResRelation on a ReverseQueryOptions

func WithReverseLimit

func WithReverseLimit(reverseLimit *uint64) ReverseQueryOptionsOption

WithReverseLimit returns an option that can set ReverseLimit on a ReverseQueryOptions

Jump to

Keyboard shortcuts

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