Packages

class DataService extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DataService
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new DataService()

Value Members

  1. 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

  2. def countUsers: Either[Throwable, Result]

    Counts all existing GoingOk users

    Counts all existing GoingOk users

    returns

    Sequence of users

  3. implicit val cs: ContextShift[IO]
  4. def getAllGroupCodes: Either[Throwable, Result]

    Gets all group codes from DB

    Gets all group codes from DB

    returns

    Sequence of group codes

  5. def getAllPseudonyms: Either[Throwable, Vector[String]]

    Gets all pseudonyms from DB

    Gets all pseudonyms from DB

    returns

    Vector of pseudonyms

  6. def getAuthorReflectionsForGroup(group_code: String): Either[Throwable, Result]
  7. def getAuthorReflectionsForGroupWithRange(group_code: String, start: String, end: String): Either[Throwable, Result]
  8. def getGoingokIdForPseudonym(pseudonym: String): Either[Throwable, UUID]
  9. def getGroupAdmins(): Either[Throwable, Result]
  10. 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

  11. def getNextPseudonym: Either[Throwable, String]

    Gets the next avaliable pseudonym

    Gets the next avaliable pseudonym

    returns

    pseudonym

  12. 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

  13. def getPseudonymCounts: Either[Throwable, Result]

    Gets pseudonym counts from DB

    Gets pseudonym counts from DB

    returns

    Sequence of pseudonyms

  14. 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

  15. 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

  16. 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

  17. 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

  18. 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

  19. 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

  20. def insertActivity(activity: Activity): Either[Throwable, Int]

    Inserts new activity into DB

    Inserts new activity into DB

    activity

    new activity

  21. 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

  22. def insertGroupAdmin(goingok_id: UUID, group_code: String, permission: String): Either[Throwable, Int]
  23. def insertNewUser(user: User): Either[Throwable, UUID]

    Inserts new GoingOK user into DB

    Inserts new GoingOK user into DB

    user

    GoingOK user

  24. def insertNewUserAuth(userauth: UserAuth): Either[Throwable, UUID]

    Inserts new user Authentication into DB

    Inserts new user Authentication into DB

    userauth

    User authentication

  25. def insertPseudonyms(pseudocodes: List[String]): Either[Throwable, Int]

    Inserts new pseudonyms into DB

    Inserts new pseudonyms into DB

    pseudocodes

    new list of pseudonyms

  26. 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

  27. val logger: Logger
  28. def runQuery[A](query: doobie.ConnectionIO[A]): Either[Throwable, A]
  29. 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

  30. 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