Documentation ¶
Index ¶
- type Channel
- func (m Channel) AddMember(channel model.Channel, user model.User, role model.ChannelRole) error
- func (m Channel) Create(name string, user model.User) (model.Channel, error)
- func (m Channel) FindByUUID(channelUUID string) (model.Channel, error)
- func (m Channel) GetChannelForUser(channelUUID, userUUID string) (model.Channel, error)
- func (m Channel) GetChannelListForUser(userUUID string) ([]model.Channel, error)
- func (m Channel) GetMemberInfo(channelUUID, userUUID string) (model.Member, error)
- type ChannelBackend
- type Credential
- type CredentialBackend
- type Message
- type MessageBackend
- type Session
- func (m Session) CreateSession(userUUID string) (model.Session, error)
- func (m Session) Delete(id string) error
- func (m Session) FindByID(id string) (model.Session, error)
- func (m Session) FindByIdAndMarkSeen(id string) (model.Session, error)
- func (m Session) SetLastSeenAt(id string, lastSeenAt time.Time) error
- type SessionBackend
- type User
- func (m User) Create(user model.User) error
- func (m User) FindAllByUUIDs(userUUIDs ...string) (map[string]model.User, error)
- func (m User) FindByEmail(email string) (model.User, error)
- func (m User) FindByEmailAndPlainPassword(email, plainPassword string) (user model.User, err error)
- func (m User) FindByUUID(uuid string) (model.User, error)
- type UserBackend
- type Verification
- type VerificationBackend
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
func NewChannelManager ¶
func NewChannelManager(channelBackend ChannelBackend) Channel
func (Channel) GetChannelForUser ¶
func (Channel) GetChannelListForUser ¶
type ChannelBackend ¶
type ChannelBackend interface { Create(channel model.Channel) error FindByUUID(uuid string) (model.Channel, error) FindAllForUser(userUUID string) ([]model.Channel, error) FindForUser(channelUUID, userUUID string) (model.Channel, error) AddMember(channel model.Channel, user model.User, role model.ChannelRole) error FindMember(channelUUID string, userUUID string) (model.Member, error) }
type Credential ¶
type Credential struct {
// contains filtered or unexported fields
}
func NewCredentialManager ¶
func NewCredentialManager(verificationBackend CredentialBackend) Credential
func (Credential) CheckPasswordForUser ¶
func (m Credential) CheckPasswordForUser(userUUID, plainPassword string) (isValid bool, err error)
func (Credential) SetPasswordForUser ¶
func (m Credential) SetPasswordForUser(userUUID, plainPassword string) error
type CredentialBackend ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func NewMessageManager ¶
func NewMessageManager(messageBackend MessageBackend) Message
func (Message) FindLastMessageForChannels ¶
func (Message) FindMessagesForChannel ¶
type MessageBackend ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSessionManager ¶
func NewSessionManager(sessionBackend SessionBackend) Session
func (Session) CreateSession ¶
func (Session) FindByIdAndMarkSeen ¶
type SessionBackend ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func NewUserManager ¶
func NewUserManager(userBackend UserBackend, credentialBackend CredentialBackend) User
func (User) FindAllByUUIDs ¶
func (User) FindByEmailAndPlainPassword ¶
type UserBackend ¶
type Verification ¶
type Verification struct {
// contains filtered or unexported fields
}
func NewVerificationManager ¶
func NewVerificationManager(verificationBackend VerificationBackend) Verification
func (Verification) CreateAndSendCode ¶
func (m Verification) CreateAndSendCode(userUUID *string, fieldName string, fieldValue string) (model.FieldVerification, error)
func (Verification) FindByUUID ¶
func (m Verification) FindByUUID(uuid string) (model.FieldVerification, error)
type VerificationBackend ¶
type VerificationBackend interface { Create(verification model.FieldVerification) error FindByUUID(uuid string) (model.FieldVerification, error) }
Click to show internal directories.
Click to hide internal directories.