Documentation
¶
Index ¶
- Variables
- func NewUserEndpoints() []*api.Endpoint
- func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
- type Account
- func (*Account) Descriptor() ([]byte, []int)deprecated
- func (x *Account) GetCreated() int64
- func (x *Account) GetEmail() string
- func (x *Account) GetId() string
- func (x *Account) GetProfile() map[string]string
- func (x *Account) GetUpdated() int64
- func (x *Account) GetUsername() string
- func (x *Account) GetVerificationDate() int64
- func (x *Account) GetVerified() bool
- func (*Account) ProtoMessage()
- func (x *Account) ProtoReflect() protoreflect.Message
- func (x *Account) Reset()
- func (x *Account) String() string
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetEmail() string
- func (x *CreateRequest) GetId() string
- func (x *CreateRequest) GetPassword() string
- func (x *CreateRequest) GetProfile() map[string]string
- func (x *CreateRequest) GetUsername() string
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type ListRequest
- type ListResponse
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetEmail() string
- func (x *LoginRequest) GetPassword() string
- func (x *LoginRequest) GetUsername() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- type LogoutRequest
- type LogoutResponse
- type ReadRequest
- func (*ReadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadRequest) GetEmail() string
- func (x *ReadRequest) GetId() string
- func (x *ReadRequest) GetUsername() string
- func (*ReadRequest) ProtoMessage()
- func (x *ReadRequest) ProtoReflect() protoreflect.Message
- func (x *ReadRequest) Reset()
- func (x *ReadRequest) String() string
- type ReadResponse
- type ReadSessionRequest
- func (*ReadSessionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReadSessionRequest) GetSessionId() string
- func (*ReadSessionRequest) ProtoMessage()
- func (x *ReadSessionRequest) ProtoReflect() protoreflect.Message
- func (x *ReadSessionRequest) Reset()
- func (x *ReadSessionRequest) String() string
- type ReadSessionResponse
- func (*ReadSessionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReadSessionResponse) GetSession() *Session
- func (*ReadSessionResponse) ProtoMessage()
- func (x *ReadSessionResponse) ProtoReflect() protoreflect.Message
- func (x *ReadSessionResponse) Reset()
- func (x *ReadSessionResponse) String() string
- type ResetPasswordRequest
- func (*ResetPasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ResetPasswordRequest) GetCode() string
- func (x *ResetPasswordRequest) GetConfirmPassword() string
- func (x *ResetPasswordRequest) GetEmail() string
- func (x *ResetPasswordRequest) GetNewPassword() string
- func (*ResetPasswordRequest) ProtoMessage()
- func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message
- func (x *ResetPasswordRequest) Reset()
- func (x *ResetPasswordRequest) String() string
- type ResetPasswordResponse
- type SendPasswordResetEmailRequest
- func (*SendPasswordResetEmailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendPasswordResetEmailRequest) GetEmail() string
- func (x *SendPasswordResetEmailRequest) GetFromName() string
- func (x *SendPasswordResetEmailRequest) GetSubject() string
- func (x *SendPasswordResetEmailRequest) GetTextContent() string
- func (*SendPasswordResetEmailRequest) ProtoMessage()
- func (x *SendPasswordResetEmailRequest) ProtoReflect() protoreflect.Message
- func (x *SendPasswordResetEmailRequest) Reset()
- func (x *SendPasswordResetEmailRequest) String() string
- type SendPasswordResetEmailResponse
- func (*SendPasswordResetEmailResponse) Descriptor() ([]byte, []int)deprecated
- func (*SendPasswordResetEmailResponse) ProtoMessage()
- func (x *SendPasswordResetEmailResponse) ProtoReflect() protoreflect.Message
- func (x *SendPasswordResetEmailResponse) Reset()
- func (x *SendPasswordResetEmailResponse) String() string
- type SendVerificationEmailRequest
- func (*SendVerificationEmailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendVerificationEmailRequest) GetEmail() string
- func (x *SendVerificationEmailRequest) GetFailureRedirectUrl() string
- func (x *SendVerificationEmailRequest) GetFromName() string
- func (x *SendVerificationEmailRequest) GetRedirectUrl() string
- func (x *SendVerificationEmailRequest) GetSubject() string
- func (x *SendVerificationEmailRequest) GetTextContent() string
- func (*SendVerificationEmailRequest) ProtoMessage()
- func (x *SendVerificationEmailRequest) ProtoReflect() protoreflect.Message
- func (x *SendVerificationEmailRequest) Reset()
- func (x *SendVerificationEmailRequest) String() string
- type SendVerificationEmailResponse
- func (*SendVerificationEmailResponse) Descriptor() ([]byte, []int)deprecated
- func (*SendVerificationEmailResponse) ProtoMessage()
- func (x *SendVerificationEmailResponse) ProtoReflect() protoreflect.Message
- func (x *SendVerificationEmailResponse) Reset()
- func (x *SendVerificationEmailResponse) String() string
- type Session
- func (*Session) Descriptor() ([]byte, []int)deprecated
- func (x *Session) GetCreated() int64
- func (x *Session) GetExpires() int64
- func (x *Session) GetId() string
- func (x *Session) GetUserId() string
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Reset()
- func (x *Session) String() string
- type UpdatePasswordRequest
- func (*UpdatePasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdatePasswordRequest) GetConfirmPassword() string
- func (x *UpdatePasswordRequest) GetNewPassword() string
- func (x *UpdatePasswordRequest) GetOldPassword() string
- func (x *UpdatePasswordRequest) GetUserId() string
- func (*UpdatePasswordRequest) ProtoMessage()
- func (x *UpdatePasswordRequest) ProtoReflect() protoreflect.Message
- func (x *UpdatePasswordRequest) Reset()
- func (x *UpdatePasswordRequest) String() string
- type UpdatePasswordResponse
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetEmail() string
- func (x *UpdateRequest) GetId() string
- func (x *UpdateRequest) GetProfile() map[string]string
- func (x *UpdateRequest) GetUsername() string
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type UpdateResponse
- type UserHandler
- type UserService
- type VerifyEmailRequest
- func (*VerifyEmailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyEmailRequest) GetEmail() string
- func (x *VerifyEmailRequest) GetToken() string
- func (*VerifyEmailRequest) ProtoMessage()
- func (x *VerifyEmailRequest) ProtoReflect() protoreflect.Message
- func (x *VerifyEmailRequest) Reset()
- func (x *VerifyEmailRequest) String() string
- type VerifyEmailResponse
Constants ¶
This section is empty.
Variables ¶
var File_proto_user_proto protoreflect.FileDescriptor
Functions ¶
func NewUserEndpoints ¶
func RegisterUserHandler ¶
func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
Types ¶
type Account ¶
type Account struct {
// unique account id
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// alphanumeric username
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
// an email address
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
// unix timestamp
Created int64 `protobuf:"varint,4,opt,name=created,proto3" json:"created,omitempty"`
// unix timestamp
Updated int64 `protobuf:"varint,5,opt,name=updated,proto3" json:"updated,omitempty"`
// if the account is verified
Verified bool `protobuf:"varint,6,opt,name=verified,proto3" json:"verified,omitempty"`
// date of verification
VerificationDate int64 `protobuf:"varint,7,opt,name=verificationDate,proto3" json:"verificationDate,omitempty"`
// Store any custom data you want about your users in this fields.
Profile map[string]string `` /* 155-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*Account) Descriptor
deprecated
func (*Account) GetCreated ¶
func (*Account) GetProfile ¶
func (*Account) GetUpdated ¶
func (*Account) GetUsername ¶
func (*Account) GetVerificationDate ¶
func (*Account) GetVerified ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
type CreateRequest ¶
type CreateRequest struct {
// optional account id
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// the username
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
// the email address
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
// the user password
Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
// optional user profile as map<string,string>
Profile map[string]string `` /* 155-byte string literal not displayed */
// contains filtered or unexported fields
}
Create a new user account. The email address and username for the account must be unique.
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetEmail ¶
func (x *CreateRequest) GetEmail() string
func (*CreateRequest) GetId ¶
func (x *CreateRequest) GetId() string
func (*CreateRequest) GetPassword ¶
func (x *CreateRequest) GetPassword() string
func (*CreateRequest) GetProfile ¶
func (x *CreateRequest) GetProfile() map[string]string
func (*CreateRequest) GetUsername ¶
func (x *CreateRequest) GetUsername() string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct {
Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
// contains filtered or unexported fields
}
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetAccount ¶
func (x *CreateResponse) GetAccount() *Account
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct {
// the account id
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
Delete an account by id
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DeleteResponse ¶
type DeleteResponse struct {
// contains filtered or unexported fields
}
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
type ListRequest ¶ added in v0.23.0
type ListRequest struct {
Offset int32 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
// Maximum number of records to return. Default limit is 25.
// Maximum limit is 1000. Anything higher will return an error.
Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
// contains filtered or unexported fields
}
List all users
func (*ListRequest) Descriptor
deprecated
added in
v0.23.0
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetLimit ¶ added in v0.23.0
func (x *ListRequest) GetLimit() int32
func (*ListRequest) GetOffset ¶ added in v0.23.0
func (x *ListRequest) GetOffset() int32
func (*ListRequest) ProtoMessage ¶ added in v0.23.0
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶ added in v0.23.0
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶ added in v0.23.0
func (x *ListRequest) Reset()
func (*ListRequest) String ¶ added in v0.23.0
func (x *ListRequest) String() string
type ListResponse ¶ added in v0.23.0
type ListResponse struct {
Users []*Account `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
// contains filtered or unexported fields
}
func (*ListResponse) Descriptor
deprecated
added in
v0.23.0
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetUsers ¶ added in v0.23.0
func (x *ListResponse) GetUsers() []*Account
func (*ListResponse) ProtoMessage ¶ added in v0.23.0
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶ added in v0.23.0
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶ added in v0.23.0
func (x *ListResponse) Reset()
func (*ListResponse) String ¶ added in v0.23.0
func (x *ListResponse) String() string
type LoginRequest ¶
type LoginRequest struct {
// The username of the user
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
// The email address of the user
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
// The password of the user
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
// contains filtered or unexported fields
}
Login using username or email. The response will return a new session for successful login, 401 in the case of login failure and 500 for any other error
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetEmail ¶
func (x *LoginRequest) GetEmail() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) GetUsername ¶
func (x *LoginRequest) GetUsername() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type LoginResponse ¶
type LoginResponse struct {
// The session of the logged in user
Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
// contains filtered or unexported fields
}
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetSession ¶
func (x *LoginResponse) GetSession() *Session
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type LogoutRequest ¶
type LogoutRequest struct {
// the session id for the user to logout
SessionId string `protobuf:"bytes,1,opt,name=sessionId,proto3" json:"sessionId,omitempty"`
// contains filtered or unexported fields
}
Logout a user account
func (*LogoutRequest) Descriptor
deprecated
func (*LogoutRequest) Descriptor() ([]byte, []int)
Deprecated: Use LogoutRequest.ProtoReflect.Descriptor instead.
func (*LogoutRequest) GetSessionId ¶
func (x *LogoutRequest) GetSessionId() string
func (*LogoutRequest) ProtoMessage ¶
func (*LogoutRequest) ProtoMessage()
func (*LogoutRequest) ProtoReflect ¶
func (x *LogoutRequest) ProtoReflect() protoreflect.Message
func (*LogoutRequest) Reset ¶
func (x *LogoutRequest) Reset()
func (*LogoutRequest) String ¶
func (x *LogoutRequest) String() string
type LogoutResponse ¶
type LogoutResponse struct {
// contains filtered or unexported fields
}
func (*LogoutResponse) Descriptor
deprecated
func (*LogoutResponse) Descriptor() ([]byte, []int)
Deprecated: Use LogoutResponse.ProtoReflect.Descriptor instead.
func (*LogoutResponse) ProtoMessage ¶
func (*LogoutResponse) ProtoMessage()
func (*LogoutResponse) ProtoReflect ¶
func (x *LogoutResponse) ProtoReflect() protoreflect.Message
func (*LogoutResponse) Reset ¶
func (x *LogoutResponse) Reset()
func (*LogoutResponse) String ¶
func (x *LogoutResponse) String() string
type ReadRequest ¶
type ReadRequest struct {
// the account id
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// the account username
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
// the account email
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
// contains filtered or unexported fields
}
Read an account by id, username or email. Only one need to be specified.
func (*ReadRequest) Descriptor
deprecated
func (*ReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
func (*ReadRequest) GetEmail ¶
func (x *ReadRequest) GetEmail() string
func (*ReadRequest) GetId ¶
func (x *ReadRequest) GetId() string
func (*ReadRequest) GetUsername ¶
func (x *ReadRequest) GetUsername() string
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) ProtoReflect ¶
func (x *ReadRequest) ProtoReflect() protoreflect.Message
func (*ReadRequest) Reset ¶
func (x *ReadRequest) Reset()
func (*ReadRequest) String ¶
func (x *ReadRequest) String() string
type ReadResponse ¶
type ReadResponse struct {
Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
// contains filtered or unexported fields
}
func (*ReadResponse) Descriptor
deprecated
func (*ReadResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.
func (*ReadResponse) GetAccount ¶
func (x *ReadResponse) GetAccount() *Account
func (*ReadResponse) ProtoMessage ¶
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) ProtoReflect ¶
func (x *ReadResponse) ProtoReflect() protoreflect.Message
func (*ReadResponse) Reset ¶
func (x *ReadResponse) Reset()
func (*ReadResponse) String ¶
func (x *ReadResponse) String() string
type ReadSessionRequest ¶
type ReadSessionRequest struct {
// The unique session id
SessionId string `protobuf:"bytes,1,opt,name=sessionId,proto3" json:"sessionId,omitempty"`
// contains filtered or unexported fields
}
Read a session by the session id. In the event it has expired or is not found and error is returned.
func (*ReadSessionRequest) Descriptor
deprecated
func (*ReadSessionRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadSessionRequest.ProtoReflect.Descriptor instead.
func (*ReadSessionRequest) GetSessionId ¶
func (x *ReadSessionRequest) GetSessionId() string
func (*ReadSessionRequest) ProtoMessage ¶
func (*ReadSessionRequest) ProtoMessage()
func (*ReadSessionRequest) ProtoReflect ¶
func (x *ReadSessionRequest) ProtoReflect() protoreflect.Message
func (*ReadSessionRequest) Reset ¶
func (x *ReadSessionRequest) Reset()
func (*ReadSessionRequest) String ¶
func (x *ReadSessionRequest) String() string
type ReadSessionResponse ¶
type ReadSessionResponse struct {
// the session for the user
Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
// contains filtered or unexported fields
}
func (*ReadSessionResponse) Descriptor
deprecated
func (*ReadSessionResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadSessionResponse.ProtoReflect.Descriptor instead.
func (*ReadSessionResponse) GetSession ¶
func (x *ReadSessionResponse) GetSession() *Session
func (*ReadSessionResponse) ProtoMessage ¶
func (*ReadSessionResponse) ProtoMessage()
func (*ReadSessionResponse) ProtoReflect ¶
func (x *ReadSessionResponse) ProtoReflect() protoreflect.Message
func (*ReadSessionResponse) Reset ¶
func (x *ReadSessionResponse) Reset()
func (*ReadSessionResponse) String ¶
func (x *ReadSessionResponse) String() string
type ResetPasswordRequest ¶ added in v0.23.0
type ResetPasswordRequest struct {
// the email to reset the password for
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
// The code from the verification email
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
// the new password
NewPassword string `protobuf:"bytes,3,opt,name=newPassword,proto3" json:"newPassword,omitempty"`
// confirm new password
ConfirmPassword string `protobuf:"bytes,4,opt,name=confirmPassword,proto3" json:"confirmPassword,omitempty"`
// contains filtered or unexported fields
}
Reset password with the code sent by the "SendPasswordResetEmail" endoint.
func (*ResetPasswordRequest) Descriptor
deprecated
added in
v0.23.0
func (*ResetPasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use ResetPasswordRequest.ProtoReflect.Descriptor instead.
func (*ResetPasswordRequest) GetCode ¶ added in v0.23.0
func (x *ResetPasswordRequest) GetCode() string
func (*ResetPasswordRequest) GetConfirmPassword ¶ added in v0.23.0
func (x *ResetPasswordRequest) GetConfirmPassword() string
func (*ResetPasswordRequest) GetEmail ¶ added in v0.23.0
func (x *ResetPasswordRequest) GetEmail() string
func (*ResetPasswordRequest) GetNewPassword ¶ added in v0.23.0
func (x *ResetPasswordRequest) GetNewPassword() string
func (*ResetPasswordRequest) ProtoMessage ¶ added in v0.23.0
func (*ResetPasswordRequest) ProtoMessage()
func (*ResetPasswordRequest) ProtoReflect ¶ added in v0.23.0
func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message
func (*ResetPasswordRequest) Reset ¶ added in v0.23.0
func (x *ResetPasswordRequest) Reset()
func (*ResetPasswordRequest) String ¶ added in v0.23.0
func (x *ResetPasswordRequest) String() string
type ResetPasswordResponse ¶ added in v0.23.0
type ResetPasswordResponse struct {
// contains filtered or unexported fields
}
func (*ResetPasswordResponse) Descriptor
deprecated
added in
v0.23.0
func (*ResetPasswordResponse) Descriptor() ([]byte, []int)
Deprecated: Use ResetPasswordResponse.ProtoReflect.Descriptor instead.
func (*ResetPasswordResponse) ProtoMessage ¶ added in v0.23.0
func (*ResetPasswordResponse) ProtoMessage()
func (*ResetPasswordResponse) ProtoReflect ¶ added in v0.23.0
func (x *ResetPasswordResponse) ProtoReflect() protoreflect.Message
func (*ResetPasswordResponse) Reset ¶ added in v0.23.0
func (x *ResetPasswordResponse) Reset()
func (*ResetPasswordResponse) String ¶ added in v0.23.0
func (x *ResetPasswordResponse) String() string
type SendPasswordResetEmailRequest ¶ added in v0.23.0
type SendPasswordResetEmailRequest struct {
// email address to send reset for
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
// subject of the email
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
// Text content of the email. Don't forget to include the string '$code' which will be replaced by the real verification link
// HTML emails are not available currently.
TextContent string `protobuf:"bytes,3,opt,name=textContent,proto3" json:"textContent,omitempty"`
// Display name of the sender for the email. Note: the email address will still be 'noreply@email.m3ocontent.com'
FromName string `protobuf:"bytes,4,opt,name=fromName,proto3" json:"fromName,omitempty"`
// contains filtered or unexported fields
}
Send an email with a verification code to reset password. Call "ResetPassword" endpoint once user provides the code.
func (*SendPasswordResetEmailRequest) Descriptor
deprecated
added in
v0.23.0
func (*SendPasswordResetEmailRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendPasswordResetEmailRequest.ProtoReflect.Descriptor instead.
func (*SendPasswordResetEmailRequest) GetEmail ¶ added in v0.23.0
func (x *SendPasswordResetEmailRequest) GetEmail() string
func (*SendPasswordResetEmailRequest) GetFromName ¶ added in v0.23.0
func (x *SendPasswordResetEmailRequest) GetFromName() string
func (*SendPasswordResetEmailRequest) GetSubject ¶ added in v0.23.0
func (x *SendPasswordResetEmailRequest) GetSubject() string
func (*SendPasswordResetEmailRequest) GetTextContent ¶ added in v0.23.0
func (x *SendPasswordResetEmailRequest) GetTextContent() string
func (*SendPasswordResetEmailRequest) ProtoMessage ¶ added in v0.23.0
func (*SendPasswordResetEmailRequest) ProtoMessage()
func (*SendPasswordResetEmailRequest) ProtoReflect ¶ added in v0.23.0
func (x *SendPasswordResetEmailRequest) ProtoReflect() protoreflect.Message
func (*SendPasswordResetEmailRequest) Reset ¶ added in v0.23.0
func (x *SendPasswordResetEmailRequest) Reset()
func (*SendPasswordResetEmailRequest) String ¶ added in v0.23.0
func (x *SendPasswordResetEmailRequest) String() string
type SendPasswordResetEmailResponse ¶ added in v0.23.0
type SendPasswordResetEmailResponse struct {
// contains filtered or unexported fields
}
func (*SendPasswordResetEmailResponse) Descriptor
deprecated
added in
v0.23.0
func (*SendPasswordResetEmailResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendPasswordResetEmailResponse.ProtoReflect.Descriptor instead.
func (*SendPasswordResetEmailResponse) ProtoMessage ¶ added in v0.23.0
func (*SendPasswordResetEmailResponse) ProtoMessage()
func (*SendPasswordResetEmailResponse) ProtoReflect ¶ added in v0.23.0
func (x *SendPasswordResetEmailResponse) ProtoReflect() protoreflect.Message
func (*SendPasswordResetEmailResponse) Reset ¶ added in v0.23.0
func (x *SendPasswordResetEmailResponse) Reset()
func (*SendPasswordResetEmailResponse) String ¶ added in v0.23.0
func (x *SendPasswordResetEmailResponse) String() string
type SendVerificationEmailRequest ¶
type SendVerificationEmailRequest struct {
// email address to send the verification code
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
// subject of the email
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
// Text content of the email. Don't forget to include the string '$micro_verification_link' which will be replaced by the real verification link
// HTML emails are not available currently.
TextContent string `protobuf:"bytes,3,opt,name=textContent,proto3" json:"textContent,omitempty"`
RedirectUrl string `protobuf:"bytes,4,opt,name=redirectUrl,proto3" json:"redirectUrl,omitempty"`
FailureRedirectUrl string `protobuf:"bytes,5,opt,name=failureRedirectUrl,proto3" json:"failureRedirectUrl,omitempty"`
// Display name of the sender for the email. Note: the email address will still be 'noreply@email.m3ocontent.com'
FromName string `protobuf:"bytes,6,opt,name=fromName,proto3" json:"fromName,omitempty"`
// contains filtered or unexported fields
}
func (*SendVerificationEmailRequest) Descriptor
deprecated
func (*SendVerificationEmailRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendVerificationEmailRequest.ProtoReflect.Descriptor instead.
func (*SendVerificationEmailRequest) GetEmail ¶
func (x *SendVerificationEmailRequest) GetEmail() string
func (*SendVerificationEmailRequest) GetFailureRedirectUrl ¶
func (x *SendVerificationEmailRequest) GetFailureRedirectUrl() string
func (*SendVerificationEmailRequest) GetFromName ¶
func (x *SendVerificationEmailRequest) GetFromName() string
func (*SendVerificationEmailRequest) GetRedirectUrl ¶
func (x *SendVerificationEmailRequest) GetRedirectUrl() string
func (*SendVerificationEmailRequest) GetSubject ¶
func (x *SendVerificationEmailRequest) GetSubject() string
func (*SendVerificationEmailRequest) GetTextContent ¶
func (x *SendVerificationEmailRequest) GetTextContent() string
func (*SendVerificationEmailRequest) ProtoMessage ¶
func (*SendVerificationEmailRequest) ProtoMessage()
func (*SendVerificationEmailRequest) ProtoReflect ¶
func (x *SendVerificationEmailRequest) ProtoReflect() protoreflect.Message
func (*SendVerificationEmailRequest) Reset ¶
func (x *SendVerificationEmailRequest) Reset()
func (*SendVerificationEmailRequest) String ¶
func (x *SendVerificationEmailRequest) String() string
type SendVerificationEmailResponse ¶
type SendVerificationEmailResponse struct {
// contains filtered or unexported fields
}
func (*SendVerificationEmailResponse) Descriptor
deprecated
func (*SendVerificationEmailResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendVerificationEmailResponse.ProtoReflect.Descriptor instead.
func (*SendVerificationEmailResponse) ProtoMessage ¶
func (*SendVerificationEmailResponse) ProtoMessage()
func (*SendVerificationEmailResponse) ProtoReflect ¶
func (x *SendVerificationEmailResponse) ProtoReflect() protoreflect.Message
func (*SendVerificationEmailResponse) Reset ¶
func (x *SendVerificationEmailResponse) Reset()
func (*SendVerificationEmailResponse) String ¶
func (x *SendVerificationEmailResponse) String() string
type Session ¶
type Session struct {
// the session id
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// the associated user id
UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`
// unix timestamp
Created int64 `protobuf:"varint,4,opt,name=created,proto3" json:"created,omitempty"`
// unix timestamp
Expires int64 `protobuf:"varint,5,opt,name=expires,proto3" json:"expires,omitempty"`
// contains filtered or unexported fields
}
func (*Session) Descriptor
deprecated
func (*Session) GetCreated ¶
func (*Session) GetExpires ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type UpdatePasswordRequest ¶
type UpdatePasswordRequest struct {
// the account id
UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
// the old password
OldPassword string `protobuf:"bytes,2,opt,name=oldPassword,proto3" json:"oldPassword,omitempty"`
// the new password
NewPassword string `protobuf:"bytes,3,opt,name=newPassword,proto3" json:"newPassword,omitempty"`
// confirm new password
ConfirmPassword string `protobuf:"bytes,4,opt,name=confirm_password,json=confirmPassword,proto3" json:"confirm_password,omitempty"`
// contains filtered or unexported fields
}
Update the account password
func (*UpdatePasswordRequest) Descriptor
deprecated
func (*UpdatePasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePasswordRequest.ProtoReflect.Descriptor instead.
func (*UpdatePasswordRequest) GetConfirmPassword ¶
func (x *UpdatePasswordRequest) GetConfirmPassword() string
func (*UpdatePasswordRequest) GetNewPassword ¶
func (x *UpdatePasswordRequest) GetNewPassword() string
func (*UpdatePasswordRequest) GetOldPassword ¶
func (x *UpdatePasswordRequest) GetOldPassword() string
func (*UpdatePasswordRequest) GetUserId ¶
func (x *UpdatePasswordRequest) GetUserId() string
func (*UpdatePasswordRequest) ProtoMessage ¶
func (*UpdatePasswordRequest) ProtoMessage()
func (*UpdatePasswordRequest) ProtoReflect ¶
func (x *UpdatePasswordRequest) ProtoReflect() protoreflect.Message
func (*UpdatePasswordRequest) Reset ¶
func (x *UpdatePasswordRequest) Reset()
func (*UpdatePasswordRequest) String ¶
func (x *UpdatePasswordRequest) String() string
type UpdatePasswordResponse ¶
type UpdatePasswordResponse struct {
// contains filtered or unexported fields
}
func (*UpdatePasswordResponse) Descriptor
deprecated
func (*UpdatePasswordResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdatePasswordResponse.ProtoReflect.Descriptor instead.
func (*UpdatePasswordResponse) ProtoMessage ¶
func (*UpdatePasswordResponse) ProtoMessage()
func (*UpdatePasswordResponse) ProtoReflect ¶
func (x *UpdatePasswordResponse) ProtoReflect() protoreflect.Message
func (*UpdatePasswordResponse) Reset ¶
func (x *UpdatePasswordResponse) Reset()
func (*UpdatePasswordResponse) String ¶
func (x *UpdatePasswordResponse) String() string
type UpdateRequest ¶
type UpdateRequest struct {
// the account id
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// the new username
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
// the new email address
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
// the user profile as map<string,string>
Profile map[string]string `` /* 155-byte string literal not displayed */
// contains filtered or unexported fields
}
Update the account username or email
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetEmail ¶
func (x *UpdateRequest) GetEmail() string
func (*UpdateRequest) GetId ¶
func (x *UpdateRequest) GetId() string
func (*UpdateRequest) GetProfile ¶
func (x *UpdateRequest) GetProfile() map[string]string
func (*UpdateRequest) GetUsername ¶
func (x *UpdateRequest) GetUsername() string
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
type UpdateResponse ¶
type UpdateResponse struct {
// contains filtered or unexported fields
}
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) ProtoReflect ¶
func (x *UpdateResponse) ProtoReflect() protoreflect.Message
func (*UpdateResponse) Reset ¶
func (x *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (x *UpdateResponse) String() string
type UserHandler ¶
type UserHandler interface {
Create(context.Context, *CreateRequest, *CreateResponse) error
Read(context.Context, *ReadRequest, *ReadResponse) error
Update(context.Context, *UpdateRequest, *UpdateResponse) error
Delete(context.Context, *DeleteRequest, *DeleteResponse) error
UpdatePassword(context.Context, *UpdatePasswordRequest, *UpdatePasswordResponse) error
Login(context.Context, *LoginRequest, *LoginResponse) error
Logout(context.Context, *LogoutRequest, *LogoutResponse) error
ReadSession(context.Context, *ReadSessionRequest, *ReadSessionResponse) error
VerifyEmail(context.Context, *VerifyEmailRequest, *VerifyEmailResponse) error
SendVerificationEmail(context.Context, *SendVerificationEmailRequest, *SendVerificationEmailResponse) error
SendPasswordResetEmail(context.Context, *SendPasswordResetEmailRequest, *SendPasswordResetEmailResponse) error
ResetPassword(context.Context, *ResetPasswordRequest, *ResetPasswordResponse) error
List(context.Context, *ListRequest, *ListResponse) error
}
type UserService ¶
type UserService interface {
Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error)
Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error)
Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error)
Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...client.CallOption) (*UpdatePasswordResponse, error)
Login(ctx context.Context, in *LoginRequest, opts ...client.CallOption) (*LoginResponse, error)
Logout(ctx context.Context, in *LogoutRequest, opts ...client.CallOption) (*LogoutResponse, error)
ReadSession(ctx context.Context, in *ReadSessionRequest, opts ...client.CallOption) (*ReadSessionResponse, error)
VerifyEmail(ctx context.Context, in *VerifyEmailRequest, opts ...client.CallOption) (*VerifyEmailResponse, error)
SendVerificationEmail(ctx context.Context, in *SendVerificationEmailRequest, opts ...client.CallOption) (*SendVerificationEmailResponse, error)
SendPasswordResetEmail(ctx context.Context, in *SendPasswordResetEmailRequest, opts ...client.CallOption) (*SendPasswordResetEmailResponse, error)
ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...client.CallOption) (*ResetPasswordResponse, error)
List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error)
}
func NewUserService ¶
func NewUserService(name string, c client.Client) UserService
type VerifyEmailRequest ¶
type VerifyEmailRequest struct {
// the email address to verify
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
// The token from the verification email
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
// contains filtered or unexported fields
}
Verify the email address of an account from a token sent in an email to the user.
func (*VerifyEmailRequest) Descriptor
deprecated
func (*VerifyEmailRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyEmailRequest.ProtoReflect.Descriptor instead.
func (*VerifyEmailRequest) GetEmail ¶ added in v0.23.0
func (x *VerifyEmailRequest) GetEmail() string
func (*VerifyEmailRequest) GetToken ¶
func (x *VerifyEmailRequest) GetToken() string
func (*VerifyEmailRequest) ProtoMessage ¶
func (*VerifyEmailRequest) ProtoMessage()
func (*VerifyEmailRequest) ProtoReflect ¶
func (x *VerifyEmailRequest) ProtoReflect() protoreflect.Message
func (*VerifyEmailRequest) Reset ¶
func (x *VerifyEmailRequest) Reset()
func (*VerifyEmailRequest) String ¶
func (x *VerifyEmailRequest) String() string
type VerifyEmailResponse ¶
type VerifyEmailResponse struct {
// contains filtered or unexported fields
}
func (*VerifyEmailResponse) Descriptor
deprecated
func (*VerifyEmailResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerifyEmailResponse.ProtoReflect.Descriptor instead.
func (*VerifyEmailResponse) ProtoMessage ¶
func (*VerifyEmailResponse) ProtoMessage()
func (*VerifyEmailResponse) ProtoReflect ¶
func (x *VerifyEmailResponse) ProtoReflect() protoreflect.Message
func (*VerifyEmailResponse) Reset ¶
func (x *VerifyEmailResponse) Reset()
func (*VerifyEmailResponse) String ¶
func (x *VerifyEmailResponse) String() string