types

package
v0.0.0-...-48eaf85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 JWTClaimsSignature struct {
	ClientId     string `json:"client_id"`
	UserId       string `json:"user_id"`
	SuperAgentId string `json:"super_agent_id"`
	ClientSecret string `json:"client_secret"`
	jwt.RegisteredClaims
}

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"
	PermissionReportClientShared Permission = "report_client_shared"
	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"`
	ReportClientShared         int `json:"report_client_shared"`
	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 Role

type Role string

Role represents the role of a user

const (
	RoleAdmin  Role = "admin"
	RoleClient Role = "client"
	RoleUser   Role = "user"
)

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"
)

type UserType

type UserType string
const (
	UserTypeGuest UserType = "guest"
	UserTypeUser  UserType = "user"
)

func (*UserType) Scan

func (t *UserType) Scan(value interface{}) error

func (UserType) Value

func (t UserType) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL