tapir/application.go

25 řádky
721 B
Go
Surový Trvalý odkaz Normální zobrazení Historie

2019-05-15 19:45:45 +00:00
package tapir
2019-09-14 23:44:19 +00:00
import (
"git.openprivacy.ca/cwtch.im/tapir/primitives/core"
2019-09-14 23:44:19 +00:00
)
2019-09-15 21:20:05 +00:00
// Capability defines a status granted to a connection, from an application. That allows the connection to access
// other Application or functions within an Application.
type Capability string
2019-05-21 18:28:10 +00:00
// Application defines the interface for all Tapir Applications
2019-05-15 19:45:45 +00:00
type Application interface {
NewInstance() Application
2019-08-07 20:08:02 +00:00
Init(connection Connection)
2019-09-14 23:44:19 +00:00
Transcript() *core.Transcript
2019-09-15 21:20:05 +00:00
PropagateTranscript(transcript *core.Transcript)
}
// InteractiveApplication defines the interface for interactive Tapir applications (apps that expect the user to send
// and receive messages from)
type InteractiveApplication interface {
Application
Listen()
2019-05-15 19:45:45 +00:00
}