wikimusic-model-hs-1.2.0.0
Safe HaskellSafe-Inferred
LanguageGHC2021

WikiMusic.Model.Auth

Synopsis

Documentation

data WikiMusicUser Source #

Instances

Instances details
FromJSON WikiMusicUser Source # 
Instance details

Defined in WikiMusic.Model.Auth

ToJSON WikiMusicUser Source # 
Instance details

Defined in WikiMusic.Model.Auth

Generic WikiMusicUser Source # 
Instance details

Defined in WikiMusic.Model.Auth

Associated Types

type Rep WikiMusicUser :: Type -> Type #

Read WikiMusicUser Source # 
Instance details

Defined in WikiMusic.Model.Auth

Show WikiMusicUser Source # 
Instance details

Defined in WikiMusic.Model.Auth

Eq WikiMusicUser Source # 
Instance details

Defined in WikiMusic.Model.Auth

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "authToken" k WikiMusicUser WikiMusicUser a b Source # 
Instance details

Defined in WikiMusic.Model.Auth

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "displayName" k WikiMusicUser WikiMusicUser a b Source # 
Instance details

Defined in WikiMusic.Model.Auth

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "emailAddress" k WikiMusicUser WikiMusicUser a b Source # 
Instance details

Defined in WikiMusic.Model.Auth

(k ~ A_Lens, a ~ UUID, b ~ UUID) => LabelOptic "identifier" k WikiMusicUser WikiMusicUser a b Source # 
Instance details

Defined in WikiMusic.Model.Auth

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "passwordHash" k WikiMusicUser WikiMusicUser a b Source # 
Instance details

Defined in WikiMusic.Model.Auth

(k ~ A_Lens, a ~ [UserRole], b ~ [UserRole]) => LabelOptic "roles" k WikiMusicUser WikiMusicUser a b Source # 
Instance details

Defined in WikiMusic.Model.Auth

type Rep WikiMusicUser Source # 
Instance details

Defined in WikiMusic.Model.Auth

type Rep WikiMusicUser = D1 ('MetaData "WikiMusicUser" "WikiMusic.Model.Auth" "wikimusic-model-hs-1.2.0.0-2AFmU6Rx8U3ctQHH6pLAk" 'False) (C1 ('MetaCons "WikiMusicUser" 'PrefixI 'True) ((S1 ('MetaSel ('Just "identifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UUID) :*: (S1 ('MetaSel ('Just "displayName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "emailAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "passwordHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "authToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "roles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [UserRole])))))

data LoginRequest Source #

Instances

Instances details
FromJSON LoginRequest Source # 
Instance details

Defined in WikiMusic.Model.Auth

ToJSON LoginRequest Source # 
Instance details

Defined in WikiMusic.Model.Auth

Generic LoginRequest Source # 
Instance details

Defined in WikiMusic.Model.Auth

Associated Types

type Rep LoginRequest :: Type -> Type #

Read LoginRequest Source # 
Instance details

Defined in WikiMusic.Model.Auth

Show LoginRequest Source # 
Instance details

Defined in WikiMusic.Model.Auth

Eq LoginRequest Source # 
Instance details

Defined in WikiMusic.Model.Auth

ToSchema LoginRequest Source # 
Instance details

Defined in WikiMusic.Model.Auth

(k ~ A_Lens, a ~ String, b ~ String) => LabelOptic "wikimusicEmail" k LoginRequest LoginRequest a b Source # 
Instance details

Defined in WikiMusic.Model.Auth

(k ~ A_Lens, a ~ String, b ~ String) => LabelOptic "wikimusicPassword" k LoginRequest LoginRequest a b Source # 
Instance details

Defined in WikiMusic.Model.Auth

type Rep LoginRequest Source # 
Instance details

Defined in WikiMusic.Model.Auth

type Rep LoginRequest = D1 ('MetaData "LoginRequest" "WikiMusic.Model.Auth" "wikimusic-model-hs-1.2.0.0-2AFmU6Rx8U3ctQHH6pLAk" 'False) (C1 ('MetaCons "LoginRequest" 'PrefixI 'True) (S1 ('MetaSel ('Just "wikimusicEmail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "wikimusicPassword") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

data UserRole Source #

Constructors

SuperUser 
Maintainer 
LowRank 
Demo 

Instances

Instances details
FromJSON UserRole Source # 
Instance details

Defined in WikiMusic.Model.Auth

ToJSON UserRole Source # 
Instance details

Defined in WikiMusic.Model.Auth

Generic UserRole Source # 
Instance details

Defined in WikiMusic.Model.Auth

Associated Types

type Rep UserRole :: Type -> Type #

Methods

from :: UserRole -> Rep UserRole x #

to :: Rep UserRole x -> UserRole #

Read UserRole Source # 
Instance details

Defined in WikiMusic.Model.Auth

Show UserRole Source # 
Instance details

Defined in WikiMusic.Model.Auth

Eq UserRole Source # 
Instance details

Defined in WikiMusic.Model.Auth

ToSchema UserRole Source # 
Instance details

Defined in WikiMusic.Model.Auth

type Rep UserRole Source # 
Instance details

Defined in WikiMusic.Model.Auth

type Rep UserRole = D1 ('MetaData "UserRole" "WikiMusic.Model.Auth" "wikimusic-model-hs-1.2.0.0-2AFmU6Rx8U3ctQHH6pLAk" 'False) ((C1 ('MetaCons "SuperUser" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Maintainer" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LowRank" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Demo" 'PrefixI 'False) (U1 :: Type -> Type)))

doWithRoles :: Applicative f => t -> (t -> Bool) -> p -> f (Either p b) -> f (Either p b) Source #

doWithRoles' :: Applicative f => WikiMusicUser -> ([UserRole] -> Bool) -> p -> f (Either p b) -> f (Either p b) Source #

show :: Show a => a -> String #

A specialised variant of showsPrec, using precedence context zero, and returning an ordinary String.

read :: Read a => String -> a #

The read function reads input from a string, which must be completely consumed by the input process. read fails with an error if the parse is unsuccessful, and it is therefore discouraged from being used in real applications. Use readMaybe or readEither for safe alternatives.

>>> read "123" :: Int
123
>>> read "hello" :: Int
*** Exception: Prelude.read: no parse