Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type APIError ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func PrivateNew ¶
func PrivateNew(secretKey string, privateOptions *PrivateOptions) (*Client, error)
func (*Client) VerifySessionToken ¶
func (client *Client) VerifySessionToken(token string) (*SessionToken, error)
func (*Client) VerifySessionTokenRequest ¶
func (client *Client) VerifySessionTokenRequest(request *http.Request) (*SessionToken, error)
type Email ¶
type Email struct { ID string `json:"id"` Resource string `json:"resource"` CreatedAt string `json:"created_at"` Status EmailStatus `json:"status"` Address string `json:"address"` VerifiedAt *string `json:"verified_at"` VerifiedVia *struct { Type EmailVerifiedViaType `json:"type"` LoginID *string `json:"login_id"` } `json:"verified_via"` }
type EmailStatus ¶
type EmailStatus string
const ( EmailStatusUnverified EmailStatus = "unverified" EmailStatusVerified EmailStatus = "verified" )
type EmailVerifiedViaType ¶
type EmailVerifiedViaType string
const (
EmailVerifiedViaTypeLogin EmailVerifiedViaType = "login"
)
type PrivateOptions ¶
type PrivateOptions struct {
APIURL *string
}
type SessionToken ¶
type User ¶
type User struct { ID string `json:"id"` Resource string `json:"resource"` CreatedAt string `json:"created_at"` Name *string `json:"name"` NameDetails *struct { GivenName *string `json:"given_name"` FamilyName *string `json:"family_name"` } `json:"name_details"` EmailID *string `json:"email_id"` Email *Email EmailAddress *string `json:"email_address"` AvatarURL *string `json:"avatar_url"` LastLoginAt *string `json:"last_login_at"` }
Click to show internal directories.
Click to hide internal directories.