Documentation ¶
Index ¶
- Variables
- type Persistence
- func (p *Persistence) AcceptContactVerificationRequest(id string, response string) error
- func (p *Persistence) DeclineContactVerificationRequest(id string) error
- func (p *Persistence) GetAllTrustStatus() (map[string]TrustStatus, error)
- func (p *Persistence) GetLatestVerificationRequestFrom(contactID string) (*Request, error)
- func (p *Persistence) GetLatestVerificationRequestSentTo(contactID string) (*Request, error)
- func (p *Persistence) GetReceivedVerificationRequests(myPublicKey string) ([]*Request, error)
- func (p *Persistence) GetTrustStatus(contactID string) (TrustStatus, error)
- func (p *Persistence) GetVerificationRequest(id string) (*Request, error)
- func (p *Persistence) GetVerificationRequests() ([]Request, error)
- func (p *Persistence) SaveVerificationRequest(vr *Request) error
- func (p *Persistence) SetTrustStatus(contactID string, trust TrustStatus, updatedAt uint64) error
- func (p *Persistence) UpsertTrustStatus(contactID string, trust TrustStatus, updatedAt uint64) (shouldSync bool, err error)
- type Request
- type RequestStatus
- type TrustStatus
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrVerificationRequestNotFound = errors.New("verification request not found")
)
Functions ¶
This section is empty.
Types ¶
type Persistence ¶
type Persistence struct {
// contains filtered or unexported fields
}
func NewPersistence ¶
func NewPersistence(db *sql.DB) *Persistence
func (*Persistence) AcceptContactVerificationRequest ¶
func (p *Persistence) AcceptContactVerificationRequest(id string, response string) error
func (*Persistence) DeclineContactVerificationRequest ¶
func (p *Persistence) DeclineContactVerificationRequest(id string) error
func (*Persistence) GetAllTrustStatus ¶
func (p *Persistence) GetAllTrustStatus() (map[string]TrustStatus, error)
func (*Persistence) GetLatestVerificationRequestFrom ¶ added in v0.114.1
func (p *Persistence) GetLatestVerificationRequestFrom(contactID string) (*Request, error)
func (*Persistence) GetLatestVerificationRequestSentTo ¶ added in v0.117.1
func (p *Persistence) GetLatestVerificationRequestSentTo(contactID string) (*Request, error)
func (*Persistence) GetReceivedVerificationRequests ¶
func (p *Persistence) GetReceivedVerificationRequests(myPublicKey string) ([]*Request, error)
func (*Persistence) GetTrustStatus ¶
func (p *Persistence) GetTrustStatus(contactID string) (TrustStatus, error)
func (*Persistence) GetVerificationRequest ¶ added in v0.113.0
func (p *Persistence) GetVerificationRequest(id string) (*Request, error)
func (*Persistence) GetVerificationRequests ¶
func (p *Persistence) GetVerificationRequests() ([]Request, error)
func (*Persistence) SaveVerificationRequest ¶
func (p *Persistence) SaveVerificationRequest(vr *Request) error
func (*Persistence) SetTrustStatus ¶
func (p *Persistence) SetTrustStatus(contactID string, trust TrustStatus, updatedAt uint64) error
func (*Persistence) UpsertTrustStatus ¶
func (p *Persistence) UpsertTrustStatus(contactID string, trust TrustStatus, updatedAt uint64) (shouldSync bool, err error)
type RequestStatus ¶
type RequestStatus int
const ( RequestStatusUNKNOWN RequestStatus = iota RequestStatusPENDING RequestStatusACCEPTED RequestStatusDECLINED RequestStatusCANCELED RequestStatusTRUSTED RequestStatusUNTRUSTWORTHY )
type TrustStatus ¶
type TrustStatus int
const ( TrustStatusUNKNOWN TrustStatus = iota TrustStatusTRUSTED TrustStatusUNTRUSTWORTHY )
Click to show internal directories.
Click to hide internal directories.