Documentation
¶
Index ¶
Constants ¶
View Source
const (
ScopeAuthentication = "authentication"
)
Variables ¶
View Source
var AnonymousUser = new(User)
View Source
var (
ErrDuplicateUsername = errors.New("duplicate username")
)
View Source
var (
ErrRecordNotFound = errors.New("record not found")
)
Functions ¶
This section is empty.
Types ¶
type MessageModel ¶
func (MessageModel) GetAll ¶
func (m MessageModel) GetAll() ([]*Message, error)
func (MessageModel) Insert ¶
func (m MessageModel) Insert(message *Message) error
type Models ¶
type Models struct { Users UserModel Messages MessageModel Tokens TokenModel }
type TokenModel ¶
func (TokenModel) DeleteForUser ¶
func (m TokenModel) DeleteForUser(userID uuid.UUID, scope string) error
func (TokenModel) Insert ¶
func (m TokenModel) Insert(token *Token) error
type User ¶
type User struct { ID uuid.UUID `json:"id"` CreatedAt time.Time `json:"created_at"` Username string `json:"username"` Password password `json:"-"` }
func (*User) IsAnonymous ¶
type UserModel ¶
func (*UserModel) GetByToken ¶
Click to show internal directories.
Click to hide internal directories.