Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a storage client
func NewPostgresStore ¶
NewPostgresStore creates a postgres client
func (*Store) AddTransactions ¶
AddTransactions adds a transaction to the db
func (*Store) SampleUsersWithoutBingResults ¶ added in v0.0.4
SampleUsersWithoutBingResults samples users
func (*Store) UpdateUser ¶ added in v0.0.4
UpdateUser updates a user
type Transaction ¶
type Transaction struct { ID int Message string `pg:"type:'varchar'"` Story string `pg:"type:'varchar'"` Type string `pg:"type:'varchar'"` Created string `pg:"type:'timestamp'"` Updated string `pg:"type:'timestamp'"` ActorUserID int RecipientID int }
Transaction is postgres transaction
type User ¶
type User struct { ID int Transactions []Transaction `pg:"many2many:user_to_transactions"` Username string `pg:"type:'varchar'"` PictureURL string `pg:"type:'varchar'"` Name string `pg:"type:'varchar'"` FirstName string `pg:"type:'varchar'"` LastName string `pg:"type:'varchar'"` Created string `pg:"type:'timestamp'"` IsBusiness bool `pg:"type:'boolean',default:false"` Cancelled bool `pg:"type:'boolean',default:false"` ExternalID string `pg:"type:'varchar'"` BingResults map[string]interface{} `pg:"type:'json'"` }
User is a postgres user
type UserToTransaction ¶
UserToTransaction is relation between users and transactions
Click to show internal directories.
Click to hide internal directories.