feat(storage): add native PostgreSQL runtime and verified offline application import
Build and publish container images / images (push) Failing after 12m29s
Build and publish container images / images (push) Failing after 12m29s
This commit is contained in:
1 parent
96065d1e89
commit
0ba1dcfef0
243 files changed
+21441
-3090
No files matched your search
@@ -50,6 +50,9 @@ func (s *Store) IssueAdapterTicketForPrincipal(principalUUID, domainUUID, plugin
|
||||
}
|
||||
|
||||
func (s *Store) issueAdapterTicket(principalUUID, domainUUID, pluginID, objectUUID, revisionUUID, rootPath string) (string, error) {
|
||||
if !s.SupportsHostedEditors() {
|
||||
return "", ErrBackendFeatureUnavailable
|
||||
}
|
||||
token, hash, err := adapterSecret("pwa_t_")
|
||||
if err != nil {
|
||||
return "", err
|
||||
@@ -70,6 +73,9 @@ func secretHash(token string) string {
|
||||
}
|
||||
|
||||
func (s *Store) ExchangeAdapterTicket(ticket string) (string, *AdapterSession, error) {
|
||||
if !s.SupportsHostedEditors() {
|
||||
return "", nil, ErrBackendFeatureUnavailable
|
||||
}
|
||||
tx, err := s.DB.Begin()
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
@@ -111,6 +117,9 @@ func (s *Store) ExchangeAdapterTicket(ticket string) (string, *AdapterSession, e
|
||||
}
|
||||
|
||||
func (s *Store) GetAdapterSession(token string) (*AdapterSession, error) {
|
||||
if !s.SupportsHostedEditors() {
|
||||
return nil, ErrBackendFeatureUnavailable
|
||||
}
|
||||
var session AdapterSession
|
||||
err := s.DB.QueryRow(`SELECT principal_uuid,domain_uuid,plugin_id,object_uuid,base_revision_uuid,root_path,
|
||||
session_hash,session_expires_at_ms FROM adapter_sessions WHERE session_hash=?`,
|
||||
@@ -123,10 +132,16 @@ func (s *Store) GetAdapterSession(token string) (*AdapterSession, error) {
|
||||
}
|
||||
|
||||
func (s *Store) SaveHostedRevision(session *AdapterSession, payload []byte, message string) (*Revision, error) {
|
||||
if !s.SupportsHostedEditors() {
|
||||
return nil, ErrBackendFeatureUnavailable
|
||||
}
|
||||
return s.SaveHostedRevisionAt(session, session.ObjectUUID, session.BaseRevisionUUID, payload, message)
|
||||
}
|
||||
|
||||
func (s *Store) SaveHostedRevisionAt(session *AdapterSession, objectUUID, baseRevisionUUID string, payload []byte, message string) (*Revision, error) {
|
||||
if !s.SupportsHostedEditors() {
|
||||
return nil, ErrBackendFeatureUnavailable
|
||||
}
|
||||
s.revisionWriteMu.Lock()
|
||||
defer s.revisionWriteMu.Unlock()
|
||||
base, err := s.GetRevision(baseRevisionUUID)
|
||||
|
||||
Reference in new issue
Block a user