Documentation ¶
Index ¶
- Variables
- type Creds
- type Emailer
- type Error
- type UsersAPI
- func (u *UsersAPI) Authorize(creds Creds) bool
- func (u *UsersAPI) CreateUser(creds Creds, usr schema.User, redirURL url.URL) (schema.UserCreateResponse, error)
- func (u *UsersAPI) GetUser(creds Creds, id string) (schema.User, error)
- func (u *UsersAPI) ListUsers(creds Creds, maxResults int, nextPageToken string) ([]*schema.User, string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorInvalidEmail = newError("invalid_email", "invalid email.", http.StatusBadRequest) ErrorInvalidClient = newError("invalid_client", "invalid email.", http.StatusBadRequest) ErrorDuplicateEmail = newError("duplicate_email", "Email already in use.", http.StatusBadRequest) ErrorResourceNotFound = newError("resource_not_found", "Resource could not be found.", http.StatusNotFound) ErrorMaxResultsTooHigh = newError("max_results_too_high", fmt.Sprintf("The max number of results per page is %d", maxUsersPerPage), http.StatusBadRequest) ErrorInvalidRedirectURL = newError("invalid_redirect_url", "The provided redirect URL is invalid for the given client", http.StatusBadRequest) )
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Type string // The HTTP Code to return for this type of error. Code int Desc string // The underlying error - not to be consumed by external users. Internal error }
Error is the error type returned by AdminAPI methods.
type UsersAPI ¶
type UsersAPI struct {
// contains filtered or unexported fields
}
All calls take a Creds object with the ClientID of the calling app and the calling User. It is assumed that the clientID has already validated as an admin app before calling.
func NewUsersAPI ¶
func (*UsersAPI) CreateUser ¶
Click to show internal directories.
Click to hide internal directories.