options

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 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 []*v0.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

type QueryOptionsOption

type QueryOptionsOption func(q *QueryOptions)

func SetUsersets

func SetUsersets(usersets []*v0.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 *v0.ObjectAndRelation) QueryOptionsOption

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

type ResourceRelation

type ResourceRelation struct {
	Namespace string
	Relation  string
}

ResourceRelations 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

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