trusted

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AggregateIdentifier = "trusted-keys-aggregate"

Variables

This section is empty.

Functions

func AddTrustedKey

func AddTrustedKey(request *grpc_config.TrustedKeyRequest, nonce []byte, clientConnection *axon_utils.ClientConnection) error

func CreateJWT

func CreateJWT(claims jwt.Claims) (token string, e error)

func DecryptString

func DecryptString(cryptText string) (string, error)

func EncryptString

func EncryptString(plainText string) (string, error)

func GetKeyManagerKey

func GetKeyManagerKey(name string) (ssh.PublicKey, error)

func GetRsaPublicKey

func GetRsaPublicKey() (*rsa.PublicKey, error)

func GetTrustedKeys

func GetTrustedKeys() map[string]string

func HandleRegisterKeyManagerCommand

func HandleRegisterKeyManagerCommand(commandMessage *axon_server.Command, clientConnection *axon_utils.ClientConnection) (*axon_utils.Error, error)

func HandleRegisterTrustedKeyCommand

func HandleRegisterTrustedKeyCommand(commandMessage *axon_server.Command, clientConnection *axon_utils.ClientConnection) (*axon_utils.Error, error)

func ParsePrivateKey

func ParsePrivateKey(pemString string) (givenPrivateKey *rsa.PrivateKey, e error)

func SetPrivateKey

func SetPrivateKey(name string, pemString string) error

func UnsafeSetKeyManager

func UnsafeSetKeyManager(publicKey *grpc_config.PublicKey)

func UnsafeSetTrustedKey

func UnsafeSetTrustedKey(publicKey *grpc_config.PublicKey)

Types

type KeyManagerAddedEvent

type KeyManagerAddedEvent struct {
	grpc_config.KeyManagerAddedEvent
}

func (*KeyManagerAddedEvent) ApplyTo

func (event *KeyManagerAddedEvent) ApplyTo(projectionWrapper interface{})

type KeyManagerRemovedEvent

type KeyManagerRemovedEvent struct {
	grpc_config.KeyManagerRemovedEvent
}

func (*KeyManagerRemovedEvent) ApplyTo

func (event *KeyManagerRemovedEvent) ApplyTo(projectionWrapper interface{})

type Projection

type Projection struct {
	TrustedKeys    map[string]string
	KeyManagers    map[string]string
	AggregateState axon_utils.AggregateState
}

func RestoreProjection

func RestoreProjection(aggregateIdentifier string, clientConnection *axon_utils.ClientConnection) *Projection

func (*Projection) Apply

func (projection *Projection) Apply(event axon_utils.Event)

func (*Projection) GetAggregateState

func (projection *Projection) GetAggregateState() axon_utils.AggregateState

type TrustedKeyAddedEvent

type TrustedKeyAddedEvent struct {
	grpc_config.TrustedKeyAddedEvent
}

Redeclare event types, so that they can be extended with event handler methods.

func (*TrustedKeyAddedEvent) ApplyTo

func (event *TrustedKeyAddedEvent) ApplyTo(projectionWrapper interface{})

type TrustedKeyRemovedEvent

type TrustedKeyRemovedEvent struct {
	grpc_config.TrustedKeyRemovedEvent
}

func (*TrustedKeyRemovedEvent) ApplyTo

func (event *TrustedKeyRemovedEvent) ApplyTo(projectionWrapper interface{})

Jump to

Keyboard shortcuts

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