host

package
v0.0.0-...-9604213 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package host assembles one writable Datly-backed authz authority for an embedding application. It neither owns the SQL connection nor chooses an IdP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB                *sql.DB
	Driver            string
	Identity          Identity
	Policies          []authz.Document
	Requirements      []gating.Binding
	EditorRoles       []string
	PolicyReplaceRule string // editor-roles (default) or manage-access
	Choices           gating.ChoicesProvider
	Directory         authz.Directory             // optional trusted policy-editor choice provider
	PolicyChoices     []authz.PolicyChoiceBinding // exact server-owned choices when no external directory is supplied
	Entities          gating.EntityPermissionProvider
	Entitlements      map[string]gating.EntitlementProvider
}

type Host

type Host struct {
	Services    *api.Services
	PolicyStore *policystore.Store
	GateStore   *gatesql.Store
}

func New

func New(ctx context.Context, config Config) (*Host, error)

func (*Host) Close

func (h *Host) Close(ctx context.Context) error

Close releases only the Datly policy component runtime. The caller owns DB.

type Identity

type Identity interface {
	authz.Provider
	gating.PrincipalResolver
}

Jump to

Keyboard shortcuts

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