participants

package
v0.0.0-...-abb4387 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNew

func AddNew(participant ParticipantRecord) error

func ImportByEmail

func ImportByEmail(email string, fullName string, country string) error

func ImportBySignature

func ImportBySignature(jsonStr string) error

This function receives a json string of the signed ID, verifies it with the given signature and if it passes, the data will be added to the database

Types

type ParticipantRecord

type ParticipantRecord struct {
	FullLegalName  string `json:"full_legal_name"`
	GithubHandle   string `json:"github_handle"`
	EmailAddress   string `json:"email_address"`
	AccountAddress string `json:"account_address"`
	PubKey         string `json:"pub_key"` //TODO: Check if we need it anymore
	Country        string `json:"country"`
	KycSessionId   string `json:"kyc_session_id"`
	KycVerified    bool   `json:"kyc_verified"`
}

func DBRowToParticipantRecord

func DBRowToParticipantRecord(row database.RowType) ParticipantRecord

func DBRowToParticipantRecords

func DBRowToParticipantRecords(row []database.RowType) []ParticipantRecord

func GetParticipantByAddress

func GetParticipantByAddress(accAddress string) (ParticipantRecord, error)

func GetParticipants

func GetParticipants() ([]ParticipantRecord, error)

func GetParticipantsByEmail

func GetParticipantsByEmail(email string) ([]ParticipantRecord, error)

func GetParticipantsWithPagination

func GetParticipantsWithPagination(limitOffset types.DBLimitOffset) ([]ParticipantRecord, types.Pagination, error)

func (*ParticipantRecord) Update

func (p *ParticipantRecord) Update() (int, error)

Returns RowsAffected, error

func (*ParticipantRecord) UpdateByEmail

func (p *ParticipantRecord) UpdateByEmail() (int, error)

Returns RowsAffected, error

func (*ParticipantRecord) UpdateKYC

func (p *ParticipantRecord) UpdateKYC() (int, error)

Returns RowsAffected, error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL