Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MethodAction = map[string]PermissionAction{ http.MethodGet: ActionRead, http.MethodPost: ActionWrite, http.MethodPut: ActionWrite, http.MethodPatch: ActionWrite, http.MethodDelete: ActionDelete, }
Functions ¶
This section is empty.
Types ¶
type JWTClaims ¶
type JWTClaims struct {
ID string `json:"id"`
Namespace string `json:"namespace,omitempty"`
ParentNamespace string `json:"parent_namespace,omitempty"`
UserId string `json:"user_id,omitempty"` // this is for when agent login value for super agent id
Email string `json:"email"`
Type Role `json:"position_type"`
Permissions PermissionsDTO `json:"permissions"`
jwt.RegisteredClaims
}
type JWTClaimsSignature ¶
type Permission ¶
type Permission string
const ( PermissionDashboard Permission = "dashboard" PermissionReportPlayerActive Permission = "report_player_active" PermissionReportClients Permission = "report_clients" PermissionReportSlot Permission = "report_slot" PermissionReportProfit Permission = "report_profit" PermissionSuperAgent Permission = "super_agent" PermissionAgent Permission = "agent" PermissionGameProviders Permission = "game_providers" PermissionGames Permission = "games" PermissionPlayerPendingTxn Permission = "player_pending_transaction" PermissionSettings Permission = "settings" PermissionRegenerateSecret Permission = "permission_regenerate_secret" )
type PermissionAction ¶
type PermissionAction int
const ( ActionRead PermissionAction = 1 << iota // 1 ActionWrite // 2 ActionDelete // 4 )
type PermissionsDTO ¶
type PermissionsDTO struct {
Dashboard int `json:"dashboard"`
ReportPlayerActive int `json:"report_player_active"`
ReportClients int `json:"report_clients"`
ReportSlot int `json:"report_slot"`
ReportProfit int `json:"report_profit"`
SuperAgent int `json:"super_agent"`
Agent int `json:"agent"`
GameProviders int `json:"game_providers"`
Games int `json:"games"`
PlayerPendingTransaction int `json:"player_pending_transaction"`
Settings int `json:"settings"`
PermissionRegenerateSecret int `json:"permission_regenerate_secret"`
}
type UserGender ¶
type UserGender string
const ( Male UserGender = "male" Female UserGender = "female" Other UserGender = "other" )
type UserStatus ¶
type UserStatus string
const ( Active UserStatus = "active" Inactive UserStatus = "inactive" )
Click to show internal directories.
Click to hide internal directories.