cmd

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

func InitDataLoader

func InitDataLoader(rootCmd *cobra.Command)

InitDataLoader is an outer wrapper of the DataLoader constructor that is used in `command.go` init(). Not testable.

func InitServeCmd

func InitServeCmd(rootCmd *cobra.Command)

func NewDataLoader

func NewDataLoader(
	rootCmd *cobra.Command,
	cfg config.Config,
	logger *logger.Logger,
	fgaClient openfgav1.OpenFGAServiceClient,
	fgaStore fgastore.FGAStoreHelper,
	database db.DataLoader,
)

NewDataLoader is an inner wrapper of the DataLoader constructor which accepts all dependencies as arguments. Testable.

Types

type Data

type Data struct {
	Tuples []Tuple `yaml:"tuples"`
}

type DataLoader

type DataLoader struct {
	Database db.DataLoader
	// contains filtered or unexported fields
}

func (*DataLoader) SetDataLoadCmd

func (d *DataLoader) SetDataLoadCmd()

SetDataLoadCmd assigns cobra.Command to the DataLoader.dataLoadCmd field. I took it out of the constructor to increase readability.

type Tuple

type Tuple struct {
	Object   string `yaml:"object"`
	Relation string `yaml:"relation"`
	User     string `yaml:"user"`
}

Jump to

Keyboard shortcuts

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