Documentation
¶
Index ¶
- type Account
- type Conversion
- type State
- func (s *State) AddAccount(account *Account) error
- func (s *State) AddConversion(conversion *Conversion) error
- func (s *State) AddTransition(transition *Transition) error
- func (s *State) DeleteAccount(id string) error
- func (s *State) GetAccount(id string) (*Account, error)
- func (s *State) GetAccountPubKey(id string) (*crypto.Key, error)
- func (s *State) GetConversion(id string) (*Conversion, error)
- func (s *State) GetTransition(id string) (*Transition, error)
- func (s *State) HasAccount(id string) bool
- func (s *State) HasConversion(id string) bool
- func (s *State) HasTransition(id string) bool
- func (s *State) ListAccounts() (result []*Account, err error)
- func (s *State) ListConversions() (result []*Conversion, err error)
- func (s *State) ListTransitions() (result []*Transition, err error)
- func (s *State) SearchConversions(query interface{}, limit, offset int) (result []*Conversion, err error)
- func (s *State) SearchTransitions(query interface{}, limit, offset int) (result []*Transition, err error)
- func (s *State) SetAccount(account *Account) error
- func (s *State) SetConversion(conversion *Conversion) error
- func (s *State) SetTransition(transition *Transition) error
- type Transition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conversion ¶
type Conversion struct { ID string `msg:"_id" json:"_id" mapstructure:"_id" bson:"_id"` AdvertiserAccountID string `msg:"advertiser_account_id" json:"advertiser_account_id" mapstructure:"advertiser_account_id" bson:"advertiser_account_id"` AffiliateAccountID string `msg:"affiliate_account_id" json:"affiliate_account_id" mapstructure:"affiliate_account_id" bson:"affiliate_account_id"` ClickID string `msg:"click_id" json:"click_id" mapstructure:"click_id" bson:"click_id"` StreamID string `msg:"stream_id" json:"stream_id" mapstructure:"stream_id" bson:"stream_id"` OfferID string `msg:"offer_id" json:"offer_id" mapstructure:"offer_id" bson:"offer_id"` ClientID string `msg:"client_id" json:"client_id" mapstructure:"client_id" bson:"client_id"` GoalID string `msg:"goal_id" json:"goal_id" mapstructure:"goal_id" bson:"goal_id"` CreatedAt float64 `msg:"created_at" json:"created_at" mapstructure:"created_at" bson:"created_at"` Comment string `msg:"comment" json:"comment" mapstructure:"comment" bson:"comment"` Status string `msg:"status" json:"status" mapstructure:"status" bson:"status"` }
type State ¶
func NewStateFromDB ¶
NewStateFromDB method constructs MongoDB state
func (*State) AddAccount ¶
func (*State) AddConversion ¶
func (s *State) AddConversion(conversion *Conversion) error
func (*State) AddTransition ¶
func (s *State) AddTransition(transition *Transition) error
func (*State) DeleteAccount ¶
func (*State) GetConversion ¶
func (s *State) GetConversion(id string) (*Conversion, error)
func (*State) GetTransition ¶
func (s *State) GetTransition(id string) (*Transition, error)
func (*State) HasAccount ¶
func (*State) HasConversion ¶
func (*State) HasTransition ¶
func (*State) ListAccounts ¶
func (*State) ListConversions ¶
func (s *State) ListConversions() (result []*Conversion, err error)
func (*State) ListTransitions ¶
func (s *State) ListTransitions() (result []*Transition, err error)
func (*State) SearchConversions ¶
func (s *State) SearchConversions(query interface{}, limit, offset int) (result []*Conversion, err error)
func (*State) SearchTransitions ¶
func (s *State) SearchTransitions(query interface{}, limit, offset int) (result []*Transition, err error)
func (*State) SetAccount ¶
func (*State) SetConversion ¶
func (s *State) SetConversion(conversion *Conversion) error
func (*State) SetTransition ¶
func (s *State) SetTransition(transition *Transition) error
type Transition ¶
type Transition struct { ID string `msg:"_id" json:"_id" mapstructure:"_id" bson:"_id"` AdvertiserAccountID string `msg:"advertiser_account_id" json:"advertiser_account_id" mapstructure:"advertiser_account_id" bson:"advertiser_account_id"` AffiliateAccountID string `msg:"affiliate_account_id" json:"affiliate_account_id" mapstructure:"affiliate_account_id" bson:"affiliate_account_id"` ClickID string `msg:"click_id" json:"click_id" mapstructure:"click_id" bson:"click_id"` StreamID string `msg:"stream_id" json:"stream_id" mapstructure:"stream_id" bson:"stream_id"` OfferID string `msg:"offer_id" json:"offer_id" mapstructure:"offer_id" bson:"offer_id"` CreatedAt float64 `msg:"created_at" json:"created_at" mapstructure:"created_at" bson:"created_at"` ExpiresIn int64 `msg:"expires_in" json:"expires_in" mapstructure:"expires_in" bson:"expires_in"` }
Click to show internal directories.
Click to hide internal directories.