Documentation ¶
Index ¶
- Constants
- func DecryptWithAES(secret, encryptedString string) (string, error)
- func EncryptWithAES(secret, stringToEncrypt string) (string, error)
- func IsReadGrantedFor(auth model.Auth, includeGrant bool) q.Matcher
- func NewDBSet(sDB storage.SettingsIF, folderPath string) (me *storage.DBSet, err error)
- type DBConfig
- type DocTemplateDB
- func (me *DocTemplateDB) AssetsKey() string
- func (me *DocTemplateDB) Close() error
- func (me *DocTemplateDB) Delete(auth model.Auth, files storage.FilesIF, id string) error
- func (me *DocTemplateDB) DeleteTemplate(auth model.Auth, files storage.FilesIF, id, lang string) error
- func (me *DocTemplateDB) Get(auth model.Auth, id string) (*model.TemplateItem, error)
- func (me *DocTemplateDB) GetTemplate(auth model.Auth, id, lang string) (*file.IO, error)
- func (me *DocTemplateDB) List(auth model.Auth, contains string, options storage.Options) ([]*model.TemplateItem, error)
- func (me *DocTemplateDB) ProvideFileInfoFor(auth model.Auth, id, lang string, fm *file.Meta) (*file.IO, error)
- func (me *DocTemplateDB) Put(auth model.Auth, item *model.TemplateItem) error
- func (me *DocTemplateDB) PutVars(auth model.Auth, id, lang string, vars []string) error
- func (me *DocTemplateDB) Vars(auth model.Auth, contains string, options storage.Options) ([]string, error)
- type FileDB
- type FormDB
- func (me *FormDB) Close() error
- func (me *FormDB) DelComp(auth model.Auth, id string) error
- func (me *FormDB) Delete(auth model.Auth, id string) error
- func (me *FormDB) Get(auth model.Auth, id string) (*model.FormItem, error)
- func (me *FormDB) GetComp(auth model.Auth, id string) (*model.FormComponentItem, error)
- func (me *FormDB) List(auth model.Auth, contains string, options storage.Options) ([]*model.FormItem, error)
- func (me *FormDB) ListComp(auth model.Auth, contains string, options storage.Options) (map[string]*model.FormComponentItem, error)
- func (me *FormDB) Put(auth model.Auth, item *model.FormItem) error
- func (me *FormDB) PutComp(auth model.Auth, comp *model.FormComponentItem) error
- func (me *FormDB) Vars(auth model.Auth, contains string, options storage.Options) ([]string, error)
- type GrantMatcher
- type GroupAndOthersMatcher
- type I18nDB
- func (me *I18nDB) Close() error
- func (me *I18nDB) Find(keyContains string, valueContains string, options storage.Options) (map[string]map[string]string, error)
- func (me *I18nDB) Get(lang string, key string, args ...string) (string, error)
- func (me *I18nDB) GetAll(lang string) (map[string]string, error)
- func (me *I18nDB) GetAllLangs() ([]*model.Lang, error)
- func (me *I18nDB) GetFallback() (string, error)
- func (me *I18nDB) GetLangs(enabled bool) ([]*model.Lang, error)
- func (me *I18nDB) HasLang(lang string) bool
- func (me *I18nDB) Put(lang string, key string, text string) error
- func (me *I18nDB) PutAll(lang string, translations map[string]string) error
- func (me *I18nDB) PutFallback(lang string) error
- func (me *I18nDB) PutLang(lang string, enabled bool) error
- type SessionDB
- func (d *SessionDB) Close() error
- func (d *SessionDB) Delete(s *model.Session) error
- func (d *SessionDB) DeleteTokenRequest(r *model.TokenRequest) error
- func (d *SessionDB) DeleteValue(key string) error
- func (d *SessionDB) Get(sid string) (*model.Session, error)
- func (d *SessionDB) GetTokenRequest(t model.TokenType, id string) (*model.TokenRequest, error)
- func (d *SessionDB) GetValue(key string, v interface{}) error
- func (d *SessionDB) Put(s *model.Session) error
- func (d *SessionDB) PutTokenRequest(r *model.TokenRequest) error
- func (d *SessionDB) PutValue(key string, v interface{}) error
- type SettingsDB
- type SignatureRequestsDB
- func (me *SignatureRequestsDB) Add(item *model.SignatureRequestItem) error
- func (me *SignatureRequestsDB) Close() error
- func (me *SignatureRequestsDB) GetByHashAndSigner(hash string, signatory string) (*[]model.SignatureRequestItem, error)
- func (me *SignatureRequestsDB) GetByID(docid string, docpath string) (*[]model.SignatureRequestItem, error)
- func (me *SignatureRequestsDB) GetBySignatory(ethAddr string) (*[]model.SignatureRequestItem, error)
- func (me *SignatureRequestsDB) SetRejected(docid string, docpath string, signatory string) error
- func (me *SignatureRequestsDB) SetRevoked(docid string, docpath string, signatory string) error
- type UserDB
- func (me *UserDB) Close() error
- func (me *UserDB) Count() (int, error)
- func (me *UserDB) CreateApiKey(auth model.Auth, userId, apiKeyName string) (string, error)
- func (me *UserDB) DeleteApiKey(auth model.Auth, userId, hiddenApiKey string) error
- func (me *UserDB) Get(auth model.Auth, id string) (*model.User, error)
- func (me *UserDB) GetBaseFilePath() string
- func (me *UserDB) GetByApiKey(key string, userID string) (*model.User, error)
- func (me *UserDB) GetByBCAddress(bcAddress string) (*model.User, error)
- func (me *UserDB) GetByEmail(email string) (*model.User, error)
- func (me *UserDB) GetProfilePhoto(auth model.Auth, id string, writer io.Writer) error
- func (me *UserDB) List(auth model.Auth, contains string, options storage.Options) ([]*model.User, error)
- func (me *UserDB) Login(name, pw string) (*model.User, error)
- func (me *UserDB) Put(auth model.Auth, item *model.User) error
- func (me *UserDB) PutProfilePhoto(auth model.Auth, id string, reader io.Reader) error
- func (me *UserDB) PutPw(id, pass string) error
- func (me *UserDB) UpdateEmail(id, email string) error
- type UserDataDB
- func (me *UserDataDB) AssetsKey() string
- func (me *UserDataDB) Close() error
- func (me *UserDataDB) Delete(auth model.Auth, filesDB storage.FilesIF, id string) error
- func (me *UserDataDB) Get(auth model.Auth, id string) (*model.UserDataItem, error)
- func (me *UserDataDB) GetAllFileInfosOf(ud *model.UserDataItem) []*file.IO
- func (me *UserDataDB) GetByWorkflow(auth model.Auth, wf *model.WorkflowItem, finished bool) (*model.UserDataItem, bool, error)
- func (me *UserDataDB) GetData(auth model.Auth, id, dataPath string) (interface{}, error)
- func (me *UserDataDB) GetDataAndFiles(auth model.Auth, id, dataPath string) (interface{}, []string, error)
- func (me *UserDataDB) GetDataFile(auth model.Auth, id, dataPath string) (*file.IO, error)
- func (me *UserDataDB) List(auth model.Auth, contains string, options storage.Options, ...) ([]*model.UserDataItem, error)
- func (me *UserDataDB) NewFile(auth model.Auth, meta file.Meta) *file.IO
- func (me *UserDataDB) Put(auth model.Auth, item *model.UserDataItem) error
- func (me *UserDataDB) PutData(auth model.Auth, id string, dataObj map[string]interface{}) error
- type Var
- type VarsMaintenance
- type WorkflowDB
- func (me *WorkflowDB) Close() error
- func (me *WorkflowDB) Delete(auth model.Auth, id string) error
- func (me *WorkflowDB) DeleteExternalNode(auth model.Auth, id string) error
- func (me *WorkflowDB) Get(auth model.Auth, id string) (*model.WorkflowItem, error)
- func (me *WorkflowDB) GetList(auth model.Auth, ids []string) ([]*model.WorkflowItem, error)
- func (me *WorkflowDB) GetPublished(auth model.Auth, id string) (*model.WorkflowItem, error)
- func (me *WorkflowDB) List(auth model.Auth, contains string, options storage.Options) ([]*model.WorkflowItem, error)
- func (me *WorkflowDB) ListExternalNodes() []*externalnode.ExternalNode
- func (me *WorkflowDB) ListPublished(auth model.Auth, contains string, options storage.Options) ([]*model.WorkflowItem, error)
- func (me *WorkflowDB) NodeByName(auth model.Auth, name string) (*externalnode.ExternalNode, error)
- func (me *WorkflowDB) Put(auth model.Auth, item *model.WorkflowItem) error
- func (me *WorkflowDB) PutExternalNodeInstance(auth model.Auth, item *externalnode.ExternalNodeInstance) error
- func (me *WorkflowDB) QueryFromInstanceID(auth model.Auth, id string) (externalnode.ExternalNodeInstance, error)
- func (me *WorkflowDB) RegisterExternalNode(auth model.Auth, n *externalnode.ExternalNode) error
- type WorkflowPaymentsDB
- func (me *WorkflowPaymentsDB) All() ([]*model.WorkflowPaymentItem, error)
- func (me *WorkflowPaymentsDB) Cancel(paymentId, from string) error
- func (me *WorkflowPaymentsDB) Close() error
- func (me *WorkflowPaymentsDB) ConfirmPayment(txHash, from, to string, xes uint64) error
- func (me *WorkflowPaymentsDB) Delete(paymentId string) error
- func (me *WorkflowPaymentsDB) Get(paymentId string) (*model.WorkflowPaymentItem, error)
- func (me *WorkflowPaymentsDB) GetByTxHashAndStatusAndFromEthAddress(txHash, status, fromEthAddr string) (*model.WorkflowPaymentItem, error)
- func (me *WorkflowPaymentsDB) GetByWorkflowIdAndFromEthAddress(workflowID, fromEthAddr string, statuses []string) (*model.WorkflowPaymentItem, error)
- func (me *WorkflowPaymentsDB) Redeem(workflowId, from string) error
- func (me *WorkflowPaymentsDB) Remove(payment *model.WorkflowPaymentItem) error
- func (me *WorkflowPaymentsDB) Save(item *model.WorkflowPaymentItem) error
- func (me *WorkflowPaymentsDB) SetAbandonedToTimeoutBeforeTime(beforeTime time.Time) error
- func (me *WorkflowPaymentsDB) Update(paymentId, status, txHash, from string) error
Constants ¶
const WorkflowPaymentDB = "workflowpaymentsdb"
const WorkflowPaymentDBDir = "workflowpayments"
Variables ¶
This section is empty.
Functions ¶
func DecryptWithAES ¶
func EncryptWithAES ¶
func IsReadGrantedFor ¶
IsReadGrantedFor returns a matcher used to compare permisions fields with specific values
Types ¶
type DocTemplateDB ¶
type DocTemplateDB struct {
// contains filtered or unexported fields
}
func NewDocTemplateDB ¶
func NewDocTemplateDB(c DBConfig) (*DocTemplateDB, error)
NewDocTemplateDB opens a handle to the Document Template database
func (*DocTemplateDB) AssetsKey ¶
func (me *DocTemplateDB) AssetsKey() string
AssetsKeys return the base filepath of the document templates
func (*DocTemplateDB) DeleteTemplate ¶
func (me *DocTemplateDB) DeleteTemplate(auth model.Auth, files storage.FilesIF, id, lang string) error
DeleteTemplate removes a template from the database
func (*DocTemplateDB) Get ¶
func (me *DocTemplateDB) Get(auth model.Auth, id string) (*model.TemplateItem, error)
Get retrieves a single template item using its key
func (*DocTemplateDB) GetTemplate ¶
GetTemplate returns the file template
func (*DocTemplateDB) List ¶
func (me *DocTemplateDB) List(auth model.Auth, contains string, options storage.Options) ([]*model.TemplateItem, error)
List fetches template items from the database based on the supplied filter options
func (*DocTemplateDB) ProvideFileInfoFor ¶
func (me *DocTemplateDB) ProvideFileInfoFor(auth model.Auth, id, lang string, fm *file.Meta) (*file.IO, error)
ProvideFileInfoFor returns the fileinfo for a file On return, n == len(buf) if and only if err == nil.
func (*DocTemplateDB) Put ¶
func (me *DocTemplateDB) Put(auth model.Auth, item *model.TemplateItem) error
Put inserts a template item
type FileDB ¶
type FileDB struct {
// contains filtered or unexported fields
}
func (*FileDB) Exists ¶
Exists checks whether a file with a specific path exists in the file database
type FormDB ¶
type FormDB struct {
// contains filtered or unexported fields
}
func (*FormDB) List ¶
func (me *FormDB) List(auth model.Auth, contains string, options storage.Options) ([]*model.FormItem, error)
List returns the set of form items matching the supplied filter criteria
func (*FormDB) ListComp ¶
func (me *FormDB) ListComp(auth model.Auth, contains string, options storage.Options) (map[string]*model.FormComponentItem, error)
ListComp returns a list of form component matching the supplied filter criteria
type GrantMatcher ¶
func (*GrantMatcher) MatchField ¶
func (me *GrantMatcher) MatchField(v interface{}) (bool, error)
type GroupAndOthersMatcher ¶
func (*GroupAndOthersMatcher) MatchField ¶
func (me *GroupAndOthersMatcher) MatchField(v interface{}) (bool, error)
type I18nDB ¶
type I18nDB struct {
// contains filtered or unexported fields
}
func (*I18nDB) Find ¶
func (me *I18nDB) Find(keyContains string, valueContains string, options storage.Options) (map[string]map[string]string, error)
Find retrieves a list of translations matching the supplied filter criteria
func (*I18nDB) GetAllLangs ¶
GetAllLangs returns the full list of all languages defined
func (*I18nDB) GetFallback ¶
GetFallback returns the currently defined default/fallback language
func (*I18nDB) PutFallback ¶
PutFallback sets a specific language as default/fallback
type SessionDB ¶
type SessionDB struct {
// contains filtered or unexported fields
}
func NewSessionDB ¶
NewSessionDB returns a handle to the session & token database with the supplied expiration times
func (*SessionDB) DeleteTokenRequest ¶
func (d *SessionDB) DeleteTokenRequest(r *model.TokenRequest) error
DeleteTokenRequest removes a token request
func (*SessionDB) DeleteValue ¶
DeleteValue removes the value of a key
func (*SessionDB) GetTokenRequest ¶
GetTokenRequest returns a token request
func (*SessionDB) PutTokenRequest ¶
func (d *SessionDB) PutTokenRequest(r *model.TokenRequest) error
PutTokenRequest inserts a token request
type SettingsDB ¶
type SettingsDB struct {
// contains filtered or unexported fields
}
func NewSettingsDB ¶
func NewSettingsDB(settingsFile string, initialSettings *model.Settings) (*SettingsDB, error)
NewSettingsDB returns a handle to access the settings database / file
type SignatureRequestsDB ¶
type SignatureRequestsDB struct {
// contains filtered or unexported fields
}
func NewSignatureDB ¶
func NewSignatureDB(c DBConfig) (*SignatureRequestsDB, error)
NewSignatureDB return a handle to the signature request database
func (*SignatureRequestsDB) Add ¶
func (me *SignatureRequestsDB) Add(item *model.SignatureRequestItem) error
Add saves a signature request into the database
func (*SignatureRequestsDB) Close ¶
func (me *SignatureRequestsDB) Close() error
Close closes the database
func (*SignatureRequestsDB) GetByHashAndSigner ¶
func (me *SignatureRequestsDB) GetByHashAndSigner(hash string, signatory string) (*[]model.SignatureRequestItem, error)
GetByHashAndSigner returns a list of signture requests for a specific file hash and signatory
func (*SignatureRequestsDB) GetByID ¶
func (me *SignatureRequestsDB) GetByID(docid string, docpath string) (*[]model.SignatureRequestItem, error)
GetByID returns the signature request item by its id
func (*SignatureRequestsDB) GetBySignatory ¶
func (me *SignatureRequestsDB) GetBySignatory(ethAddr string) (*[]model.SignatureRequestItem, error)
GetBySignatory returns the list of signature requests for a specific signatory
func (*SignatureRequestsDB) SetRejected ¶
func (me *SignatureRequestsDB) SetRejected(docid string, docpath string, signatory string) error
SetRejected alters the status of a signature request to rejected
func (*SignatureRequestsDB) SetRevoked ¶
func (me *SignatureRequestsDB) SetRevoked(docid string, docpath string, signatory string) error
SetRevoked alters the status of a signature request to revoked
type UserDB ¶
type UserDB struct {
// contains filtered or unexported fields
}
func NewUserDB ¶
NewUserDB returns a handle to the user database, containing the user object, incl. their credentials for login and API access
func (*UserDB) CreateApiKey ¶
CreateApiKey saves and returns a newly created random api key for a user
func (*UserDB) DeleteApiKey ¶
DeleteApiKey removes an existing API key by name or value
func (*UserDB) GetBaseFilePath ¶
GetBaseFilePath returns the base file path
func (*UserDB) GetByApiKey ¶
APIKey tries to authenticate the user with the supplied API key and returns the user object or an error
func (*UserDB) GetByBCAddress ¶
GetByBCAddress return a specific user object by matching the ethereum address
func (*UserDB) GetByEmail ¶
GetByEmail return a specific user object by matching the email address
func (*UserDB) GetProfilePhoto ¶
GetProfilePhoto returns a users photo
func (*UserDB) List ¶
func (me *UserDB) List(auth model.Auth, contains string, options storage.Options) ([]*model.User, error)
List returns references to all the user object matching the supplied filter criteria
func (*UserDB) Login ¶
Login tries to authenticate a user with the supplied credentials and returns the user object or an error
func (*UserDB) PutProfilePhoto ¶
PutProfilePhoto sets a new photo for a specific user
func (*UserDB) UpdateEmail ¶
UpdateEmail sets a new email address for a specific user id
type UserDataDB ¶
type UserDataDB struct {
// contains filtered or unexported fields
}
func NewUserDataDB ¶
func NewUserDataDB(c DBConfig) (*UserDataDB, error)
NewUserDataDB returns a handle to the user data database
func (*UserDataDB) AssetsKey ¶
func (me *UserDataDB) AssetsKey() string
AssetsKey returns the base path of the data items associated file
func (*UserDataDB) Get ¶
func (me *UserDataDB) Get(auth model.Auth, id string) (*model.UserDataItem, error)
Get returns a specific user data item by matching the id
func (*UserDataDB) GetAllFileInfosOf ¶
func (me *UserDataDB) GetAllFileInfosOf(ud *model.UserDataItem) []*file.IO
GetAllFileInfosOf returns the associated file objects of a user data item
func (*UserDataDB) GetByWorkflow ¶
func (me *UserDataDB) GetByWorkflow(auth model.Auth, wf *model.WorkflowItem, finished bool) (*model.UserDataItem, bool, error)
GetByWorkflow returns a the user data item by matching a specific workflow item
func (*UserDataDB) GetData ¶
func (me *UserDataDB) GetData(auth model.Auth, id, dataPath string) (interface{}, error)
GetData returns the data object for retrieving specific data from a data item
func (*UserDataDB) GetDataAndFiles ¶
func (me *UserDataDB) GetDataAndFiles(auth model.Auth, id, dataPath string) (interface{}, []string, error)
GetDataAndFiles returns the data object and associated files
func (*UserDataDB) GetDataFile ¶
GetDataFile returns the files associated with a data item
func (*UserDataDB) List ¶
func (me *UserDataDB) List(auth model.Auth, contains string, options storage.Options, includeReadGranted bool) ([]*model.UserDataItem, error)
List returns all user data item matching the supplied filter criteria
func (*UserDataDB) NewFile ¶
NewFile return a handle for a new data item file based on the defined base path and specific file metadata
func (*UserDataDB) Put ¶
func (me *UserDataDB) Put(auth model.Auth, item *model.UserDataItem) error
Put saves a user data item into the database
type VarsMaintenance ¶
type WorkflowDB ¶
type WorkflowDB struct {
// contains filtered or unexported fields
}
func NewWorkflowDB ¶
func NewWorkflowDB(c DBConfig) (*WorkflowDB, error)
NewWorkflowDB returns a handle to the workflow database
func (*WorkflowDB) Delete ¶
func (me *WorkflowDB) Delete(auth model.Auth, id string) error
Delete removes a workflow item from the database by matching its id
func (*WorkflowDB) DeleteExternalNode ¶
func (me *WorkflowDB) DeleteExternalNode(auth model.Auth, id string) error
DeleteExternalNode remove an external node definition
func (*WorkflowDB) Get ¶
func (me *WorkflowDB) Get(auth model.Auth, id string) (*model.WorkflowItem, error)
Get retrieves a worklfow item machting its id
func (*WorkflowDB) GetList ¶
func (me *WorkflowDB) GetList(auth model.Auth, ids []string) ([]*model.WorkflowItem, error)
GetList retrieves multiple workflows by matching their id
func (*WorkflowDB) GetPublished ¶
func (me *WorkflowDB) GetPublished(auth model.Auth, id string) (*model.WorkflowItem, error)
GetPublished returns a workflow item matching the supplied filter options that if it is flagged as published
func (*WorkflowDB) List ¶
func (me *WorkflowDB) List(auth model.Auth, contains string, options storage.Options) ([]*model.WorkflowItem, error)
ListPublished returns all workflow items matching the supplied filter options
func (*WorkflowDB) ListExternalNodes ¶
func (me *WorkflowDB) ListExternalNodes() []*externalnode.ExternalNode
ListExternalNodes return a list of all external node definitions
func (*WorkflowDB) ListPublished ¶
func (me *WorkflowDB) ListPublished(auth model.Auth, contains string, options storage.Options) ([]*model.WorkflowItem, error)
ListPublished returns all workflow items matching the supplied filter options that are flagged as published
func (*WorkflowDB) NodeByName ¶
func (me *WorkflowDB) NodeByName(auth model.Auth, name string) (*externalnode.ExternalNode, error)
NodeByName retrieves an external node definition matching the supplied name
func (*WorkflowDB) Put ¶
func (me *WorkflowDB) Put(auth model.Auth, item *model.WorkflowItem) error
Put adds a workflow item into the database
func (*WorkflowDB) PutExternalNodeInstance ¶
func (me *WorkflowDB) PutExternalNodeInstance(auth model.Auth, item *externalnode.ExternalNodeInstance) error
PutExternalNodeInstance saves an instance of an external node to the database
func (*WorkflowDB) QueryFromInstanceID ¶
func (me *WorkflowDB) QueryFromInstanceID(auth model.Auth, id string) (externalnode.ExternalNodeInstance, error)
QueryFromInstanceID return an external node instance by machting the specified id
func (*WorkflowDB) RegisterExternalNode ¶
func (me *WorkflowDB) RegisterExternalNode(auth model.Auth, n *externalnode.ExternalNode) error
RegisterExternalNode saves an external node definition
type WorkflowPaymentsDB ¶
type WorkflowPaymentsDB struct {
// contains filtered or unexported fields
}
func NewWorkflowPaymentDB ¶
func NewWorkflowPaymentDB(c DBConfig) (*WorkflowPaymentsDB, error)
NewWorkflowPaymentDB return a handle to the workflow payment database
func (*WorkflowPaymentsDB) All ¶
func (me *WorkflowPaymentsDB) All() ([]*model.WorkflowPaymentItem, error)
All returns a list of all workflow payment items from the database
func (*WorkflowPaymentsDB) Cancel ¶
func (me *WorkflowPaymentsDB) Cancel(paymentId, from string) error
Cancel sets the status of a workflow payment item to cancelled for the item matching the supplied id and from address
func (*WorkflowPaymentsDB) Close ¶
func (me *WorkflowPaymentsDB) Close() error
Close closes the database
func (*WorkflowPaymentsDB) ConfirmPayment ¶
func (me *WorkflowPaymentsDB) ConfirmPayment(txHash, from, to string, xes uint64) error
ConfirmPayment sets the status of a workflow payment item to confirmed by trying to find a matching transaction hash and searching for pending or created items matching the supplied criteria
func (*WorkflowPaymentsDB) Delete ¶
func (me *WorkflowPaymentsDB) Delete(paymentId string) error
Delete sets the status of a workflow payment item to deleted by matching the supplied id
func (*WorkflowPaymentsDB) Get ¶
func (me *WorkflowPaymentsDB) Get(paymentId string) (*model.WorkflowPaymentItem, error)
Get returns a specific Workflow payment item matching its id
func (*WorkflowPaymentsDB) GetByTxHashAndStatusAndFromEthAddress ¶
func (me *WorkflowPaymentsDB) GetByTxHashAndStatusAndFromEthAddress(txHash, status, fromEthAddr string) (*model.WorkflowPaymentItem, error)
GetByTxHashAndStatusAndFromEthAddress returns a workflow payment item by matching the supplied filter parameters
func (*WorkflowPaymentsDB) GetByWorkflowIdAndFromEthAddress ¶
func (me *WorkflowPaymentsDB) GetByWorkflowIdAndFromEthAddress(workflowID, fromEthAddr string, statuses []string) (*model.WorkflowPaymentItem, error)
GetByWorkflowIdAndFromEthAddress returns a workflow payment item by matching the supplied filter parameters
func (*WorkflowPaymentsDB) Redeem ¶
func (me *WorkflowPaymentsDB) Redeem(workflowId, from string) error
Redeem sets the status of a workflow payment item to redeemed for the item matching the supplied id and from address
func (*WorkflowPaymentsDB) Remove ¶
func (me *WorkflowPaymentsDB) Remove(payment *model.WorkflowPaymentItem) error
Remove removes a workflow payment item
func (*WorkflowPaymentsDB) Save ¶
func (me *WorkflowPaymentsDB) Save(item *model.WorkflowPaymentItem) error
Save add a workflow payment item to the database
func (*WorkflowPaymentsDB) SetAbandonedToTimeoutBeforeTime ¶
func (me *WorkflowPaymentsDB) SetAbandonedToTimeoutBeforeTime(beforeTime time.Time) error
SetAbandonedToTimeoutBeforeTime updates the status of all payment items created before the specified time to status timeout
func (*WorkflowPaymentsDB) Update ¶
func (me *WorkflowPaymentsDB) Update(paymentId, status, txHash, from string) error
Update sets the status and tx hash of created workflow items matching the supplied criteria to the supplied values