openvaultdb

package
v0.46.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRequestBytes  = 1 << 20
	MaxResponseBytes = 8 << 20
)

Variables

This section is empty.

Functions

func DecodeJSONObjectStrict

func DecodeJSONObjectStrict(data []byte, target any) error

DecodeJSONObjectStrict rejects duplicate keys at every depth before optionally decoding the top-level object.

func OpenSource

func OpenSource(path string) (dal.DB, error)

func ValidateAuthorizationEnvelope

func ValidateAuthorizationEnvelope(data []byte) (authorization.Result, string, error)

Types

type AuthorizationError

type AuthorizationError struct{ Decision az.Result }

AuthorizationError retains the owner's validated structured denial internally. Its Error string is deliberately safe for the existing public API error mapper.

func (*AuthorizationError) Error

func (*AuthorizationError) Error() string

func (*AuthorizationError) Unwrap

func (*AuthorizationError) Unwrap() error

type Client

type Client struct{ HTTP *http.Client }

func (Client) Evidence

func (c Client) Evidence(ctx context.Context, target Target, body []byte) (Response, error)

func (Client) Explain

func (c Client) Explain(ctx context.Context, target Target, body []byte) (Response, error)

func (Client) Query

func (c Client) Query(ctx context.Context, target Target, dtql []byte) (Response, error)

func (Client) Update

func (c Client) Update(ctx context.Context, target Target, table, row string, body []byte) (Response, error)

type Response

type Response struct {
	StatusCode int
	Body       []byte
	Type       string
}

type SourceConfig

type SourceConfig struct {
	BaseURL     string `json:"baseUrl"`
	DatabaseID  string `json:"databaseId"`
	TokenEnv    string `json:"tokenEnv"`
	PrincipalID string `json:"principalId"`
}

SourceConfig is CLI-owned connection metadata referenced by a normal project catalog's Path. Tokens remain in the daemon environment. PrincipalID binds the configured credential to the fixed local session; OVDB authenticates its own token and resolves memberships independently. No caller-supplied identity is sent.

type Target

type Target struct {
	BaseURL    string
	DatabaseID string
	Token      string
}

func (Target) Validate

func (t Target) Validate() error

Jump to

Keyboard shortcuts

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