class DataService extends AnyRef
- Alphabetic
- By Inheritance
- DataService
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new DataService()
Value Members
- def countReflections(goingok_id: UUID): Either[Throwable, Result]
Counts all existing reflections
Counts all existing reflections
- goingok_id
GoingOk user ID
- returns
Sequence of reflections
- def countUsers: Either[Throwable, Result]
Counts all existing GoingOk users
Counts all existing GoingOk users
- returns
Sequence of users
- implicit val cs: ContextShift[IO]
- def getAllGroupCodes: Either[Throwable, Result]
Gets all group codes from DB
Gets all group codes from DB
- returns
Sequence of group codes
- def getAllPseudonyms: Either[Throwable, Vector[String]]
Gets all pseudonyms from DB
Gets all pseudonyms from DB
- returns
Vector of pseudonyms
- def getAuthorReflectionsForGroup(group_code: String): Either[Throwable, Result]
- def getAuthorReflectionsForGroupWithRange(group_code: String, start: String, end: String): Either[Throwable, Result]
- def getGoingokIdForPseudonym(pseudonym: String): Either[Throwable, UUID]
- def getGroupAdmins(): Either[Throwable, Result]
- def getGroupCode(code: String): Either[Throwable, GroupCode]
Gets GoingOK group code from DB
Gets GoingOK group code from DB
- code
GoingOK group code
- returns
GoingOK group code
- def getNextPseudonym: Either[Throwable, String]
Gets the next avaliable pseudonym
Gets the next avaliable pseudonym
- returns
pseudonym
- def getPermission(goingok_id: UUID, group_code: String): Either[Throwable, Result]
Gets permission from DB
Gets permission from DB
- goingok_id
GoingOK user ID
- group_code
GoingOK group code
- returns
permission
- def getPseudonymCounts: Either[Throwable, Result]
Gets pseudonym counts from DB
Gets pseudonym counts from DB
- returns
Sequence of pseudonyms
- def getReflectionsForGroup(group_code: String): Either[Throwable, Result]
Gets all reflections for a given group by GoingOK group code
Gets all reflections for a given group by GoingOK group code
- group_code
GoingOK group code
- returns
Sequence of group reflections
- def getReflectionsForGroupWithRange(group_code: String, start: String, end: String): Either[Throwable, Result]
Gets a specified range of reflections for a given group by GoingOK group code
Gets a specified range of reflections for a given group by GoingOK group code
- group_code
GoingOK group code
- start
range start
- end
range end
- returns
Sequence of reflections
- def getReflectionsForUser(goingokId: UUID): Either[Throwable, Vector[ReflectionEntry]]
Gets all reflections for a given user by GoingOK user ID
Gets all reflections for a given user by GoingOK user ID
- goingokId
GoingOK user ID
- returns
Vector of reflections
- def getUserForId(goingok_id: UUID): Either[Throwable, User]
Gets GoingOK user from DB by GoingOK user ID
Gets GoingOK user from DB by GoingOK user ID
- goingok_id
GoingOK user ID
- returns
GoingOK user
- def getUserWithGoogleId(googleId: String): Either[Throwable, User]
Gets GoingOK user from DB by Google user ID
Gets GoingOK user from DB by Google user ID
- googleId
Google user ID
- returns
GoingOK user
- def getUserWithServiceId(serviceUuid: UUID): Either[Throwable, User]
Gets GoingOK user from DB by Cognito user ID
Gets GoingOK user from DB by Cognito user ID
- returns
GoingOK user
- def insertActivity(activity: Activity): Either[Throwable, Int]
Inserts new activity into DB
Inserts new activity into DB
- activity
new activity
- def insertGroup(groupCode: String, goingok_id: UUID): Either[Throwable, Int]
Inserts new group code into DB
Inserts new group code into DB
- groupCode
new group code
- goingok_id
GoingOK user ID
- def insertGroupAdmin(goingok_id: UUID, group_code: String, permission: String): Either[Throwable, Int]
- def insertNewUser(user: User): Either[Throwable, UUID]
Inserts new GoingOK user into DB
Inserts new GoingOK user into DB
- user
GoingOK user
- def insertNewUserAuth(userauth: UserAuth): Either[Throwable, UUID]
Inserts new user Authentication into DB
Inserts new user Authentication into DB
- userauth
User authentication
- def insertPseudonyms(pseudocodes: List[String]): Either[Throwable, Int]
Inserts new pseudonyms into DB
Inserts new pseudonyms into DB
- pseudocodes
new list of pseudonyms
- def insertReflection(reflection: ReflectionData, goingok_id: UUID): Either[Throwable, Int]
Inserts new reflection into DB
Inserts new reflection into DB
- reflection
new reflection
- goingok_id
GoingOK user ID
- val logger: Logger
- def runQuery[A](query: doobie.ConnectionIO[A]): Either[Throwable, A]
- def updateCodeForUser(code: String, goingok_id: UUID): Either[Throwable, Int]
Updates GoingOK group code for a given GoingOK user
Updates GoingOK group code for a given GoingOK user
- code
new GoingOK group code
- goingok_id
GoingOK user ID
- def updatePseudonym(pseudonym: String): Either[Throwable, Int]
Update a given pseudonym from 'not allocated' to 'allocated'
Update a given pseudonym from 'not allocated' to 'allocated'
- pseudonym
as string