testserver

package
v1.37.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 19 Imported by: 4

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GRPCServer                        util.GRPCServerConfig `debugmap:"visible"`
	ReadOnlyGRPCServer                util.GRPCServerConfig `debugmap:"visible"`
	HTTPGateway                       util.HTTPServerConfig `debugmap:"visible"`
	ReadOnlyHTTPGateway               util.HTTPServerConfig `debugmap:"visible"`
	LoadConfigs                       []string              `debugmap:"visible"`
	MaximumUpdatesPerWrite            uint16                `debugmap:"visible"`
	MaximumPreconditionCount          uint16                `debugmap:"visible"`
	MaxCaveatContextSize              int                   `debugmap:"visible"`
	MaxRelationshipContextSize        int                   `debugmap:"visible"`
	MaxReadRelationshipsLimit         uint32                `debugmap:"visible"`
	MaxDeleteRelationshipsLimit       uint32                `debugmap:"visible"`
	MaxLookupResourcesLimit           uint32                `debugmap:"visible"`
	MaxBulkExportRelationshipsLimit   uint32                `debugmap:"visible"`
	EnableExperimentalLookupResources bool                  `debugmap:"visible"`
}

func ConfigWithOptions

func ConfigWithOptions(c *Config, opts ...ConfigOption) *Config

ConfigWithOptions configures an existing Config with the passed in options set

func NewConfigWithOptions

func NewConfigWithOptions(opts ...ConfigOption) *Config

NewConfigWithOptions creates a new Config with the passed in options set

func NewConfigWithOptionsAndDefaults added in v1.22.0

func NewConfigWithOptionsAndDefaults(opts ...ConfigOption) *Config

NewConfigWithOptionsAndDefaults creates a new Config with the passed in options set starting from the defaults

func (*Config) Complete

func (c *Config) Complete() (RunnableTestServer, error)

func (Config) DebugMap added in v1.22.0

func (c Config) DebugMap() map[string]any

DebugMap returns a map form of Config for debugging

func (*Config) ToOption

func (c *Config) ToOption() ConfigOption

ToOption returns a new ConfigOption that sets the values from the passed in Config

func (*Config) WithOptions added in v1.22.0

func (c *Config) WithOptions(opts ...ConfigOption) *Config

WithOptions configures the receiver Config with the passed in options set

type ConfigOption

type ConfigOption func(c *Config)

func SetLoadConfigs

func SetLoadConfigs(loadConfigs []string) ConfigOption

SetLoadConfigs returns an option that can set LoadConfigs on a Config

func WithEnableExperimentalLookupResources added in v1.35.2

func WithEnableExperimentalLookupResources(enableExperimentalLookupResources bool) ConfigOption

WithEnableExperimentalLookupResources returns an option that can set EnableExperimentalLookupResources on a Config

func WithGRPCServer

func WithGRPCServer(gRPCServer util.GRPCServerConfig) ConfigOption

WithGRPCServer returns an option that can set GRPCServer on a Config

func WithHTTPGateway added in v1.11.0

func WithHTTPGateway(hTTPGateway util.HTTPServerConfig) ConfigOption

WithHTTPGateway returns an option that can set HTTPGateway on a Config

func WithLoadConfigs

func WithLoadConfigs(loadConfigs string) ConfigOption

WithLoadConfigs returns an option that can append LoadConfigss to Config.LoadConfigs

func WithMaxBulkExportRelationshipsLimit added in v1.32.0

func WithMaxBulkExportRelationshipsLimit(maxBulkExportRelationshipsLimit uint32) ConfigOption

WithMaxBulkExportRelationshipsLimit returns an option that can set MaxBulkExportRelationshipsLimit on a Config

func WithMaxCaveatContextSize added in v1.18.0

func WithMaxCaveatContextSize(maxCaveatContextSize int) ConfigOption

WithMaxCaveatContextSize returns an option that can set MaxCaveatContextSize on a Config

func WithMaxDeleteRelationshipsLimit added in v1.32.0

func WithMaxDeleteRelationshipsLimit(maxDeleteRelationshipsLimit uint32) ConfigOption

WithMaxDeleteRelationshipsLimit returns an option that can set MaxDeleteRelationshipsLimit on a Config

func WithMaxLookupResourcesLimit added in v1.32.0

func WithMaxLookupResourcesLimit(maxLookupResourcesLimit uint32) ConfigOption

WithMaxLookupResourcesLimit returns an option that can set MaxLookupResourcesLimit on a Config

func WithMaxReadRelationshipsLimit added in v1.32.0

func WithMaxReadRelationshipsLimit(maxReadRelationshipsLimit uint32) ConfigOption

WithMaxReadRelationshipsLimit returns an option that can set MaxReadRelationshipsLimit on a Config

func WithMaxRelationshipContextSize added in v1.22.0

func WithMaxRelationshipContextSize(maxRelationshipContextSize int) ConfigOption

WithMaxRelationshipContextSize returns an option that can set MaxRelationshipContextSize on a Config

func WithMaximumPreconditionCount added in v1.12.0

func WithMaximumPreconditionCount(maximumPreconditionCount uint16) ConfigOption

WithMaximumPreconditionCount returns an option that can set MaximumPreconditionCount on a Config

func WithMaximumUpdatesPerWrite added in v1.12.0

func WithMaximumUpdatesPerWrite(maximumUpdatesPerWrite uint16) ConfigOption

WithMaximumUpdatesPerWrite returns an option that can set MaximumUpdatesPerWrite on a Config

func WithReadOnlyGRPCServer

func WithReadOnlyGRPCServer(readOnlyGRPCServer util.GRPCServerConfig) ConfigOption

WithReadOnlyGRPCServer returns an option that can set ReadOnlyGRPCServer on a Config

func WithReadOnlyHTTPGateway added in v1.11.0

func WithReadOnlyHTTPGateway(readOnlyHTTPGateway util.HTTPServerConfig) ConfigOption

WithReadOnlyHTTPGateway returns an option that can set ReadOnlyHTTPGateway on a Config

type RunnableTestServer

type RunnableTestServer interface {
	Run(ctx context.Context) error
	GRPCDialContext(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error)
	ReadOnlyGRPCDialContext(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error)
}

Jump to

Keyboard shortcuts

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