Documentation
¶
Index ¶
- Constants
- func GenerateInviteCode(user *User) (string, error)
- func RegisterUser(user *User) error
- type Account
- type AppMetadata
- type BillingInfo
- type BillingInvoice
- type Component
- func (c *Component) MatchHTTP(r *http.Request) bool
- func (c *Component) PreprocessOrder() uint
- func (c *Component) PreprocessSession(sess ssh.Session) (cont bool, msg string)
- func (c *Component) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (c *Component) StripeEvents() []string
- func (c *Component) StripeReceive(event stripe.Event)
- func (c *Component) WebAuthLogin(w http.ResponseWriter, r *http.Request, token *oauth2.Token) error
- func (c *Component) WebAuthLogout(w http.ResponseWriter, r *http.Request) error
- func (c *Component) WebTemplateFuncMap(r *http.Request) template.FuncMap
- type Invites
- type User
Constants ¶
View Source
const ( EventNewSubscriber = "NewSubscriber" EventFirstLogin = "FirstLogin" )
View Source
const (
MaxPendingInvites = 5
)
Variables ¶
This section is empty.
Functions ¶
func GenerateInviteCode ¶
func RegisterUser ¶
Types ¶
type AppMetadata ¶
type BillingInfo ¶
type BillingInfo struct {
Plan string
Email string
Period string
NextPayment time.Time
NextAmount string
CardType string
CardLastFour string
CardExpMonth uint8
CardExpYear uint16
History []BillingInvoice
}
func GetBillingInfo ¶
func GetBillingInfo(user *User) (BillingInfo, error)
type BillingInvoice ¶
type Component ¶
type Component struct {
}
func (*Component) PreprocessOrder ¶
func (*Component) PreprocessSession ¶
func (*Component) StripeEvents ¶
func (*Component) StripeReceive ¶
func (*Component) WebAuthLogin ¶
func (*Component) WebAuthLogout ¶
type User ¶
type User struct {
Name string
Nickname string
Email string
Picture string
Account AppMetadata `mapstructure:"app_metadata"`
ID string `mapstructure:"user_id"`
}
func ContextUser ¶
func InviteCodeUser ¶
func LookupNickname ¶
func LookupUser ¶
func SessionUser ¶
Click to show internal directories.
Click to hide internal directories.