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 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 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) 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"`
Verified bool `protobuf:"varint,6,opt,name=verified,proto3" json:"verified,omitempty"`
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 acccount 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 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 {
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 password
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 {
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 SendVerificationEmailRequest ¶
type SendVerificationEmailRequest struct {
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
// Example: 'Hi there, welcome onboard! Use the link below to verify your email: $micro_verification_link'
// The variable will be replaced with an actual url that will look similar to this:
// 'https://user.m3o.com/user/verify?token=a-verification-token&rediretUrl=your-redir-url'
// 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"`
// While the from email address can't be changed,
// the from name (ie. sender name) can.
FromName string `protobuf:"bytes,6,opt,name=fromName,proto3" json:"fromName,omitempty"`
// contains filtered or unexported fields
}
Send a verification email to the user being signed up. Email from will be 'support@m3o.com', but you can provide the title and contents. Use $micro_verification_link template variable in the content.
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
}
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)
}
func NewUserService ¶
func NewUserService(name string, c client.Client) UserService
type VerifyEmailRequest ¶
type VerifyEmailRequest struct {
// The token from the verification email
Token string `protobuf:"bytes,1,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) 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