internal

package
v1.1.1-0...-9a57a87 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize()

func PrettyPrint

func PrettyPrint(v interface{}) (err error)

Use this function to print a human readable version of the returned struct.

Types

type FgaConfig

type FgaConfig struct {
	GeneralConfig FgaGeneralConfig         `yaml:"general"`
	StrictConfig  pg.StrictOptions         `yaml:"strict"`
	LdapConfig    ldap.Config              `yaml:"ldap"`
	PgDsn         pg.Dsn                   `yaml:"postgresql_dsn"`
	DbsConfig     pg.Databases             `yaml:"databases"`
	UserConfig    map[string]FgaUserConfig `yaml:"users"`
	Roles         map[string]FgaRoleConfig `yaml:"roles"`
	Slots         []string                 `yaml:"replication_slots"`
}

func NewConfig

func NewConfig() (config FgaConfig, err error)

type FgaGeneralConfig

type FgaGeneralConfig struct {
	LogLevel zapcore.Level `yaml:"loglevel"`
	RunDelay time.Duration `yaml:"run_delay"`
	Debug    bool          `yaml:"debug"`
}

type FgaRoleConfig

type FgaRoleConfig struct {
	Options  []string `yaml:"options"`
	MemberOf []string `yaml:"member"`
	State    pg.State `yaml:"state"`
}

type FgaUserConfig

type FgaUserConfig struct {
	Auth     string    `yaml:"auth"`
	BaseDN   string    `yaml:"ldapbasedn"`
	Filter   string    `yaml:"ldapfilter"`
	MemberOf []string  `yaml:"memberof"`
	Options  []string  `yaml:"options"`
	Expiry   time.Time `yaml:"expiry"`
	Password string    `yaml:"password"`
	State    pg.State  `yaml:"state"`
}

type PgFgaHandler

type PgFgaHandler struct {
	// contains filtered or unexported fields
}

func NewPgFgaHandler

func NewPgFgaHandler() (pfh *PgFgaHandler, err error)

func (PgFgaHandler) Handle

func (pfh PgFgaHandler) Handle()

func (PgFgaHandler) HandleDatabases

func (pfh PgFgaHandler) HandleDatabases() (err error)

func (PgFgaHandler) HandleRoles

func (pfh PgFgaHandler) HandleRoles() (err error)

func (PgFgaHandler) HandleSlots

func (pfh PgFgaHandler) HandleSlots() (err error)

func (PgFgaHandler) HandleUsers

func (pfh PgFgaHandler) HandleUsers() (err error)

Jump to

Keyboard shortcuts

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