api

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

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

func NewApi

func NewApi(b Backend) *Api

func (*Api) FindConfirmedEvents

func (api *Api) FindConfirmedEvents(_ interface{}, reply *[]eventlog.Event) error

func (*Api) FindPendingEvents

func (api *Api) FindPendingEvents(_ interface{}, reply *[]eventlog.Event) error

func (*Api) PublishEvent

func (api *Api) PublishEvent(args *PublishEventArgs, reply *eventlog.Event) error

type Backend

type Backend interface {
	PublishEvent(publishRequest backend.PublishRequest) (eventlog.Event, error)
	FindPendingEvents() ([]eventlog.Event, error)
	FindConfirmedEvents() ([]eventlog.Event, error)
}

type PublishEventArgs

type PublishEventArgs struct {
	Type        string
	Payload     string
	Version     float64
	Topic       string
	NewAccounts []string
}

Jump to

Keyboard shortcuts

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