Versions in this module Expand all Collapse all v1 v1.9.0 Feb 21, 2023 Changes in this version + const BASEURL + const CAN_ACCESS + const CAN_DELETE + const CAN_MANAGE + const CAN_MANAGE_SPECIAL + const CAN_MODIFY + const GET_TEAM_BY_IDENTIFIER + const GET_TEAM_PERMISSIONS + const GET_USER + const VALIDATE_USER_ACCOUNT + type Config struct + Secret string + SupervisiorInternalAPI string + func GetConfig() (*Config, error) + type RequestTokenValidator struct + Config *Config + func NewRequestTokenValidator() (*RequestTokenValidator, error) + func (r *RequestTokenValidator) GenerateValidateToken(input ...string) string + func (r *RequestTokenValidator) GenerateValidateTokenBySliceParam(input []string) string + type Supervisior struct + Config *Config + Validator *RequestTokenValidator + func NewSupervisior() (*Supervisior, error) + func (supervisior *Supervisior) CanAccess(token string, teamID int, unitType int, unitID int, attributeID int) (bool, error) + func (supervisior *Supervisior) CanDelete(token string, teamID int, unitType int, unitID int, attributeID int) (bool, error) + func (supervisior *Supervisior) CanManage(token string, teamID int, unitType int, unitID int, attributeID int) (bool, error) + func (supervisior *Supervisior) CanManageSpecial(token string, teamID int, unitType int, unitID int, attributeID int) (bool, error) + func (supervisior *Supervisior) CanModify(token string, teamID int, unitType int, unitID int, attributeID int, ...) (bool, error) + func (supervisior *Supervisior) GetTeamByIdentifier(targetTeamIdentifier string) (string, error) + func (supervisior *Supervisior) GetTeamPermissions(teamID int) (string, error) + func (supervisior *Supervisior) GetUser(targetUserID int) (string, error) + func (supervisior *Supervisior) ValidateUserAccount(token string) (bool, error)