/
messages.go
93 lines (85 loc) · 5.29 KB
/
messages.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
* Copyright (c) 2014 Santiago Arias | Remy Jourde
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package helpers
// errors
const (
// generic
ErrorCodeNotSupported = "Not Supported"
ErrorCodeInternal = "Internal error"
ErrorCodeNotFound = "Not Found"
ErrorCodeNameCannotBeEmpty = "Name field cannot be empty"
// sessions
ErrorCodeSessionsAccessTokenNotValid = "Access token is not valid"
ErrorCodeSessionsForbiden = "You are not authorized to log in to gonawin"
ErrorCodeSessionsUnableToSignin = "Error occurred during signin process"
ErrorCodeSessionsCannotGetTempCredentials = "Error getting temporary credentials"
ErrorCodeSessionsCannotSetSecretValue = "Error setting 'secret' value"
ErrorCodeSessionsCannotGetSecretValue = "Error getting 'secret' value"
ErrorCodeSessionsCannotGetRequestToken = "Error getting request token"
ErrorCodeSessionsCannotGetUserInfo = "Error getting user info from Twitter"
ErrorCodeSessionsCannotGetGoogleLoginURL = "Error getting Google accounts login URL"
// users
ErrorCodeUserNotFound = "User not found"
ErrorCodeUserNotFoundCannotUpdate = "User not found, unable to update"
ErrorCodeUserNotFoundCannotDelete = "User not found, unable to delete"
ErrorCodeUserNotFoundCannotInvite = "User not found, unable to send invitation"
ErrorCodeUserCannotUpdate = "Could not update user"
ErrorCodeUsersCannotUpdate = "Could not update users"
ErrorCodeUsersCannotPublishScore = "Could not pusblish score activities"
ErrorCodeUserIsTeamAdminCannotDelete = "User cannot be deleted because he is team admin"
ErrorCodeUserIsTournamentAdminCannotDelete = "User cannot be deleted because he is tournament admin"
// teams
ErrorCodeTeamAlreadyExists = "Sorry, that team already exists"
ErrorCodeTeamCannotCreate = "Could not create the team"
ErrorCodeTeamNotFound = "Team not found"
ErrorCodeTeamNotFoundCannotUpdate = "Team not found, unable to update"
ErrorCodeTeamNotFoundCannotDelete = "Team not found, unable to delete"
ErrorCodeTeamNotFoundCannotInvite = "Team not found, unable to send invitation"
ErrorCodeTeamUpdateForbiden = "Team can only be updated by the team administrator"
ErrorCodeTeamDeleteForbiden = "Team can only be deleted by the team administrator"
ErrorCodeTeamCannotUpdate = "Could not update team"
ErrorCodeTeamCannotInvite = "Could not send invitation"
ErrorCodeTeamRequestNotFound = "Request not found"
ErrorCodeTeamMemberNotFound = "Member not found"
ErrorCodeTeamAdminCannotLeave = "Team administrator cannot leave the team"
ErrorCodeTeamPrivateJoinForbiden = "Private Team cannot be joined without consent. Please request an invitation"
ErrorCodeTeamRequestAlreadySent = "Sorry, you already requested an invitation"
//tournaments
ErrorCodeTournamentAlreadyExists = "Sorry, that tournament already exists"
ErrorCodeTournamentCannotCreate = "Could not create the team"
ErrorCodeTournamentNotFound = "Tournament not found"
ErrorCodeTournamentNotFoundCannotUpdate = "Tournament not found, unable to update"
ErrorCodeTournamentNotFoundCannotDelete = "Tournament not found, unable to delete"
ErrorCodeTournamentUpdateForbiden = "Tournament can only be updated by the team administrator"
ErrorCodeTournamentDeleteForbiden = "Tournament can only be deleted by the team administrator"
ErrorCodeTournamentCannotUpdate = "Could not update tournament"
ErrorCodeTournamentCannotSearch = "Something went wrong, we are unable to perform search query"
ErrorCodeMatchCannotUpdate = "Something went wrong, unable to update match"
ErrorCodeMatchesCannotUpdate = "Something went wrong, unable to update matches"
ErrorCodeMatchNotFoundCannotUpdate = "Match not found, unable to update match"
ErrorCodeMatchNotFound = "Match not found"
ErrorCodeMatchNotFoundCannotSetPrediction = "Match not found, unable to set prediction"
ErrorCodeCannotSetPrediction = "Something went wrong, unable to set prediction"
ErrorCodeNotAllowedToSetPrediction = "You have to join the tournament to be able to set a predict for this match"
ErrorCodeTeamsCannotUpdate = "Could not update teams"
// invite
ErrorCodeInviteNoEmailAddr = "No email address has been entered"
ErrorCodeInviteEmailsInvalid = "Emails list is not properly formatted"
ErrorCodeInviteEmailCannotSend = "Sorry, we were unable to send the Email"
// relations
)
//info
//const ()