Documentation ¶
Index ¶
- type CategoryName
- type CategoryUUID
- type Connection
- func (conn Connection) AvatarRead128(userUUID UserUUID, dest *Raw) error
- func (conn Connection) AvatarRead256(userUUID UserUUID, dest *Raw) error
- func (conn Connection) AvatarRead512(userUUID UserUUID, dest *Raw) error
- func (conn Connection) AvatarSet(update bool, userUUID UserUUID, avatars UserAvatars) error
- func (conn Connection) CredentialsCreate(userUUID UserUUID, hLogin HashedLogin, hPassword HashedPassword) error
- func (conn Connection) CredentialsDelete(userUUID UserUUID) error
- func (conn Connection) CredentialsRead(hLogin HashedLogin, hPassword HashedPassword, userUUID *UserUUID) error
- func (conn Connection) PostCreate(container Post) error
- func (conn Connection) SessionCreate(uid UserUUID, sid SessionUUID, key SessionKey, valid time.Time) error
- func (conn Connection) SessionDeleteKey(key SessionKey) error
- func (conn Connection) SessionRead(key SessionKey) (*UserUUID, *time.Time, error)
- func (conn Connection) ThreadCreate(userUUID UserUUID, categoryUUID CategoryUUID, name ThreadName, ...) error
- func (conn Connection) ThreadDelete(threadUUID string) error
- func (conn Connection) ThreadGet(threadUUID ThreadUUID, container *ViewThread) error
- func (conn Connection) ThreadGetList(categoryUUID string, container *ViewThreadsByCategory) error
- func (conn Connection) ThreadUpdate(threadUUID string, container ViewThreadUpdate) error
- func (conn Connection) UserGet(uuid UserUUID, container *ViewUserFull) error
- func (conn Connection) UserSet(uuid UserUUID, name *UserFullName, nick *UserNickName) error
- type CreateThread
- type Date
- type HashedLogin
- type HashedPassword
- type Logger
- type ModelCategory
- type Post
- type PostContent
- type PostUUID
- type Raw
- type SessionKey
- type SessionUUID
- type ThreadHeader
- type ThreadName
- type ThreadUUID
- type URLUserAvatar128
- type URLUserAvatar256
- type URLUserAvatar512
- type UserAvatars
- type UserFullName
- type UserNickName
- type UserPosts
- type UserRegistrationDate
- type UserUUID
- type Verifiable
- type ViewPostByThreadUUID
- type ViewThread
- type ViewThreadContent
- type ViewThreadUpdate
- type ViewThreadsByCategory
- type ViewUserFull
- type ViewUserProfileFromThread
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryName ¶
type CategoryName string
type CategoryUUID ¶
type CategoryUUID string
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(log *zap.Logger, config *cfg.ConfigDatabasePostgres, secret *cfg.SecretDatabasePostgres) (*Connection, error)
func (Connection) AvatarRead128 ¶
func (conn Connection) AvatarRead128(userUUID UserUUID, dest *Raw) error
func (Connection) AvatarRead256 ¶
func (conn Connection) AvatarRead256(userUUID UserUUID, dest *Raw) error
func (Connection) AvatarRead512 ¶
func (conn Connection) AvatarRead512(userUUID UserUUID, dest *Raw) error
func (Connection) AvatarSet ¶
func (conn Connection) AvatarSet(update bool, userUUID UserUUID, avatars UserAvatars) error
func (Connection) CredentialsCreate ¶
func (conn Connection) CredentialsCreate(userUUID UserUUID, hLogin HashedLogin, hPassword HashedPassword) error
func (Connection) CredentialsDelete ¶
func (conn Connection) CredentialsDelete(userUUID UserUUID) error
func (Connection) CredentialsRead ¶
func (conn Connection) CredentialsRead(hLogin HashedLogin, hPassword HashedPassword, userUUID *UserUUID) error
func (Connection) PostCreate ¶
func (conn Connection) PostCreate(container Post) error
func (Connection) SessionCreate ¶
func (conn Connection) SessionCreate(uid UserUUID, sid SessionUUID, key SessionKey, valid time.Time) error
func (Connection) SessionDeleteKey ¶
func (conn Connection) SessionDeleteKey(key SessionKey) error
func (Connection) SessionRead ¶
func (conn Connection) SessionRead(key SessionKey) (*UserUUID, *time.Time, error)
func (Connection) ThreadCreate ¶
func (conn Connection) ThreadCreate(userUUID UserUUID, categoryUUID CategoryUUID, name ThreadName, header ThreadHeader) error
func (Connection) ThreadDelete ¶
func (conn Connection) ThreadDelete(threadUUID string) error
func (Connection) ThreadGet ¶
func (conn Connection) ThreadGet(threadUUID ThreadUUID, container *ViewThread) error
func (Connection) ThreadGetList ¶
func (conn Connection) ThreadGetList(categoryUUID string, container *ViewThreadsByCategory) error
func (Connection) ThreadUpdate ¶
func (conn Connection) ThreadUpdate(threadUUID string, container ViewThreadUpdate) error
func (Connection) UserGet ¶
func (conn Connection) UserGet(uuid UserUUID, container *ViewUserFull) error
func (Connection) UserSet ¶
func (conn Connection) UserSet(uuid UserUUID, name *UserFullName, nick *UserNickName) error
type CreateThread ¶
type CreateThread struct { ThreadUUID CategoryUUID UserUUID ThreadName DateAdded Date DateLastEdit Date ThreadHeader }
type HashedLogin ¶
type HashedLogin []byte
func (HashedLogin) Verify ¶
func (s HashedLogin) Verify() bool
type HashedPassword ¶
type HashedPassword []byte
func (HashedPassword) Verify ¶
func (s HashedPassword) Verify() bool
type ModelCategory ¶
type ModelCategory struct { CategoryUUID CategoryName }
type Post ¶
type Post struct { UserUUID Date PostContent }
type PostContent ¶
type PostContent string
type SessionKey ¶
type SessionKey string
func (SessionKey) Verify ¶
func (s SessionKey) Verify() bool
type SessionUUID ¶
type SessionUUID string
func (SessionUUID) Verify ¶
func (s SessionUUID) Verify() bool
type ThreadHeader ¶
type ThreadHeader string
type ThreadName ¶
type ThreadName string
type ThreadUUID ¶
type ThreadUUID string
type URLUserAvatar128 ¶
type URLUserAvatar256 ¶
type URLUserAvatar512 ¶
type UserAvatars ¶
type UserFullName ¶
type UserFullName string
func (UserFullName) Verify ¶
func (u UserFullName) Verify() bool
type UserNickName ¶
type UserNickName string
func (UserNickName) Verify ¶
func (u UserNickName) Verify() bool
type UserRegistrationDate ¶
type UserRegistrationDate int64
type Verifiable ¶
type Verifiable interface {
Verify() bool
}
type ViewPostByThreadUUID ¶
type ViewPostByThreadUUID struct { PostUUID UserUUID DateAdded Date DateLastEdit Date PostContent }
type ViewThread ¶
type ViewThread struct { Category ModelCategory Author ViewUserProfileFromThread Name string DateAdded int64 DateLastEdit int64 Header string Content ViewThreadContent }
type ViewThreadContent ¶
type ViewThreadContent struct { Users []ViewUserProfileFromThread Posts []ViewPostByThreadUUID }
type ViewThreadUpdate ¶
type ViewThreadsByCategory ¶
type ViewThreadsByCategory struct { ThreadUUID ThreadName }
type ViewUserFull ¶
type ViewUserFull struct { UserNickName `db:"nick_name"` UserFullName `db:"full_name"` UserPosts `db:"posts"` UserRegistrationDate `db:"registration_date"` }
type ViewUserProfileFromThread ¶
type ViewUserProfileFromThread struct { UserUUID RegistrationDate Date UserNickName UserFullName }
Click to show internal directories.
Click to hide internal directories.