Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
Type string `json:"@type"`
Service string `json:"service"`
ProofType string `json:"proofType"`
Identifier string `json:"identifier"`
ProofURL string `json:"proofUrl"`
}
Account models a social media proof TODO: Write method on Account to check proof
type Claim ¶
type Claim struct {
Type string `json:"@type"`
Image []Image `json:"image"`
Account []Account `json:"account"`
}
Claim contains social proofs and images
type Config ¶
type Config struct {
URLs []string
IndexMethod string
NamePageWorkers int
ResolveWorkers int
ConcurrentPageFetch int
ClientUpdateInterval int
DBBatchSize int
DBWorkers int
MongoConnection string
sync.Mutex
// contains filtered or unexported fields
}
Config is a config object for the Indexer
func (*Config) SetClients ¶
func (c *Config) SetClients()
SetClients takes the configured URLs and returns only the blockstack-core nodes that are in consensus
type DecodedProfileToken ¶
type DecodedProfileToken struct {
Payload string `json:"payload"`
Protected string `json:"protected"`
Signature string `json:"signature"`
}
func NewDecodedProfileToken ¶
func NewDecodedProfileToken(pt string) *DecodedProfileToken
func (*DecodedProfileToken) DecodedPayload ¶
func (dpt *DecodedProfileToken) DecodedPayload() *DecodedProfileTokenPayload
type DecodedToken ¶
type DecodedToken struct {
Payload Payload `json:"payload"`
Signature string `json:"signature"`
Header Header `json:"header"`
}
DecodedToken contains most of the profile information
type Domain ¶
type Domain struct {
Name string `json:"name"`
Zonefile *Zonefile `json:"zonefile"`
Profile Profile `json:"profile"`
BlockchainRecord blockstack.GetNameBlockchainRecordResult `json:"blockchainRecord"`
// contains filtered or unexported fields
}
Domain models a Blockstack domain name
func (*Domain) AddZonefile ¶
AddZonefile takes a string representation of a Zonefile and parses out some info
func (*Domain) ResolveProfile ¶
func (d *Domain) ResolveProfile()
ResolveProfile takes an initialized domain and fetches the resulting profile for that domain TODO: Make this fail early and often to prevent bottleneck also this basically doesn't work
type Image ¶
type Image struct {
Type string `json:"@type"`
ContentURL string `json:"contentUrl"`
Name string `json:"name"`
}
Image models a Profile Image
type Indexer ¶
type Indexer struct {
CurrentBlock int
ExpectedNames int
Config *Config
// contains filtered or unexported fields
}
The Indexer talks to blockstack-core and resolves all the domains and subdomains - hopefully
func (*Indexer) GetAllNamespaces ¶
func (i *Indexer) GetAllNamespaces()
GetAllNamespaces implements retries for the RPC method
func (*Indexer) GetNameAt ¶
func (i *Indexer) GetNameAt()
GetNameAt implements retries for the RPC method
func (*Indexer) GetNamesInNamespace ¶
func (i *Indexer) GetNamesInNamespace()
GetNamesInNamespace implements retries for the RPC method
func (*Indexer) GetNumNamesInNamespace ¶
func (i *Indexer) GetNumNamesInNamespace()
GetNumNamesInNamespace implements retries for the RPC method
func (*Indexer) GetZonefiles ¶
func (i *Indexer) GetZonefiles()
GetZonefiles implements retries for the RPC method
type LegacyProfile ¶
type LegacyProfile struct {
Account []map[string]string `json:"account"`
Avatar map[string]string `json:"avatar"`
Bio string `json:"bio"`
Bitcoin map[string]string `json:"bitcoin"`
Cover map[string]string `json:"cover"`
Facebook LProof `json:"facebook"`
Github LProof `json:"github"`
Linkedin map[string]string `json:"linkedin"`
Location map[string]string `json:"location"`
Name map[string]string `json:"name"`
Pgp map[string]string `json:"pgp"`
Twitter LProof `json:"twitter"`
V string `json:"v"`
Website string `json:"website"`
}
LegacyProfile models a zonefile that holds the full profile format
func (LegacyProfile) JSON ¶
func (p LegacyProfile) JSON() string
JSON statisfiles the Profile interface
func (LegacyProfile) Validate ¶
func (lp LegacyProfile) Validate() bool
type Payload ¶
type Payload struct {
Claim Claim `json:"claim"`
IssuedAt string `json:"issuedAt"`
Subject PublicKey `json:"subject"`
Issuer PublicKey `json:"issuer"`
ExpiresAt string `json:"expiresAt"`
}
Payload contains social media claim info and other
type PublicKey ¶
type PublicKey struct {
PublicKey string `json:"publicKey"`
}
PublicKey models {publicKey: "030ec5101181a8e528b70141b0cde18fda231ab1be5f166e49f813c63914f4ebc8"}
type SOProfile ¶
type SOProfile struct {
Token string `json:"token"`
ParentPublicKey string `json:"parentPublicKey"`
Encrypted bool `json:"encrypted"`
DecodedToken DecodedToken `json:"decodedToken"`
}
SOProfile models a Schema.org profile