Documentation ¶
Index ¶
Constants ¶
View Source
const ( DWN_FAIRX_FEATURE_SESSION_MESSAGES = "FairXSessionMessages" DWN_FAIRX_FEATURE_SESSION_ESTABLISH = "FairXSessionEstablish" DWN_FAIRX_FEATURE_SESSION_EXECUTE_FUNCTION = "FairXSessionExecuteFunction" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionsFeatures ¶
type CollectionsFeatures ¶
type FairXFeatures ¶
type FeatureDetection ¶
type FeatureDetection struct { Type string `json:"type"` Interfaces FeatureInterface `json:"interfaces"` }
var CurrentFeatureDetection FeatureDetection = FeatureDetection{ Type: "FeatureDetection", Interfaces: FeatureInterface{ Collections: CollectionsFeatures{ CollectionsQuery: false, CollectionsWrite: false, CollectionsCommit: false, CollectionsDelete: false, }, Actions: ActionsFeatures{ ThreadsQuery: false, ThreadsCreate: false, ThreadsReply: false, ThreadsClose: false, ThreadsDelete: false, }, Permissions: PermissionsFeatures{ PermissionsRequest: false, PermissionsGrant: false, PermissionsRevoke: false, }, Messaging: MessagingFeatures{ Batching: true, }, FairX: FairXFeatures{ SessionEstablish: true, SessionExecuteFunction: true, SessionMessages: true, }, }, }
type FeatureInterface ¶
type FeatureInterface struct { Collections CollectionsFeatures `json:"collections,omitempty"` Actions ActionsFeatures `json:"actions,omitempty"` Permissions PermissionsFeatures `json:"permissions,omitempty"` Messaging MessagingFeatures `json:"messaging,omitempty"` FairX FairXFeatures `json:"fairx,omitempty"` }
type HTTPService ¶
type HTTPService struct { ListenAddr string ListenPort int Router *mux.Router InterfaceRouter *InterfaceRouter }
func CreateHTTPService ¶
func CreateHTTPService(domain string, addr string, port int, jwtKey string, messageDocumentStorage storage.DocumentStorage, mailboxDocumentStorage storage.DocumentStorage) *HTTPService
func (*HTTPService) GetRequestObject ¶
func (svc *HTTPService) GetRequestObject(w http.ResponseWriter, r *http.Request) (did.RequestObject, error)
func (*HTTPService) ListenAndServe ¶
func (svc *HTTPService) ListenAndServe() error
func (*HTTPService) ServiceHandler ¶
func (svc *HTTPService) ServiceHandler(w http.ResponseWriter, r *http.Request)
type InterfaceRouter ¶
type InterfaceRouter struct { FeatureDetection Domain string MessageStore storage.DocumentStorage MailboxStore storage.DocumentStorage }
func CreateInterfaceRouter ¶
func CreateInterfaceRouter(domain string, messageStore storage.DocumentStorage, mailboxStore storage.DocumentStorage) *InterfaceRouter
func (*InterfaceRouter) FeatureDetectionRoute ¶
func (ir *InterfaceRouter) FeatureDetectionRoute() interface{}
func (*InterfaceRouter) Route ¶
func (ir *InterfaceRouter) Route(ro *did.RequestObject, authSubjectDID string) (interface{}, error)
type MessagingFeatures ¶
type MessagingFeatures struct {
Batching bool `json:"batching"`
}
type PermissionsFeatures ¶
Click to show internal directories.
Click to hide internal directories.