model

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateChatID

func GenerateChatID() (*commonpb.ChatId, error)

func GenerateIntentID

func GenerateIntentID() (*commonpb.IntentId, error)

func GenerateTwoWayChatID

func GenerateTwoWayChatID(a, b *commonpb.UserId) (*commonpb.ChatId, error)

func GenerateUserId

func GenerateUserId() (*commonpb.UserId, error)

func IntentIDString

func IntentIDString(intent *commonpb.IntentId) string

func MustGenerateChatID

func MustGenerateChatID() *commonpb.ChatId

func MustGenerateIntentID

func MustGenerateIntentID() *commonpb.IntentId

func MustGenerateTwoWayChatID

func MustGenerateTwoWayChatID(a, b *commonpb.UserId) *commonpb.ChatId

func MustGenerateUserID

func MustGenerateUserID() *commonpb.UserId

func UserIDString

func UserIDString(userID *commonpb.UserId) string

Types

type KeyPair

type KeyPair struct {
	// contains filtered or unexported fields
}

func GenerateKeyPair

func GenerateKeyPair() (KeyPair, error)

func MustGenerateKeyPair

func MustGenerateKeyPair() KeyPair

func (KeyPair) Auth

func (k KeyPair) Auth(m proto.Message, target **commonpb.Auth) error

func (KeyPair) Private

func (k KeyPair) Private() ed25519.PrivateKey

func (KeyPair) Proto

func (k KeyPair) Proto() *commonpb.PublicKey

func (KeyPair) Public

func (k KeyPair) Public() ed25519.PublicKey

func (KeyPair) Sign

func (k KeyPair) Sign(m proto.Message, target **commonpb.Signature) error

Jump to

Keyboard shortcuts

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