fake

package
v0.0.0-...-996fa4a Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer struct {
	Contract  uint32
	Target    string
	ExtraPerm uint8
	Success   bool
}

Authorizer fake.

func (*Authorizer) Authorize

func (f *Authorizer) Authorize(channel *security.Channel, perms uint8) (contract.Contract, security.Key, bool)

Authorize provides a fake implementation.

type Conn

type Conn struct {
	ConnID    int
	Disabled  bool
	Outgoing  []message.Message
	Shortcuts map[string]string
}

Conn fake.

func (f *Conn) AddLink(alias string, channel *security.Channel)

AddLink provides a fake implementation.

func (*Conn) CanSubscribe

func (f *Conn) CanSubscribe(message.Ssid, []byte) bool

CanSubscribe provides a fake implementation.

func (*Conn) CanUnsubscribe

func (f *Conn) CanUnsubscribe(message.Ssid, []byte) bool

CanUnsubscribe provides a fake implementation.

func (*Conn) Close

func (f *Conn) Close() error

Close provides a fake implementation.

func (f *Conn) GetLink(input []byte) []byte

GetLink provides a fake implementation.

func (*Conn) ID

func (f *Conn) ID() string

ID provides a fake implementation.

func (f *Conn) Links() map[string]string

Links provides a fake implementation.

func (*Conn) LocalID

func (f *Conn) LocalID() security.ID

LocalID provides a fake implementation.

func (*Conn) Send

func (f *Conn) Send(m *message.Message) error

Send provides a fake implementation.

func (*Conn) Track

func (f *Conn) Track(contract.Contract)

Track provides a fake implementation.

func (*Conn) Type

func (f *Conn) Type() message.SubscriberType

Type provides a fake implementation.

func (*Conn) Username

func (f *Conn) Username() string

Username provides a fake implementation.

type Contract

type Contract struct {
	Invalid bool
}

Contract fake.

func (*Contract) Stats

func (f *Contract) Stats() usage.Meter

Stats gets the usage statistics.

func (*Contract) Validate

func (f *Contract) Validate(key security.Key) bool

Validate validates the contract data against a key.

type Decryptor

type Decryptor struct {
	Contract    uint32
	Permissions uint8
	Target      string
}

Decryptor fake.

func (*Decryptor) DecryptKey

func (f *Decryptor) DecryptKey(k string) (security.Key, error)

DecryptKey provides a fake implementation.

type Notifier

type Notifier struct {
	Events []event.Subscription
}

Notifier fake.

func (*Notifier) NotifySubscribe

func (f *Notifier) NotifySubscribe(sub message.Subscriber, ev *event.Subscription)

NotifySubscribe provides a fake implementation.

func (*Notifier) NotifyUnsubscribe

func (f *Notifier) NotifyUnsubscribe(sub message.Subscriber, ev *event.Subscription)

NotifyUnsubscribe provides a fake implementation.

type PubSub

type PubSub struct {
	Trie *message.Trie
}

PubSub fake.

func (*PubSub) Handle

func (f *PubSub) Handle(_ string, _ service.Handler)

Handle provides a fake implementation.

func (*PubSub) Publish

func (f *PubSub) Publish(m *message.Message, filter func(message.Subscriber) bool) (n int64)

Publish provides a fake implementation.

func (*PubSub) Subscribe

func (f *PubSub) Subscribe(sub message.Subscriber, ev *event.Subscription) bool

Subscribe provides a fake implementation.

func (*PubSub) Unsubscribe

func (f *PubSub) Unsubscribe(sub message.Subscriber, ev *event.Subscription) bool

Unsubscribe provides a fake implementation.

type Replicator

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

Replicator fake.

func (*Replicator) Contains

func (f *Replicator) Contains(ev event.Event) bool

Contains provides a fake implementation.

func (*Replicator) Notify

func (f *Replicator) Notify(ev event.Event, enabled bool)

Notify provides a fake implementation.

type Surveyor

type Surveyor struct {
	Resp [][]byte
	Err  error
}

Surveyor fake.

func (*Surveyor) Query

func (f *Surveyor) Query(string, []byte) (message.Awaiter, error)

Query provides a fake implementation.

Jump to

Keyboard shortcuts

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