Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles subscription-related HTTP requests.
func NewHandler ¶
NewHandler constructs a subscription Handler.
type SubscriptionResponse ¶
type SubscriptionResponse struct {
Plan string `json:"plan"`
NoteCount int64 `json:"note_count"`
NoteLimit *int `json:"note_limit"`
}
SubscriptionResponse is the response body for GET /api/v1/subscription. NoteLimit is nil when the user is on the pro plan (unlimited notes).
type UserRecord ¶
type UserRecord struct {
Plan string
}
UserRecord holds the user fields needed by the subscription handler. It is exported so that adapters in other packages can satisfy the usersRepository interface without importing the users package into subscription.
Click to show internal directories.
Click to hide internal directories.