inject

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPlaceholder added in v0.4.0

func BuildPlaceholder(resourceID, selector string) (string, error)

func FieldValue added in v0.4.0

func FieldValue(resource passbolt.DecryptedResource, selector string) (string, error)

func Render

func Render(ctx context.Context, template string, resolve ResourceResolver) (string, error)

Types

type FieldKind

type FieldKind string
const (
	FieldName     FieldKind = "name"
	FieldPassword FieldKind = "password"
	FieldUsername FieldKind = "username"
	FieldURI      FieldKind = "uri"
	FieldURL      FieldKind = "url"
	FieldDesc     FieldKind = "description"
	FieldTOTP     FieldKind = "totp"
	FieldCustom   FieldKind = "custom"
)

type InjectableField added in v0.4.0

type InjectableField struct {
	Selector string
	Label    string
}

func AvailableFields added in v0.4.0

func AvailableFields(resource passbolt.DecryptedResource) []InjectableField

type ParseError

type ParseError struct {
	Offset int
	Msg    string
}

func (ParseError) Error

func (e ParseError) Error() string

type PassboltRef

type PassboltRef struct {
	ResourceKind RefKind
	Resource     string
	Field        FieldKind
	CustomField  string
}

func ParsePassboltRef

func ParsePassboltRef(s string) (PassboltRef, error)

type RefKind

type RefKind string
const (
	RefUUID RefKind = "uuid"
	RefName RefKind = "name"
)

type ResourceResolver

type ResourceResolver func(context.Context, string) (passbolt.DecryptedResource, error)

type TOTPStatus added in v0.4.0

type TOTPStatus struct {
	Code      string
	Digits    int
	Period    time.Duration
	ExpiresAt time.Time
}

func TOTPInfoAt added in v0.4.0

func TOTPInfoAt(resource passbolt.DecryptedResource, now time.Time) (TOTPStatus, bool)

func TOTPStatusAt added in v0.4.0

func TOTPStatusAt(resource passbolt.DecryptedResource, now time.Time) (TOTPStatus, bool)

Jump to

Keyboard shortcuts

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