model

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyPairAggregate models.AggregateType = "key_pair"

	KeyPairAdded models.EventType = "key_pair.added"
)
View Source
const (
	KeyPairVersion = "v1"
)

Variables

This section is empty.

Functions

func KeyPairToModel

func KeyPairToModel(pair *KeyPair) *model.KeyPair

func KeyToModel

func KeyToModel(key *Key) *model.Key

Types

type Key

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

func KeyFromModel

func KeyFromModel(key *model.Key) *Key

type KeyPair

type KeyPair struct {
	es_models.ObjectRoot

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

func KeyPairFromModel

func KeyPairFromModel(pair *model.KeyPair) *KeyPair

func (*KeyPair) AppendAddKeyPair

func (k *KeyPair) AppendAddKeyPair(event *es_models.Event) error

func (*KeyPair) AppendEvent

func (k *KeyPair) AppendEvent(event *es_models.Event) error

func (*KeyPair) AppendEvents

func (k *KeyPair) AppendEvents(events ...*es_models.Event) error

Jump to

Keyboard shortcuts

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