Versions in this module Expand all Collapse all v0 v0.4.1 Feb 16, 2020 v0.4.0 Oct 10, 2018 Changes in this version + func RegisterUsersHandler(s server.Server, hdlr UsersHandler, opts ...server.HandlerOption) + type Device struct + Created string + DeviceID string + ID string + LastUpdated string + UserID string + func (*Device) Descriptor() ([]byte, []int) + func (*Device) ProtoMessage() + func (m *Device) GetCreated() string + func (m *Device) GetDeviceID() string + func (m *Device) GetID() string + func (m *Device) GetLastUpdated() string + func (m *Device) GetUserID() string + func (m *Device) Reset() + func (m *Device) String() string + type Facebook struct + Created string + FacebookID string + ID string + LastUpdated string + UserID string + Verified bool + func (*Facebook) Descriptor() ([]byte, []int) + func (*Facebook) ProtoMessage() + func (m *Facebook) GetCreated() string + func (m *Facebook) GetFacebookID() string + func (m *Facebook) GetID() string + func (m *Facebook) GetLastUpdated() string + func (m *Facebook) GetUserID() string + func (m *Facebook) GetVerified() bool + func (m *Facebook) Reset() + func (m *Facebook) String() string + type GetDetailsReq struct + APIKey string + JWT string + UserID string + func (*GetDetailsReq) Descriptor() ([]byte, []int) + func (*GetDetailsReq) ProtoMessage() + func (m *GetDetailsReq) GetAPIKey() string + func (m *GetDetailsReq) GetJWT() string + func (m *GetDetailsReq) GetUserID() string + func (m *GetDetailsReq) Reset() + func (m *GetDetailsReq) String() string + type Group struct + AccessLevel float32 + Created string + ID string + LastUpdated string + Name string + func (*Group) Descriptor() ([]byte, []int) + func (*Group) ProtoMessage() + func (m *Group) GetAccessLevel() float32 + func (m *Group) GetCreated() string + func (m *Group) GetID() string + func (m *Group) GetLastUpdated() string + func (m *Group) GetName() string + func (m *Group) Reset() + func (m *Group) String() string + type Guard struct + func NewGuard(db KeyStore, opts ...Option) (*Guard, error) + func (s *Guard) APIKeyValid(key string) (string, error) + func (s *Guard) NewAPIKey(userID string) (*Key, error) + type Key struct + APIKey string + CreateDate time.Time + ID string + UpdateDate time.Time + UserID string + type KeyGenerator interface + SecureRandomBytes func(length int) ([]byte, error) + type KeyStore interface + APIKeysByUserID func(userID string, offset, count int64) ([]Key, error) + InsertAPIKey func(userID, key string) (*Key, error) + IsNotFoundError func(error) bool + type Option func(*Guard) + func WithKeyGenerator(kg KeyGenerator) Option + func WithMasterKey(key string) Option + type User struct + Created string + Devices []*Device + Email *VerifLogin + Facebook *Facebook + Groups []*Group + ID string + JWT string + LastUpdated string + Phone *VerifLogin + Type *UserType + Username *UserName + func (*User) Descriptor() ([]byte, []int) + func (*User) ProtoMessage() + func (m *User) GetCreated() string + func (m *User) GetDevices() []*Device + func (m *User) GetEmail() *VerifLogin + func (m *User) GetFacebook() *Facebook + func (m *User) GetGroups() []*Group + func (m *User) GetID() string + func (m *User) GetJWT() string + func (m *User) GetLastUpdated() string + func (m *User) GetPhone() *VerifLogin + func (m *User) GetType() *UserType + func (m *User) GetUsername() *UserName + func (m *User) Reset() + func (m *User) String() string + type UserName struct + Created string + ID string + LastUpdated string + UserID string + Value string + func (*UserName) Descriptor() ([]byte, []int) + func (*UserName) ProtoMessage() + func (m *UserName) GetCreated() string + func (m *UserName) GetID() string + func (m *UserName) GetLastUpdated() string + func (m *UserName) GetUserID() string + func (m *UserName) GetValue() string + func (m *UserName) Reset() + func (m *UserName) String() string + type UserType struct + Created string + ID string + LastUpdated string + Name string + func (*UserType) Descriptor() ([]byte, []int) + func (*UserType) ProtoMessage() + func (m *UserType) GetCreated() string + func (m *UserType) GetID() string + func (m *UserType) GetLastUpdated() string + func (m *UserType) GetName() string + func (m *UserType) Reset() + func (m *UserType) String() string + type Users struct + func (h *Users) GetDetails(ctx context.Context, in *GetDetailsReq, out *User) error + type UsersClient interface + GetDetails func(ctx context.Context, in *GetDetailsReq, opts ...client.CallOption) (*User, error) + func NewUsersClient(serviceName string, c client.Client) UsersClient + type UsersHandler interface + GetDetails func(context.Context, *GetDetailsReq, *User) error + type VerifLogin struct + Created string + ID string + LastUpdated string + UserID string + Value string + Verified bool + func (*VerifLogin) Descriptor() ([]byte, []int) + func (*VerifLogin) ProtoMessage() + func (m *VerifLogin) GetCreated() string + func (m *VerifLogin) GetID() string + func (m *VerifLogin) GetLastUpdated() string + func (m *VerifLogin) GetUserID() string + func (m *VerifLogin) GetValue() string + func (m *VerifLogin) GetVerified() bool + func (m *VerifLogin) Reset() + func (m *VerifLogin) String() string