Documentation ¶
Index ¶
Constants ¶
View Source
const ( EmailKey = ContextKey("account-email") TokenKey = ContextKey("jwt-token-key") RoomKey = ContextKey("conn-pool-key") UpgradeKey = ContextKey("upgrade-http-key") )
View Source
const ( Unknown = iota Create Delete Join Leave Message NoteOn NoteOff )
Variables ¶
View Source
var ( ErrInvalidEmail = errors.New("invalid email") ErrNotImplemented = errors.New("not implemented") ErrInvalidType = errors.New("invalid type") ErrAlreadyExists = errors.New("already exists") ErrNotFound = errors.New("not found") ErrContextValue = errors.New("failed to retrieve value from context") )
Functions ¶
This section is empty.
Types ¶
type ContextKey ¶
type ContextKey string
type RTokenClient ¶
type RepoCloser ¶
type RepoCloser interface {
Close()
}
type RepoReader ¶
type RepoReader[Entry any] interface { // Returns an array of users subject to any filter // conditions that are required SelectMany(ctx context.Context) ([]Entry, error) // Returns a user form the database, the "key" // can be either the "id", "email" or "username" // as these are all given unique values Select(ctx context.Context, key any) (*Entry, error) }
type RepoWriter ¶
type TokenClient ¶
type TokenClient interface { RTokenClient WTokenClient }
type TokenReader ¶
type TokenWriter ¶
Click to show internal directories.
Click to hide internal directories.