models

package
v0.0.0-...-01ba3af Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	AgentID    string
	PublicKey  string
	PrivateKey string
}

Agent struct declaration

func NewAgent

func NewAgent(agentID string) *Agent

NewAgent method declaration

type JSONMessage

type JSONMessage struct {
	EncryptedText string `json:"message"`
}

JSONMessage struct declaration

type Message

type Message struct {
	EncryptedText string
	DecryptedText string
}

Message struct declaration

func Decrypt

func Decrypt(privateKeyStr string, encodedMsg string) (*Message, error)

Decrypt method declaration

func Encrypt

func Encrypt(key string, normalMsg string) (*Message, error)

Encrypt method declaration

Jump to

Keyboard shortcuts

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