Documentation ¶
Index ¶
- Variables
- func ApiAuthenticate(loginName, loginPassword string) (string, error)
- func ApiChangeEmail(userID, newEmail string) error
- func ApiChangeLoginCredentials(userID, name, password string) error
- func ApiChangeProfileName(userID, profileName string) error
- func ApiCreateUser(profileName, email, loginName, loginPassword string) (string, error)
- func ApiNewResetPasswordToken(email string) (string, error)
- func ApiResetLoginCredentials(token, login_name, login_password string) error
- func ApiVerifyEmail(userID string) error
- func Endpoint(action string) string
- func Execute(url string, call Call) (interface{}, error)
- func SetEndpoint(url string)
- type ApiUser
- type AuthenticateCall
- type BadRequestHandler
- type BodyReader
- type Call
- type ChangeEmailCall
- type ChangeLoginCredentialsCall
- type ChangeProfileNameCall
- type CreatedHandler
- type FallbackHandler
- type JsonCall
- type NewResetPasswordToken
- type NoContentHandler
- type NotFoundHandler
- type OKHandler
- type PostCallForm
- type PostForm
- type QueryParams
- type RequestErrorHandler
- type ResetLoginCredentials
- type VerifyEmailCall
Constants ¶
This section is empty.
Variables ¶
View Source
var UnexpectedStatusCode = errors.New("Service returned unexpected status code.")
Functions ¶
func ApiAuthenticate ¶
func ApiChangeEmail ¶
func ApiChangeProfileName ¶
func ApiCreateUser ¶
func ApiVerifyEmail ¶
func SetEndpoint ¶
func SetEndpoint(url string)
Types ¶
type ApiUser ¶
type ApiUser struct { ProfileName string `json:"profile_name"` LoginName string `json:"login_name"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` }
func ApiGetUser ¶
type AuthenticateCall ¶
type AuthenticateCall struct { BodyReader Name string Password string }
func (AuthenticateCall) PostForm ¶
func (call AuthenticateCall) PostForm() url.Values
type BadRequestHandler ¶
type BodyReader ¶
type BodyReader struct{}
func (BodyReader) ResponseBadRequest ¶
func (call BodyReader) ResponseBadRequest(resp *http.Response) (interface{}, error)
func (BodyReader) ResponseOK ¶
func (c BodyReader) ResponseOK(resp *http.Response) (interface{}, error)
type Call ¶
type Call interface { }
Call describes an object to be passed into Execute() to define the input and output handling to perform an action on a resource via HTTP. To actually trigger behavior, the call struct should implement some of the other interfaces in this package.
type ChangeEmailCall ¶
func (ChangeEmailCall) PostForm ¶
func (call ChangeEmailCall) PostForm() url.Values
func (ChangeEmailCall) ResponseNoContent ¶
func (call ChangeEmailCall) ResponseNoContent(resp *http.Response) (interface{}, error)
type ChangeLoginCredentialsCall ¶
func (ChangeLoginCredentialsCall) PostForm ¶
func (call ChangeLoginCredentialsCall) PostForm() url.Values
func (ChangeLoginCredentialsCall) ResponseNoContent ¶
func (call ChangeLoginCredentialsCall) ResponseNoContent(resp *http.Response) (interface{}, error)
type ChangeProfileNameCall ¶
func (ChangeProfileNameCall) PostForm ¶
func (call ChangeProfileNameCall) PostForm() url.Values
func (ChangeProfileNameCall) ResponseNoContent ¶
func (call ChangeProfileNameCall) ResponseNoContent(resp *http.Response) (interface{}, error)
type CreatedHandler ¶
type FallbackHandler ¶
type NewResetPasswordToken ¶
type NewResetPasswordToken struct {
Email string
}
func (NewResetPasswordToken) PostForm ¶
func (call NewResetPasswordToken) PostForm() url.Values
func (NewResetPasswordToken) ResponseOK ¶
func (call NewResetPasswordToken) ResponseOK(resp *http.Response) (interface{}, error)
type NoContentHandler ¶
type NotFoundHandler ¶
type PostCallForm ¶
PostCallForm can be implemented to perform a POST with a classic form-encoded body.
type PostForm ¶
type PostForm interface { // Body returns the content-type and stream for the POST body to for this call. Body() (string, io.Reader) }
PostForm can be implemented to perform a POST with the returned stream.
type QueryParams ¶
QueryParams can be implemented to provide URL parameters.
type RequestErrorHandler ¶
type ResetLoginCredentials ¶
func (ResetLoginCredentials) PostForm ¶
func (call ResetLoginCredentials) PostForm() url.Values
func (ResetLoginCredentials) ResponseNoContent ¶
func (call ResetLoginCredentials) ResponseNoContent(resp *http.Response) (interface{}, error)
type VerifyEmailCall ¶
func (VerifyEmailCall) PostForm ¶
func (call VerifyEmailCall) PostForm() url.Values
func (VerifyEmailCall) ResponseNoContent ¶
func (call VerifyEmailCall) ResponseNoContent(resp *http.Response) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.