Documentation
¶
Index ¶
- func ClearKey(key string) error
- func CreateOAuthToken() error
- func CreateUser(_newUser User) error
- func GetKey(key string) (string, error)
- func MgoRequest(collection string, s func(*mgo.Collection) error) error
- func SetKey(key string, value string) error
- func UpdateUser(_existingUser User) error
- type NotificationProposalStarted
- type OAuthToken
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOAuthToken ¶
func CreateOAuthToken() error
CreateOAuthToken inserts a new OAuth token into the database
func MgoRequest ¶
func MgoRequest(collection string, s func(*mgo.Collection) error) error
MgoRequest will interact with the database
func UpdateUser ¶
UpdateUser updates an existing user in the database
Types ¶
type NotificationProposalStarted ¶
type NotificationProposalStarted struct { TwitterID string `json:"twitter_id" bson:"twitter_id"` LiveMode bool `json:"live_mode" bson:"live_mode"` RepositoryHash string `json:"repository_hash" bson:"repository_hash"` RepositoryName string `json:"repository_name" bson:"repository_name"` KNWVoteID int `json:"knw_vote_id" bson:"knw_vote_id"` KnowledgeLabel string `json:"knowledge_label" bson:"knowledge_label"` ProposerTwitterID string `json:"proposer_twitter_id" bson:"proposer_twitter_id"` ProposerGithubID string `json:"proposer_github_handle" bson:"proposer_github_handle"` Description string `json:"description" bson:"description"` Identifier string `json:"identifier" bson:"identifier"` CommitUntil time.Time `json:"commit_until" bson:"commit_until"` RevealUntil time.Time `json:"reveal_until" bson:"reveal_until"` }
NotificationProposalStarted struct
type OAuthToken ¶
type OAuthToken struct { TwitterHandle string `bson:"twitter_handle"` TwitterID int64 `bson:"twitter_id"` OAuthToken string `bson:"oauth_token"` OAuthTokenSecret string `bson:"oauth_token_secret"` CreatedAt time.Time `bson:"created_at"` }
OAuthToken stores the data required to control the two bots which act as the frontend for our TCR. This table should only have two rows, one for the TCR Bot and one for the VIP bot.
func FindOAuthTokenByHandle ¶
func FindOAuthTokenByHandle(handle string) (*OAuthToken, error)
FindOAuthTokenByHandle returns an OAuth token given a twitter handle
func (*OAuthToken) Save ¶
func (token *OAuthToken) Save() error
Save saves the OAuthToken to the database
type User ¶
type User struct { TwitterID string `bson:"twitter_id"` TwitterScreenName string `bson:"twitter_screen_name"` ETHAddress string `bson:"eth_address"` PassedKYCDemo bool `bson:"passed_kyc_demo"` PassedKYCLive bool `bson:"passed_kyc_live"` SkipKYC bool `bson:"skip_kyc"` DateOfContact time.Time `bson:"date_of_contact"` HasUsedClient bool `bson:"used_client"` HasBeenAskedForFeedback bool `bson:"asked_for_feedback"` HasProvidedFeedback bool `bson:"provided_feedback"` }
User struct for a twitter user
func GetUsersForFeedback ¶
GetUsersForFeedback returns an array of users that passed the KYC but haven't provided feedback yet
Click to show internal directories.
Click to hide internal directories.