securelink

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

Package securelink provides adapters that wrap github.com/goliatone/go-urlkit/securelink managers so they satisfy go-users securelink interfaces without extra plumbing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager adapts go-urlkit securelink managers to go-users interfaces.

func NewManager

func NewManager(cfg types.SecureLinkConfigurator) (*Manager, error)

NewManager builds a securelink adapter using the configurator interface.

func WrapManager

func WrapManager(inner urlkit.Manager) *Manager

WrapManager wraps an existing go-urlkit manager.

func (*Manager) Generate

func (m *Manager) Generate(route string, payloads ...types.SecureLinkPayload) (string, error)

Generate produces a signed secure link using the configured manager.

func (*Manager) GetAndValidate

func (m *Manager) GetAndValidate(fn func(string) string) (types.SecureLinkPayload, error)

GetAndValidate extracts a token from the provided function and validates it.

func (*Manager) GetExpiration

func (m *Manager) GetExpiration() time.Duration

GetExpiration exposes the manager's expiration duration.

func (*Manager) Validate

func (m *Manager) Validate(token string) (map[string]any, error)

Validate checks a secure link token and returns the decoded payload.

Jump to

Keyboard shortcuts

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