Documentation ¶
Index ¶
- Variables
- type API
- type InMemoryVersionStore
- type Logger
- type MemberServer
- func (m *MemberServer) AddNewMemberHandler(w http.ResponseWriter, r *http.Request)
- func (m *MemberServer) AssignRFIDHandler(w http.ResponseWriter, r *http.Request)
- func (m *MemberServer) AssignRFIDSelfHandler(w http.ResponseWriter, r *http.Request)
- func (m *MemberServer) CheckStatus(w http.ResponseWriter, r *http.Request)
- func (m *MemberServer) GetByEmailHandler(w http.ResponseWriter, r *http.Request)
- func (m *MemberServer) GetCurrentUserHandler(w http.ResponseWriter, r *http.Request)
- func (m *MemberServer) GetMembersHandler(w http.ResponseWriter, r *http.Request)
- func (m *MemberServer) GetNonMembersOnSlackHandler(w http.ResponseWriter, r *http.Request)
- func (m *MemberServer) GetTiersHandler(w http.ResponseWriter, r *http.Request)
- func (m *MemberServer) MemberEmailHandler(w http.ResponseWriter, r *http.Request)
- func (m *MemberServer) UpdateMemberByEmailHandler(w http.ResponseWriter, r *http.Request)
- type ReportsServer
- type UserServer
- type VersionServer
- type VersionStore
Constants ¶
This section is empty.
Variables ¶
View Source
var GitCommit string
GitCommit is populated by a golang build arg
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { ResourceServer resourceAPI VersionServer *VersionServer MemberServer *MemberServer ReportsServer *ReportsServer UserServer *UserServer AuthStrategy union.Union JWTKeeper jwt.SecretsKeeper // contains filtered or unexported fields }
API endpoints
func Setup ¶
func Setup(store datastore.DataStore, auth *auth.AuthController, rm services.Resource, pp integrations.PaymentProvider, log services.Logger) API
Setup - setup us up the routes
func (API) PaypalSubscriptionWebHookHandler ¶
func (api API) PaypalSubscriptionWebHookHandler(err error, n *listener.Subscription)
PaypalSubscriptionWebHookHandler paypal will tell us when a new subscription is created.
We can use this to add a member to our database. We don't have to give them access to anything at this time, but it will make it easier to assign them an RFID fob
type InMemoryVersionStore ¶
type InMemoryVersionStore struct { }
func NewInMemoryVersionStore ¶
func NewInMemoryVersionStore() *InMemoryVersionStore
NewInMemoryVersionStore initialises an empty version store.
func (*InMemoryVersionStore) GetVersion ¶
func (i *InMemoryVersionStore) GetVersion() []byte
type Logger ¶
type Logger interface { Printf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Tracef(format string, args ...interface{}) Print(args ...interface{}) Error(args ...interface{}) Debug(args ...interface{}) Info(args ...interface{}) Trace(args ...interface{}) }
type MemberServer ¶
type MemberServer struct { ResourceManager services.Resource MemberService services.Member AuthStrategy union.Union }
func (*MemberServer) AddNewMemberHandler ¶
func (m *MemberServer) AddNewMemberHandler(w http.ResponseWriter, r *http.Request)
func (*MemberServer) AssignRFIDHandler ¶
func (m *MemberServer) AssignRFIDHandler(w http.ResponseWriter, r *http.Request)
func (*MemberServer) AssignRFIDSelfHandler ¶
func (m *MemberServer) AssignRFIDSelfHandler(w http.ResponseWriter, r *http.Request)
func (*MemberServer) CheckStatus ¶
func (m *MemberServer) CheckStatus(w http.ResponseWriter, r *http.Request)
func (*MemberServer) GetByEmailHandler ¶
func (m *MemberServer) GetByEmailHandler(w http.ResponseWriter, r *http.Request)
func (*MemberServer) GetCurrentUserHandler ¶
func (m *MemberServer) GetCurrentUserHandler(w http.ResponseWriter, r *http.Request)
func (*MemberServer) GetMembersHandler ¶
func (m *MemberServer) GetMembersHandler(w http.ResponseWriter, r *http.Request)
func (*MemberServer) GetNonMembersOnSlackHandler ¶
func (m *MemberServer) GetNonMembersOnSlackHandler(w http.ResponseWriter, r *http.Request)
func (*MemberServer) GetTiersHandler ¶
func (m *MemberServer) GetTiersHandler(w http.ResponseWriter, r *http.Request)
func (*MemberServer) MemberEmailHandler ¶
func (m *MemberServer) MemberEmailHandler(w http.ResponseWriter, r *http.Request)
func (*MemberServer) UpdateMemberByEmailHandler ¶
func (m *MemberServer) UpdateMemberByEmailHandler(w http.ResponseWriter, r *http.Request)
type ReportsServer ¶
type ReportsServer struct { Logger Logger // contains filtered or unexported fields }
func (*ReportsServer) GetAccessStatsChart ¶
func (r *ReportsServer) GetAccessStatsChart(w http.ResponseWriter, req *http.Request)
func (*ReportsServer) GetMemberChurn ¶
func (r *ReportsServer) GetMemberChurn(w http.ResponseWriter, req *http.Request)
func (*ReportsServer) GetMemberCountsCharts ¶
func (r *ReportsServer) GetMemberCountsCharts(w http.ResponseWriter, req *http.Request)
type UserServer ¶
type UserServer struct { AuthStrategy union.Union JWTKeeper jwt.SecretsKeeper // contains filtered or unexported fields }
func NewUserServer ¶
func NewUserServer(store datastore.DataStore, config config.Config) UserServer
func (*UserServer) GetUser ¶
func (us *UserServer) GetUser(w http.ResponseWriter, r *http.Request)
getUser responds with the current logged in user
type VersionServer ¶
type VersionServer struct {
// contains filtered or unexported fields
}
VersionServer is a HTTP interface for version information.
func (*VersionServer) ServeHTTP ¶
func (v *VersionServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
type VersionStore ¶
type VersionStore interface {
GetVersion() []byte
}
VersionStore stores version information about the app.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.