Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAuthenticated = errors.New(
"You are not logged in to Aviator. Please verify that your API token is correct.",
)
Functions ¶
func IsHTTPUnauthorized ¶ added in v0.1.0
IsHTTPUnauthorized returns true if the given error is an HTTP 401 Unauthorized error.
Types ¶
type ViewerSubquery ¶ added in v0.0.23
type ViewerSubquery struct { Viewer struct { Email graphql.String `graphql:"email"` FullName graphql.String `graphql:"fullName"` } }
ViewerSubquery is a GraphQL query that fetches the viewer's email and full name. It's meant to be embedded into other queries to check if the user is authenticated via the CheckViewer method.
func (ViewerSubquery) CheckViewer ¶ added in v0.0.23
func (v ViewerSubquery) CheckViewer() error
CheckViewer checks whether or not the viewer is authenticated. It returns ErrNotAuthenticated if the viewer is not authenticated.
Click to show internal directories.
Click to hide internal directories.