tchatlib

package module
v0.0.0-...-1bcc7ca Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2019 License: GPL-3.0 Imports: 9 Imported by: 2

README

tchatlib

Shared library for go structs and methods passed between packages.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrWrapper

func ErrWrapper(outerPrefix string) func(error, ...string) error

func GetKeys

func GetKeys(keypath string) (ed25519.PublicKey, ed25519.PrivateKey, error)

Load private key from disk

Types

type DaemonConfig

type DaemonConfig struct {
	PrivateServerAddress string `json:"private_server_address"`
	ClientCookie         string `json:"client_cookie"`
}

type Message

type Message struct {
	Sender    ed25519.PublicKey `json:"sender"`
	Signature []byte            `json:"signature"`
	Content   string            `json:"content"`
}

type MessageLogFile

type MessageLogFile struct {
	MessageLogs []struct {
		Message
		time.Time
	} `json:"message_logs"`
}

type ServiceClaims

type ServiceClaims struct {
	PublicKey ed25519.PublicKey `json:"public_key"`
	ServiceID string            `json:"service_id"`
	jwt.StandardClaims
}

type SigningMethodED25519

type SigningMethodED25519 struct{}

func (SigningMethodED25519) Alg

func (s SigningMethodED25519) Alg() string

func (SigningMethodED25519) Sign

func (s SigningMethodED25519) Sign(signingString string, key interface{}) (string, error)

func (SigningMethodED25519) Verify

func (s SigningMethodED25519) Verify(signingString, signature string, key interface{}) error

type TorConfig

type TorConfig struct {
	ProxyAddress      string `json:"proxy_address"`
	ControllerAddress string `json:"controller_address"`
}

Jump to

Keyboard shortcuts

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