flatfile

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package flatfile exposes the explicit flat-file signing provider adapter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

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

Binding is one opaque manifest-to-public-profile declaration.

func NewBinding

func NewBinding(
	tenant string,
	domain string,
	use PolicyUse,
	handleID string,
	handle dkim2.PrivateKeyHandle,
	algorithm dkim2.Algorithm,
	publicDigest [sha256.Size]byte,
) (Binding, error)

NewBinding validates one exact key declaration against closed vocabularies.

func (Binding) Format

func (Binding) Format(state fmt.State, _ rune)

Format prevents formatting verbs from traversing binding state.

func (Binding) GoString

func (Binding) GoString() string

GoString returns a constant protected binding representation.

func (Binding) MarshalJSON

func (Binding) MarshalJSON() ([]byte, error)

MarshalJSON emits an empty object without selection or key facts.

func (Binding) String

func (Binding) String() string

String returns a constant protected binding summary.

type Error

type Error struct{}

Error is the sole content-free provider failure.

func (*Error) Error

func (*Error) Error() string

Error returns a constant secret-safe diagnostic.

func (*Error) Is

func (*Error) Is(target error) bool

Is recognizes the closed provider failure class.

type PolicyUse

type PolicyUse string

PolicyUse identifies one closed flat-file signing-policy selection.

const (
	// PolicyOriginator selects an originator signing policy.
	PolicyOriginator PolicyUse = "originator"
	// PolicyOrdinaryTransit selects an ordinary-transit signing policy.
	PolicyOrdinaryTransit PolicyUse = "ordinary_transit"
	// PolicyDeliveryStatus selects a delivery-status signing policy.
	PolicyDeliveryStatus PolicyUse = "delivery_status"
)

func (PolicyUse) Known

func (u PolicyUse) Known() bool

Known reports whether the use is supported by the provider adapter.

type Resolver

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

Resolver is one opaque immutable flat-file profile projection.

func Open

func Open(document []byte, bindings []Binding, at time.Time) (*Resolver, error)

Open decodes one descriptor-proven document and validates every key binding.

func (*Resolver) Close

func (r *Resolver) Close(ctx context.Context) error

Close releases the immutable provider projection.

func (*Resolver) Format

func (*Resolver) Format(state fmt.State, _ rune)

Format prevents formatting verbs from traversing provider state.

func (*Resolver) GoString

func (*Resolver) GoString() string

GoString returns a constant protected resolver representation.

func (*Resolver) MarshalJSON

func (*Resolver) MarshalJSON() ([]byte, error)

MarshalJSON emits an empty object without provider or binding facts.

func (*Resolver) ResolvePolicy

func (r *Resolver) ResolvePolicy(
	ctx context.Context,
	tenant string,
	domain string,
	use PolicyUse,
	at time.Time,
) (dkim2.SigningProfile, error)

ResolvePolicy resolves one exact administrative selection.

func (*Resolver) String

func (*Resolver) String() string

String returns a constant protected resolver summary.

Jump to

Keyboard shortcuts

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