Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectedOrganizations ¶
type ConnectedOrganizations struct { ID string `json:"id" db:"id"` OrganizationID string `json:"organization_id" db:"organization_id"` CreatedAt time.Time `json:"created_at" db:"created_at"` CreatedBy string `json:"created_by" db:"created_by"` }
ConnectedOrganizations ...
func (*ConnectedOrganizations) ValidateInvite ¶
func (c *ConnectedOrganizations) ValidateInvite() error
ValidateInvite ...
type EthereumAccount ¶
type EthereumAccount struct { AccountID int `json:"account_id" db:"account_id"` Name string `json:"name" db:"name"` OrganizationID int `json:"organization_id" db:"organization_id"` Address string `json:"address" db:"address"` Balance decimal.Decimal `json:"balance" db:"balance"` Tokens decimal.Decimal `json:"tokens" db:"tokens"` IsActive bool `json:"is_active" db:"is_active"` IsPrivate bool `json:"is_private" db:"is_private"` CreatedBy string `json:"created_by" db:"created_by"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedBy string `json:"updated_by,omitempty" db:"updated_by"` UpdatedAt time.Time `json:"updated_at,omitempty" db:"updated_at"` }
EthereumAccount structure
func (*EthereumAccount) ValidateEthereum ¶
func (a *EthereumAccount) ValidateEthereum() error
ValidateEthereum ...
type EthereumAccounts ¶
type EthereumAccounts []EthereumAccount
EthereumAccounts is an array of EthereumAccount objects
type Genome ¶
type Genome struct { GenomeID int `json:"genome_id" db:"genome_id"` Name string `json:"genome_name" db:"genome_name"` OrganizationID int `json:"organization_id" db:"organization_id"` OrganizationName string `json:"organization_name" db:"organization_name"` VaccineID int `json:"vaccine_id" db:"vaccine_id"` VaccineName string `json:"vaccine_name" db:"vaccine_name"` FileUrl string `json:"file_url" db:"file_url"` Price string `json:"price" db:"price"` VirusName string `json:"virus_name" db:"virus_name"` SimularityRate string `json:"simularity_rate" db:"simularity_rate"` Origin string `json:"origin" db:"origin"` OwnerAccount string `json:"owner_account" db:"owner_account"` NucypherAccount string `json:"nucypher_account" db:"nucypher_account"` Filename string `json:"filename" db:"filename"` TokenID int `json:"token_id" db:"token_id"` ReceiptID int `json:"receipt_id" db:"receipt_id"` PolicyID int `json:"policy_id" db:"policy_id"` EthereumAddress string `json:"ethereum_address" db:"ethereum_address"` IsActive bool `json:"is_active" db:"is_active"` IsSold bool `json:"is_sold,omitempty" db:"is_sold"` CreatedBy string `json:"created_by" db:"created_by"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedBy string `json:"updated_by,omitempty" db:"updated_by"` UpdatedAt time.Time `json:"updated_at,omitempty" db:"updated_at"` }
Genome structure the same as into database
type NucypherAccount ¶
type NucypherAccount struct { AccountID int `json:"account_id" db:"account_id"` Name string `json:"name" db:"name"` OrganizationID int `json:"organization_id" db:"organization_id"` Address string `json:"address" db:"address"` SigningKey string `json:"signing_key" db:"signing_key"` EncryptingKey string `json:"encrypting_key" db:"encrypting_key"` Balance decimal.Decimal `json:"balance" db:"balance"` Tokens decimal.Decimal `json:"tokens" db:"tokens"` IsActive bool `json:"is_active" db:"is_active"` IsPrivate bool `json:"is_private" db:"is_private"` CreatedBy string `json:"created_by" db:"created_by"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedBy string `json:"updated_by,omitempty" db:"updated_by"` UpdatedAt time.Time `json:"updated_at,omitempty" db:"updated_at"` }
NucypherAccount structure
type NucypherAccounts ¶
type NucypherAccounts []NucypherAccount
NucypherAccounts is an array of NucypherAccount objects
type NucypherPolicy ¶
type NucypherPolicy struct { PolicyID int `json:"policy_id" db:"policy_id"` AliceSigningPublicKey string `json:"alice_sig_pubkey" db:"alice_sig_pubkey"` Label string `json:"label" db:"label"` PolicyPublicKey string `json:"policy_pubkey" db:"policy_pubkey"` CreatedBy string `json:"created_by" db:"created_by"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedBy string `json:"updated_by,omitempty" db:"updated_by"` UpdatedAt time.Time `json:"updated_at,omitempty" db:"updated_at"` }
func (*NucypherPolicy) ValidatePolicy ¶
func (p *NucypherPolicy) ValidatePolicy() error
ValidatePolicy validates policy for required data
type NucypherReceipt ¶
type NucypherReceipt struct { ReceiptID int `json:"receipt_id" db:"receipt_id"` EnricoPublicKey string `json:"data_source_public_key" db:"data_source_public_key"` HashKey string `json:"hash_key" db:"hash_key"` CreatedBy string `json:"created_by" db:"created_by"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedBy string `json:"updated_by,omitempty" db:"updated_by"` UpdatedAt time.Time `json:"updated_at,omitempty" db:"updated_at"` }
func (*NucypherReceipt) ValidateReceipt ¶
func (r *NucypherReceipt) ValidateReceipt() error
ValidatePolicy validates policy for required data
type Organization ¶
type Organization struct { OrganizationID int `json:"organization_id" db:"organization_id"` Name string `json:"organization_name" db:"organization_name"` Email string `json:"email" db:"email"` PhotoUrl string `json:"photo_url" db:"photo_url"` Website string `json:"website" db:"website"` Country string `json:"country" db:"country"` City string `json:"city" db:"city"` Description string `json:"description" db:"description"` Specialization string `json:"specialization" db:"specialization"` Deals string `json:"deals" db:"deals"` GenomesAmount string `json:"genomes_amount" db:"genomes_amount"` FundedAmount string `json:"funded_amount" db:"funded_amount"` IsActive bool `json:"is_active" db:"is_active"` CreatedBy string `json:"created_by" db:"created_by"` CreatedAt time.Time `json:"created_at,omitempty" db:"created_at"` UpdatedBy string `json:"updated_by,omitempty" db:"updated_by"` UpdatedAt time.Time `json:"updated_at,omitempty" db:"updated_at"` }
Organization structure the same as into database
type Organizations ¶
type Organizations []Organization
Organizations is an array of Organization objects
type RequestedGrant ¶
type RequestedGrant struct { GrantID int `json:"grant_id" db:"grant_id"` AliceEthereumAccount string `json:"alice_ethereum_account" db:"alice_ethereum_account"` AliceNucypherAccountAddress string `json:"alice_nucypher_account_address" db:"alice_nucypher_account_address"` AliceNucypherAccountName string `json:"alice_nucypher_account_name" db:"alice_nucypher_account_name"` BobEthereumAccount string `json:"bob_ethereum_account" db:"bob_ethereum_account"` BobNucypherAccountAddress string `json:"bob_nucypher_account_address" db:"bob_nucypher_account_address"` BobNucypherAccountName string `json:"bob_nucypher_account_name" db:"bob_nucypher_account_name"` TokenID int `json:"token_id" db:"token_id"` Label string `json:"label" db:"label"` HashKey string `json:"hash_key" db:"hash_key"` IsActive bool `json:"is_active" db:"is_active"` PolicyID int `json:"policy_id" db:"policy_id"` ReceiptID int `json:"receipt_id" db:"receipt_id"` CreatedBy string `json:"created_by" db:"created_by"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedBy string `json:"updated_by,omitempty" db:"updated_by"` UpdatedAt time.Time `json:"updated_at,omitempty" db:"updated_at"` }
func (*RequestedGrant) Validate ¶
func (r *RequestedGrant) Validate() error
Validate validates requested grant for required data
type Transaction ¶
type Transaction struct { ID int `json:"id" db:"id"` TxID int `json:"tx_id" db:"txid"` Timestamp time.Time `json:"timestamp" db:"timestamp"` SenderID int `json:"sender_id" db:"sender_id"` SenderAccountID int `json:"sender_account_id" db:"sender_account_id"` SenderAddress string `json:"sender_address" db:"sender_account_address"` RecipientID int `json:"recipient_id" db:"recipient_id"` RecipientAccountID int `json:"recipient_account_id" db:"recipient_account_id"` RecipientAddress string `json:"recipient_address" db:"recipient_account_address"` Value decimal.Decimal `json:"value" db:"value"` Currency string `json:"currency" db:"currency"` TxHash string `json:"txHash" db:"txhash"` TxStatus string `json:"txStatus" db:"txstatus"` Confirmations int `json:"confirmations" db:"confirmations"` CreatedBy string `json:"created_by" db:"created_by"` CreatedAt time.Time `json:"created_at" db:"created_at"` }
Transaction structure the same as into database
type User ¶
type User struct { ID int `json:"id"` Email string `json:"email"` Password string `json:"password,omitempty"` EncryptedPassword string `json:"-"` }
User structure the same as into database
func (*User) ComparePasswords ¶
ComparePasswords ...
type Vaccine ¶
type Vaccine struct { VaccineID int `json:"vaccine_id" db:"vaccine_id"` Name string `json:"vaccine_name" db:"vaccine_name"` VirusID int `json:"virus_id" db:"virus_id"` VirusName string `json:"virus_name" db:"virus_name"` Description string `json:"description" db:"description"` RequestedAmount string `json:"requested_amount" db:"requested_amount"` FundedAmount string `json:"funded_amount" db:"funded_amount"` IsActive bool `json:"is_active" db:"is_active"` CreatedBy string `json:"created_by" db:"created_by"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedBy string `json:"updated_by,omitempty" db:"updated_by"` UpdatedAt time.Time `json:"updated_at,omitempty" db:"updated_at"` }
Vaccine structure the same as into database
type Virus ¶
type Virus struct { VirusID int `json:"virus_id" db:"virus_id"` Name string `json:"virus_name" db:"virus_name"` Description string `json:"description" db:"description"` PhotoUrl string `json:"photo_url" db:"photo_url"` Family string `json:"family" db:"family"` FatalityRate string `json:"fatality_rate" db:"fatality_rate"` Spread string `json:"spread" db:"spread"` IsActive bool `json:"is_active" db:"is_active"` IsVaccine bool `json:"is_vaccine" db:"is_vaccine"` CreatedBy string `json:"created_by" db:"created_by"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedBy string `json:"updated_by,omitempty" db:"updated_by"` UpdatedAt time.Time `json:"updated_at,omitempty" db:"updated_at"` }
Virus structure the same as into database