Documentation
¶
Index ¶
- func API(log *logrus.Logger, registry *prometheus.Registry, db *db.MongoDB, ...) http.Handler
- func RandomPassword(n int) string
- type Account
- func (u *Account) Create() http.HandlerFunc
- func (u *Account) Delete() http.HandlerFunc
- func (u *Account) Get() http.HandlerFunc
- func (u *Account) List() http.HandlerFunc
- func (u *Account) Login() http.HandlerFunc
- func (u *Account) OAuthGoogle() http.HandlerFunc
- func (u *Account) OAuthGoogleCB() http.HandlerFunc
- func (u *Account) Reset() http.HandlerFunc
- func (u *Account) ResetVerify() http.HandlerFunc
- func (u *Account) Token() http.HandlerFunc
- func (u *Account) Update() http.HandlerFunc
- func (u *Account) Verify() http.HandlerFunc
- type Articles
- type Cases
- type Feeds
- type Organization
- func (u *Organization) Create() http.HandlerFunc
- func (u *Organization) Delete() http.HandlerFunc
- func (u *Organization) Get() http.HandlerFunc
- func (u *Organization) List() http.HandlerFunc
- func (u *Organization) ProccessInvitation() http.HandlerFunc
- func (u *Organization) RemoveMember() http.HandlerFunc
- func (u *Organization) Update() http.HandlerFunc
- func (u *Organization) UpsertMember() http.HandlerFunc
- type Passages
- type Reports
- type Subscription
- type Twitter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func API ¶
func API( log *logrus.Logger, registry *prometheus.Registry, db *db.MongoDB, es *es.Elastic, neoClient *neo.Neo, mw []func(http.Handler) http.Handler, authenticator auth.Authenticator, externalAuth map[string]*oauth2.Config, mail *mailer.Mailer, twillio *twillio.Twillio, twtt *anaconda.TwitterApi, scrape scrape_pb.ScrapeServiceClient, cfg *config.Config) http.Handler
API returns a handler for a set of routes
Types ¶
type Account ¶
type Account struct { DB *db.MongoDB TokenGenerator account.TokenGenerator // contains filtered or unexported fields }
Account is the our handler struct for user specific requests
func (*Account) Delete ¶
func (u *Account) Delete() http.HandlerFunc
Delete delete an existing user from an id.
func (*Account) Get ¶
func (u *Account) Get() http.HandlerFunc
Get returns an existing user from an id.
func (*Account) List ¶
func (u *Account) List() http.HandlerFunc
List returns all the existing user in the system.
func (*Account) Login ¶
func (u *Account) Login() http.HandlerFunc
Login handles a request to authenticate a account. It expects a request using Basic Auth with a user's email and password. It responds with the user model.
func (*Account) OAuthGoogleCB ¶
func (u *Account) OAuthGoogleCB() http.HandlerFunc
OAuthGoogleCB Callback
func (*Account) ResetVerify ¶
func (u *Account) ResetVerify() http.HandlerFunc
ResetVerify password request.
func (*Account) Token ¶
func (u *Account) Token() http.HandlerFunc
Token handles a request to authenticate a account. It expects a request using Basic Auth with a user's email and password. It responds with a JWT.
type Articles ¶
type Articles struct {
// contains filtered or unexported fields
}
func NewArticlesHandler ¶
func (*Articles) Get ¶
func (handler *Articles) Get() http.HandlerFunc
func (*Articles) List ¶
func (handler *Articles) List() http.HandlerFunc
q, from, to, title, body, feeds, topics, skip
func (*Articles) ParseArticle ¶
func (handler *Articles) ParseArticle() http.HandlerFunc
type Cases ¶
type Cases struct {
// contains filtered or unexported fields
}
func NewCasesHandler ¶
func (*Cases) Count ¶
func (handler *Cases) Count() http.HandlerFunc
func (*Cases) Get ¶
func (handler *Cases) Get() http.HandlerFunc
func (*Cases) List ¶
func (handler *Cases) List() http.HandlerFunc
type Feeds ¶
Feeds is the handler struct for org related enbpoints
func (*Feeds) Create ¶
func (u *Feeds) Create() http.HandlerFunc
func (*Feeds) Delete ¶
func (u *Feeds) Delete() http.HandlerFunc
Delete an existing organization from an id.
func (*Feeds) Export ¶
func (u *Feeds) Export() http.HandlerFunc
func (*Feeds) Get ¶
func (u *Feeds) Get() http.HandlerFunc
func (*Feeds) Import ¶
func (u *Feeds) Import() http.HandlerFunc
func (*Feeds) List ¶
func (u *Feeds) List() http.HandlerFunc
List returns all the existing user in the system.
func (*Feeds) Update ¶
func (u *Feeds) Update() http.HandlerFunc
type Organization ¶
Organization is the handler struct for org related enbpoints
func (*Organization) Create ¶
func (u *Organization) Create() http.HandlerFunc
func (*Organization) Delete ¶
func (u *Organization) Delete() http.HandlerFunc
Delete an existing organization from an id.
func (*Organization) Get ¶
func (u *Organization) Get() http.HandlerFunc
func (*Organization) List ¶
func (u *Organization) List() http.HandlerFunc
List returns all the existing user in the system.
func (*Organization) ProccessInvitation ¶
func (u *Organization) ProccessInvitation() http.HandlerFunc
func (*Organization) RemoveMember ¶
func (u *Organization) RemoveMember() http.HandlerFunc
func (*Organization) Update ¶
func (u *Organization) Update() http.HandlerFunc
func (*Organization) UpsertMember ¶
func (u *Organization) UpsertMember() http.HandlerFunc
type Reports ¶
Reports is the our handler struct for reports api
func (*Reports) Create ¶
func (u *Reports) Create() http.HandlerFunc
func (*Reports) Get ¶
func (u *Reports) Get() http.HandlerFunc
func (*Reports) List ¶
func (u *Reports) List() http.HandlerFunc
List returns all the existing user in the system.
type Subscription ¶
type Subscription struct { DB *db.MongoDB StripeKey string // contains filtered or unexported fields }
Subscription is the handler struct for org related enbpoints
func (*Subscription) CreateCustomer ¶
func (u *Subscription) CreateCustomer() http.HandlerFunc
func (*Subscription) CreateSession ¶
func (u *Subscription) CreateSession() http.HandlerFunc
func (*Subscription) Delete ¶
func (u *Subscription) Delete() http.HandlerFunc
Delete an existing organization from an id.
func (*Subscription) Update ¶
func (u *Subscription) Update() http.HandlerFunc