Documentation
¶
Index ¶
- Constants
- func HasAuth(c *gin.Context)
- func IsAdmin(c *gin.Context) bool
- func RegisterFlags(f []cli.Flag) []cli.Flag
- type Auth
- type ErrorContext
- type IsAdminContext
- type IsNewContext
- type PatreonCampaignAttributes
- type PatreonCampaignRelationship
- type PatreonIdentityResponse
- type PatreonIncludedItem
- type PatreonRelationshipData
- type PatreonRelationshipLinks
- type PatreonResponseLinks
- type PatreonUser
- type PatreonUserAttributes
- type PatreonUserRelationships
- type User
- type UserContext
Constants ¶
View Source
const ( SupertokensHostFlag = "supertokens-host" SupertokensPortFlag = "supertokens-port" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) RegisterHandler ¶
type ErrorContext ¶
type ErrorContext struct{}
type IsAdminContext ¶
type IsAdminContext struct{}
type IsNewContext ¶
type IsNewContext struct{}
type PatreonCampaignAttributes ¶
type PatreonCampaignAttributes struct {
IsMonthly bool `json:"is_monthly"`
Summary string `json:"summary"`
}
PatreonCampaignAttributes contains campaign-specific attributes
type PatreonCampaignRelationship ¶
type PatreonCampaignRelationship struct {
Data PatreonRelationshipData `json:"data"`
Links PatreonRelationshipLinks `json:"links"`
}
PatreonCampaignRelationship represents the campaign relationship
type PatreonIdentityResponse ¶
type PatreonIdentityResponse struct {
Data PatreonUser `json:"data"`
Included []PatreonIncludedItem `json:"included"`
Links PatreonResponseLinks `json:"links"`
}
PatreonIdentityResponse represents the complete response from Patreon Identity API
type PatreonIncludedItem ¶
type PatreonIncludedItem struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes PatreonCampaignAttributes `json:"attributes"`
}
PatreonIncludedItem represents items in the included array
type PatreonRelationshipData ¶
PatreonRelationshipData represents relationship data reference
type PatreonRelationshipLinks ¶
type PatreonRelationshipLinks struct {
Related string `json:"related"`
}
PatreonRelationshipLinks contains related resource links
type PatreonResponseLinks ¶
type PatreonResponseLinks struct {
Self string `json:"self"`
}
PatreonResponseLinks contains response-level links
type PatreonUser ¶
type PatreonUser struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes PatreonUserAttributes `json:"attributes"`
Relationships PatreonUserRelationships `json:"relationships"`
}
PatreonUser represents the main user data from Patreon
type PatreonUserAttributes ¶
type PatreonUserAttributes struct {
Email string `json:"email"`
FullName string `json:"full_name"`
}
PatreonUserAttributes contains user-specific attributes
type PatreonUserRelationships ¶
type PatreonUserRelationships struct {
Campaign PatreonCampaignRelationship `json:"campaign"`
}
PatreonUserRelationships contains related data references
type User ¶
type User struct {
ID uuid.UUID
Email string
Expired bool
PatreonUserID *string
IsNew bool
Tier string
}
func GetUserFromContext ¶
type UserContext ¶
type UserContext struct{}
Click to show internal directories.
Click to hide internal directories.