bridge

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

AGPL v3 License Copyright (c) 2026 Project Backplane

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

AGPL v3 License Copyright (c) 2026 Project Backplane

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

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

Bridge handles the connection between the app's runtime state and the admin panel.

func New

func New() *Bridge

New creates a new Backplane Bridge instance

func (*Bridge) Expose

func (b *Bridge) Expose(label string, ptr interface{}, validators ...element.Validator) error

Expose registers a variable to be editable/viewable in the admin panel. It returns an error if the type does not implement element.Property.

func (*Bridge) GetBindings

func (b *Bridge) GetBindings() map[string]interface{}

GetBindings returns a snapshot of the current bindings.

func (*Bridge) GetInfo

func (b *Bridge) GetInfo(label string) string

GetInfo returns metadata about the variable (Type as string)

func (*Bridge) MustExpose added in v2.0.1

func (b *Bridge) MustExpose(label string, ptr interface{}, validators ...element.Validator)

MustExpose is a helper that panics if Expose fails. Use during init().

func (*Bridge) SetAuditDispatcher added in v2.0.1

func (b *Bridge) SetAuditDispatcher(s audit.Sink)

SetAuditDispatcher configures the audit event sink

func (*Bridge) SetValue

func (b *Bridge) SetValue(label string, newVal interface{}, subject auth.Subject) error

SetValue sets the value of a bound variable and logs the action.

func (*Bridge) SetValueFromString

func (b *Bridge) SetValueFromString(label string, valStr string, subject auth.Subject) error

SetValueFromString sets the value of a bound variable from a string input.

Jump to

Keyboard shortcuts

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