Documentation ¶
Overview ¶
Package authms is a generated protocol buffer package.
It is generated from these files:
github.com/tomogoma/authms/proto/authms/authms.proto
It has these top-level messages:
History OAuth Value User BasicAuthRequest RegisterRequest UpdateRequest OAuthRequest SMSVerificationRequest SMSVerificationCodeRequest SMSVerificationStatus SMSVerificationResponse Response
Index ¶
- func RegisterAuthMSHandler(s server.Server, hdlr AuthMSHandler, opts ...server.HandlerOption)
- func RegisterSubscriber(topic string, s server.Server, h interface{}, opts ...server.SubscriberOption) error
- type AuthMS
- func (h *AuthMS) LoginEmail(ctx context.Context, in *BasicAuthRequest, out *Response) error
- func (h *AuthMS) LoginOAuth(ctx context.Context, in *OAuthRequest, out *Response) error
- func (h *AuthMS) LoginPhone(ctx context.Context, in *BasicAuthRequest, out *Response) error
- func (h *AuthMS) LoginUserName(ctx context.Context, in *BasicAuthRequest, out *Response) error
- func (h *AuthMS) Register(ctx context.Context, in *RegisterRequest, out *Response) error
- func (h *AuthMS) UpdateOauth(ctx context.Context, in *UpdateRequest, out *Response) error
- func (h *AuthMS) UpdatePhone(ctx context.Context, in *UpdateRequest, out *Response) error
- func (h *AuthMS) VerifyPhone(ctx context.Context, in *SMSVerificationRequest, out *SMSVerificationResponse) error
- func (h *AuthMS) VerifyPhoneCode(ctx context.Context, in *SMSVerificationCodeRequest, ...) error
- type AuthMSClient
- type AuthMSHandler
- type BasicAuthRequest
- func (*BasicAuthRequest) Descriptor() ([]byte, []int)
- func (m *BasicAuthRequest) GetBasicID() string
- func (m *BasicAuthRequest) GetDeviceID() string
- func (m *BasicAuthRequest) GetPassword() string
- func (*BasicAuthRequest) ProtoMessage()
- func (m *BasicAuthRequest) Reset()
- func (m *BasicAuthRequest) String() string
- type History
- func (*History) Descriptor() ([]byte, []int)
- func (m *History) GetAccessType() string
- func (m *History) GetDate() string
- func (m *History) GetDevID() string
- func (m *History) GetID() int64
- func (m *History) GetIpAddress() string
- func (m *History) GetSuccessStatus() bool
- func (m *History) GetUserID() int64
- func (*History) ProtoMessage()
- func (m *History) Reset()
- func (m *History) String() string
- type OAuth
- type OAuthRequest
- type Publisher
- type RegisterRequest
- type Response
- type SMSVerificationCodeRequest
- func (*SMSVerificationCodeRequest) Descriptor() ([]byte, []int)
- func (m *SMSVerificationCodeRequest) GetCode() string
- func (m *SMSVerificationCodeRequest) GetDeviceID() string
- func (m *SMSVerificationCodeRequest) GetSmsToken() string
- func (m *SMSVerificationCodeRequest) GetToken() string
- func (m *SMSVerificationCodeRequest) GetUserID() int64
- func (*SMSVerificationCodeRequest) ProtoMessage()
- func (m *SMSVerificationCodeRequest) Reset()
- func (m *SMSVerificationCodeRequest) String() string
- type SMSVerificationRequest
- func (*SMSVerificationRequest) Descriptor() ([]byte, []int)
- func (m *SMSVerificationRequest) GetDeviceID() string
- func (m *SMSVerificationRequest) GetPhone() string
- func (m *SMSVerificationRequest) GetToken() string
- func (m *SMSVerificationRequest) GetUserID() int64
- func (*SMSVerificationRequest) ProtoMessage()
- func (m *SMSVerificationRequest) Reset()
- func (m *SMSVerificationRequest) String() string
- type SMSVerificationResponse
- func (*SMSVerificationResponse) Descriptor() ([]byte, []int)
- func (m *SMSVerificationResponse) GetCode() int32
- func (m *SMSVerificationResponse) GetDetail() string
- func (m *SMSVerificationResponse) GetId() string
- func (m *SMSVerificationResponse) GetStatus() *SMSVerificationStatus
- func (*SMSVerificationResponse) ProtoMessage()
- func (m *SMSVerificationResponse) Reset()
- func (m *SMSVerificationResponse) String() string
- type SMSVerificationStatus
- func (*SMSVerificationStatus) Descriptor() ([]byte, []int)
- func (m *SMSVerificationStatus) GetExpiresAt() string
- func (m *SMSVerificationStatus) GetPhone() string
- func (m *SMSVerificationStatus) GetToken() string
- func (m *SMSVerificationStatus) GetVerified() bool
- func (*SMSVerificationStatus) ProtoMessage()
- func (m *SMSVerificationStatus) Reset()
- func (m *SMSVerificationStatus) String() string
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)
- func (m *UpdateRequest) GetAppName() string
- func (m *UpdateRequest) GetDeviceID() string
- func (m *UpdateRequest) GetToken() string
- func (m *UpdateRequest) GetUser() *User
- func (*UpdateRequest) ProtoMessage()
- func (m *UpdateRequest) Reset()
- func (m *UpdateRequest) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetEmail() *Value
- func (m *User) GetID() int64
- func (m *User) GetLoginHistory() []*History
- func (m *User) GetOAuths() map[string]*OAuth
- func (m *User) GetPassword() string
- func (m *User) GetPhone() *Value
- func (m *User) GetToken() string
- func (m *User) GetUserName() string
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthMSHandler ¶
func RegisterAuthMSHandler(s server.Server, hdlr AuthMSHandler, opts ...server.HandlerOption)
func RegisterSubscriber ¶
Types ¶
type AuthMS ¶
type AuthMS struct {
AuthMSHandler
}
func (*AuthMS) LoginEmail ¶
func (*AuthMS) LoginOAuth ¶
func (*AuthMS) LoginPhone ¶
func (*AuthMS) LoginUserName ¶
func (*AuthMS) UpdateOauth ¶
func (*AuthMS) UpdatePhone ¶
func (*AuthMS) VerifyPhone ¶
func (h *AuthMS) VerifyPhone(ctx context.Context, in *SMSVerificationRequest, out *SMSVerificationResponse) error
func (*AuthMS) VerifyPhoneCode ¶
func (h *AuthMS) VerifyPhoneCode(ctx context.Context, in *SMSVerificationCodeRequest, out *SMSVerificationResponse) error
type AuthMSClient ¶
type AuthMSClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...client.CallOption) (*Response, error) LoginUserName(ctx context.Context, in *BasicAuthRequest, opts ...client.CallOption) (*Response, error) LoginEmail(ctx context.Context, in *BasicAuthRequest, opts ...client.CallOption) (*Response, error) LoginPhone(ctx context.Context, in *BasicAuthRequest, opts ...client.CallOption) (*Response, error) LoginOAuth(ctx context.Context, in *OAuthRequest, opts ...client.CallOption) (*Response, error) UpdatePhone(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*Response, error) UpdateOauth(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*Response, error) VerifyPhone(ctx context.Context, in *SMSVerificationRequest, opts ...client.CallOption) (*SMSVerificationResponse, error) VerifyPhoneCode(ctx context.Context, in *SMSVerificationCodeRequest, opts ...client.CallOption) (*SMSVerificationResponse, error) }
func NewAuthMSClient ¶
func NewAuthMSClient(serviceName string, c client.Client) AuthMSClient
type AuthMSHandler ¶
type AuthMSHandler interface { Register(context.Context, *RegisterRequest, *Response) error LoginUserName(context.Context, *BasicAuthRequest, *Response) error LoginEmail(context.Context, *BasicAuthRequest, *Response) error LoginPhone(context.Context, *BasicAuthRequest, *Response) error LoginOAuth(context.Context, *OAuthRequest, *Response) error UpdatePhone(context.Context, *UpdateRequest, *Response) error UpdateOauth(context.Context, *UpdateRequest, *Response) error VerifyPhone(context.Context, *SMSVerificationRequest, *SMSVerificationResponse) error VerifyPhoneCode(context.Context, *SMSVerificationCodeRequest, *SMSVerificationResponse) error }
type BasicAuthRequest ¶
type BasicAuthRequest struct { DeviceID string `protobuf:"bytes,1,opt,name=deviceID" json:"deviceID,omitempty"` BasicID string `protobuf:"bytes,2,opt,name=basicID" json:"basicID,omitempty"` Password string `protobuf:"bytes,3,opt,name=password" json:"password,omitempty"` }
func (*BasicAuthRequest) Descriptor ¶
func (*BasicAuthRequest) Descriptor() ([]byte, []int)
func (*BasicAuthRequest) GetBasicID ¶
func (m *BasicAuthRequest) GetBasicID() string
func (*BasicAuthRequest) GetDeviceID ¶
func (m *BasicAuthRequest) GetDeviceID() string
func (*BasicAuthRequest) GetPassword ¶
func (m *BasicAuthRequest) GetPassword() string
func (*BasicAuthRequest) ProtoMessage ¶
func (*BasicAuthRequest) ProtoMessage()
func (*BasicAuthRequest) Reset ¶
func (m *BasicAuthRequest) Reset()
func (*BasicAuthRequest) String ¶
func (m *BasicAuthRequest) String() string
type History ¶
type History struct { ID int64 `protobuf:"varint,1,opt,name=ID" json:"ID,omitempty"` UserID int64 `protobuf:"varint,2,opt,name=userID" json:"userID,omitempty"` IpAddress string `protobuf:"bytes,3,opt,name=ipAddress" json:"ipAddress,omitempty"` Date string `protobuf:"bytes,4,opt,name=date" json:"date,omitempty"` AccessType string `protobuf:"bytes,5,opt,name=accessType" json:"accessType,omitempty"` SuccessStatus bool `protobuf:"varint,6,opt,name=successStatus" json:"successStatus,omitempty"` DevID string `protobuf:"bytes,7,opt,name=devID" json:"devID,omitempty"` }
func (*History) Descriptor ¶
func (*History) GetAccessType ¶
func (*History) GetIpAddress ¶
func (*History) GetSuccessStatus ¶
func (*History) ProtoMessage ¶
func (*History) ProtoMessage()
type OAuth ¶
type OAuth struct { AppName string `protobuf:"bytes,1,opt,name=appName" json:"appName,omitempty"` AppUserID string `protobuf:"bytes,2,opt,name=appUserID" json:"appUserID,omitempty"` AppToken string `protobuf:"bytes,3,opt,name=appToken" json:"appToken,omitempty"` Verified bool `protobuf:"varint,4,opt,name=verified" json:"verified,omitempty"` }
func (*OAuth) Descriptor ¶
func (*OAuth) GetAppName ¶
func (*OAuth) GetAppToken ¶
func (*OAuth) GetAppUserID ¶
func (*OAuth) GetVerified ¶
func (*OAuth) ProtoMessage ¶
func (*OAuth) ProtoMessage()
type OAuthRequest ¶
type OAuthRequest struct { DeviceID string `protobuf:"bytes,1,opt,name=deviceID" json:"deviceID,omitempty"` OAuth *OAuth `protobuf:"bytes,2,opt,name=OAuth" json:"OAuth,omitempty"` }
func (*OAuthRequest) Descriptor ¶
func (*OAuthRequest) Descriptor() ([]byte, []int)
func (*OAuthRequest) GetDeviceID ¶
func (m *OAuthRequest) GetDeviceID() string
func (*OAuthRequest) GetOAuth ¶
func (m *OAuthRequest) GetOAuth() *OAuth
func (*OAuthRequest) ProtoMessage ¶
func (*OAuthRequest) ProtoMessage()
func (*OAuthRequest) Reset ¶
func (m *OAuthRequest) Reset()
func (*OAuthRequest) String ¶
func (m *OAuthRequest) String() string
type Publisher ¶
type Publisher interface {
Publish(ctx context.Context, msg interface{}, opts ...client.PublishOption) error
}
type RegisterRequest ¶
type RegisterRequest struct { DeviceID string `protobuf:"bytes,1,opt,name=deviceID" json:"deviceID,omitempty"` User *User `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"` }
func (*RegisterRequest) Descriptor ¶
func (*RegisterRequest) Descriptor() ([]byte, []int)
func (*RegisterRequest) GetDeviceID ¶
func (m *RegisterRequest) GetDeviceID() string
func (*RegisterRequest) GetUser ¶
func (m *RegisterRequest) GetUser() *User
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) Reset ¶
func (m *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (m *RegisterRequest) String() string
type Response ¶
type Response struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Code int32 `protobuf:"varint,2,opt,name=code" json:"code,omitempty"` User *User `protobuf:"bytes,3,opt,name=user" json:"user,omitempty"` Detail string `protobuf:"bytes,4,opt,name=detail" json:"detail,omitempty"` }
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
type SMSVerificationCodeRequest ¶
type SMSVerificationCodeRequest struct { DeviceID string `protobuf:"bytes,1,opt,name=deviceID" json:"deviceID,omitempty"` Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` UserID int64 `protobuf:"varint,3,opt,name=userID" json:"userID,omitempty"` SmsToken string `protobuf:"bytes,4,opt,name=smsToken" json:"smsToken,omitempty"` Code string `protobuf:"bytes,5,opt,name=code" json:"code,omitempty"` }
func (*SMSVerificationCodeRequest) Descriptor ¶
func (*SMSVerificationCodeRequest) Descriptor() ([]byte, []int)
func (*SMSVerificationCodeRequest) GetCode ¶
func (m *SMSVerificationCodeRequest) GetCode() string
func (*SMSVerificationCodeRequest) GetDeviceID ¶
func (m *SMSVerificationCodeRequest) GetDeviceID() string
func (*SMSVerificationCodeRequest) GetSmsToken ¶
func (m *SMSVerificationCodeRequest) GetSmsToken() string
func (*SMSVerificationCodeRequest) GetToken ¶
func (m *SMSVerificationCodeRequest) GetToken() string
func (*SMSVerificationCodeRequest) GetUserID ¶
func (m *SMSVerificationCodeRequest) GetUserID() int64
func (*SMSVerificationCodeRequest) ProtoMessage ¶
func (*SMSVerificationCodeRequest) ProtoMessage()
func (*SMSVerificationCodeRequest) Reset ¶
func (m *SMSVerificationCodeRequest) Reset()
func (*SMSVerificationCodeRequest) String ¶
func (m *SMSVerificationCodeRequest) String() string
type SMSVerificationRequest ¶
type SMSVerificationRequest struct { DeviceID string `protobuf:"bytes,1,opt,name=deviceID" json:"deviceID,omitempty"` Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` UserID int64 `protobuf:"varint,3,opt,name=userID" json:"userID,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone" json:"phone,omitempty"` }
func (*SMSVerificationRequest) Descriptor ¶
func (*SMSVerificationRequest) Descriptor() ([]byte, []int)
func (*SMSVerificationRequest) GetDeviceID ¶
func (m *SMSVerificationRequest) GetDeviceID() string
func (*SMSVerificationRequest) GetPhone ¶
func (m *SMSVerificationRequest) GetPhone() string
func (*SMSVerificationRequest) GetToken ¶
func (m *SMSVerificationRequest) GetToken() string
func (*SMSVerificationRequest) GetUserID ¶
func (m *SMSVerificationRequest) GetUserID() int64
func (*SMSVerificationRequest) ProtoMessage ¶
func (*SMSVerificationRequest) ProtoMessage()
func (*SMSVerificationRequest) Reset ¶
func (m *SMSVerificationRequest) Reset()
func (*SMSVerificationRequest) String ¶
func (m *SMSVerificationRequest) String() string
type SMSVerificationResponse ¶
type SMSVerificationResponse struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Code int32 `protobuf:"varint,2,opt,name=code" json:"code,omitempty"` Status *SMSVerificationStatus `protobuf:"bytes,3,opt,name=status" json:"status,omitempty"` Detail string `protobuf:"bytes,4,opt,name=detail" json:"detail,omitempty"` }
func (*SMSVerificationResponse) Descriptor ¶
func (*SMSVerificationResponse) Descriptor() ([]byte, []int)
func (*SMSVerificationResponse) GetCode ¶
func (m *SMSVerificationResponse) GetCode() int32
func (*SMSVerificationResponse) GetDetail ¶
func (m *SMSVerificationResponse) GetDetail() string
func (*SMSVerificationResponse) GetId ¶
func (m *SMSVerificationResponse) GetId() string
func (*SMSVerificationResponse) GetStatus ¶
func (m *SMSVerificationResponse) GetStatus() *SMSVerificationStatus
func (*SMSVerificationResponse) ProtoMessage ¶
func (*SMSVerificationResponse) ProtoMessage()
func (*SMSVerificationResponse) Reset ¶
func (m *SMSVerificationResponse) Reset()
func (*SMSVerificationResponse) String ¶
func (m *SMSVerificationResponse) String() string
type SMSVerificationStatus ¶
type SMSVerificationStatus struct { Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` Phone string `protobuf:"bytes,2,opt,name=phone" json:"phone,omitempty"` ExpiresAt string `protobuf:"bytes,3,opt,name=expiresAt" json:"expiresAt,omitempty"` Verified bool `protobuf:"varint,4,opt,name=verified" json:"verified,omitempty"` }
func (*SMSVerificationStatus) Descriptor ¶
func (*SMSVerificationStatus) Descriptor() ([]byte, []int)
func (*SMSVerificationStatus) GetExpiresAt ¶
func (m *SMSVerificationStatus) GetExpiresAt() string
func (*SMSVerificationStatus) GetPhone ¶
func (m *SMSVerificationStatus) GetPhone() string
func (*SMSVerificationStatus) GetToken ¶
func (m *SMSVerificationStatus) GetToken() string
func (*SMSVerificationStatus) GetVerified ¶
func (m *SMSVerificationStatus) GetVerified() bool
func (*SMSVerificationStatus) ProtoMessage ¶
func (*SMSVerificationStatus) ProtoMessage()
func (*SMSVerificationStatus) Reset ¶
func (m *SMSVerificationStatus) Reset()
func (*SMSVerificationStatus) String ¶
func (m *SMSVerificationStatus) String() string
type UpdateRequest ¶
type UpdateRequest struct { Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` DeviceID string `protobuf:"bytes,2,opt,name=deviceID" json:"deviceID,omitempty"` User *User `protobuf:"bytes,3,opt,name=user" json:"user,omitempty"` AppName string `protobuf:"bytes,4,opt,name=appName" json:"appName,omitempty"` }
func (*UpdateRequest) Descriptor ¶
func (*UpdateRequest) Descriptor() ([]byte, []int)
func (*UpdateRequest) GetAppName ¶
func (m *UpdateRequest) GetAppName() string
func (*UpdateRequest) GetDeviceID ¶
func (m *UpdateRequest) GetDeviceID() string
func (*UpdateRequest) GetToken ¶
func (m *UpdateRequest) GetToken() string
func (*UpdateRequest) GetUser ¶
func (m *UpdateRequest) GetUser() *User
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) Reset ¶
func (m *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (m *UpdateRequest) String() string
type User ¶
type User struct { ID int64 `protobuf:"varint,1,opt,name=ID" json:"ID,omitempty"` Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` Password string `protobuf:"bytes,3,opt,name=password" json:"password,omitempty"` UserName string `protobuf:"bytes,4,opt,name=userName" json:"userName,omitempty"` LoginHistory []*History `protobuf:"bytes,5,rep,name=loginHistory" json:"loginHistory,omitempty"` Phone *Value `protobuf:"bytes,6,opt,name=phone" json:"phone,omitempty"` Email *Value `protobuf:"bytes,7,opt,name=email" json:"email,omitempty"` OAuths map[string]*OAuth `` /* 132-byte string literal not displayed */ }
func (*User) Descriptor ¶
func (*User) GetLoginHistory ¶
func (*User) GetPassword ¶
func (*User) GetUserName ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
type Value ¶
type Value struct { Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` Verified bool `protobuf:"varint,2,opt,name=verified" json:"verified,omitempty"` }
func (*Value) Descriptor ¶
func (*Value) GetVerified ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.