keypair

package
v1.87.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AggregateType    = "key_pair"
	AggregateVersion = "v1"
)
View Source
const (
	AddedEventType = eventTypePrefix + "added"
)

Variables

This section is empty.

Functions

func AddedEventMapper

func AddedEventMapper(event *repository.Event) (eventstore.Event, error)

func RegisterEventMappers

func RegisterEventMappers(es *eventstore.Eventstore)

Types

type AddedEvent

type AddedEvent struct {
	eventstore.BaseEvent `json:"-"`

	Usage      domain.KeyUsage `json:"usage"`
	Algorithm  string          `json:"algorithm"`
	PrivateKey *Key            `json:"privateKey"`
	PublicKey  *Key            `json:"publicKey"`
}

func NewAddedEvent

func NewAddedEvent(
	ctx context.Context,
	aggregate *eventstore.Aggregate,
	usage domain.KeyUsage,
	algorithm string,
	privateCrypto,
	publicCrypto *crypto.CryptoValue,
	privateKeyExpiration,
	publicKeyExpiration time.Time) *AddedEvent

func (*AddedEvent) Data

func (e *AddedEvent) Data() interface{}

func (*AddedEvent) UniqueConstraints

func (e *AddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint

type Aggregate

type Aggregate struct {
	eventstore.Aggregate
}

type Key

type Key struct {
	Key    *crypto.CryptoValue `json:"key"`
	Expiry time.Time           `json:"expiry"`
}

Jump to

Keyboard shortcuts

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