Documentation ¶
Index ¶
- func AddUSEService(u *Service) gin.HandlerFunc
- func ConvertToInt(u interface{}, ernVal int) int
- func InitServiceSJWT(c *gin.Context) (*SJWTClaims, *Service, bool)
- func RandomString(n int) string
- func UnmashalBody(body io.ReadCloser) map[string]interface{}
- type ErrorMsg
- type SJWTClaims
- type Service
- func (u *Service) ClearUserNonceFromAll(userId int) bool
- func (u *Service) CompareUserNonce(userId int, nonce string) bool
- func (u *Service) DeleteUserNonceFromDB(userId int) bool
- func (u *Service) GWRequest(url string, method string, header http.Header, body io.ReadCloser, ...) (*http.Response, error)
- func (u *Service) Initialize(cfgpath string) bool
- func (u *Service) IsUserAdmin(claims *UJWTClaims) bool
- func (u *Service) IssueNewUserJWT(claims UJWTClaims) (string, bool)
- func (u *Service) RefreshUserNonceFromAll(userId int) bool
- func (u *Service) ReloadUserNonceFromDB(userId int, userNonce string) bool
- func (u *Service) Request(path string, method string, header http.Header, body io.ReadCloser) (*http.Response, error)
- func (u *Service) RequestForwarder(c *gin.Context)
- func (u *Service) RequestWithClaims(path string, method string, header http.Header, body io.ReadCloser, ...) (*http.Response, error)
- func (u *Service) SRVRequest(path string, method string, header http.Header, body io.ReadCloser, ...) (*http.Response, error)
- func (u *Service) SaveConfiguration() bool
- func (u *Service) Start(router *gin.Engine)
- func (u *Service) UpdateUserNonce(userId int, userNonce string) bool
- func (u *Service) ValidateServiceJWT(r *http.Request) *SJWTClaims
- func (u *Service) ValidateUserJWT(r *http.Request) *UJWTClaims
- type ServiceConfiguration
- type ServicesStatus
- type UJWTClaims
- type UJWTClaimsMinimal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUSEService ¶
func AddUSEService(u *Service) gin.HandlerFunc
func ConvertToInt ¶
func InitServiceSJWT ¶
func InitServiceSJWT(c *gin.Context) (*SJWTClaims, *Service, bool)
func RandomString ¶
func UnmashalBody ¶
func UnmashalBody(body io.ReadCloser) map[string]interface{}
Types ¶
type SJWTClaims ¶
type Service ¶
type Service struct { UJwt *aJWT.AuthJWT SJwt *aJWT.AuthJWT Config *ServiceConfiguration Database *gorm.DB Rdb *redis.Client ServicesSts []ServicesStatus // contains filtered or unexported fields }
func (*Service) ClearUserNonceFromAll ¶
func (*Service) CompareUserNonce ¶
func (*Service) DeleteUserNonceFromDB ¶
func (*Service) Initialize ¶
func (*Service) IsUserAdmin ¶
func (u *Service) IsUserAdmin(claims *UJWTClaims) bool
func (*Service) IssueNewUserJWT ¶
func (u *Service) IssueNewUserJWT(claims UJWTClaims) (string, bool)
func (*Service) RefreshUserNonceFromAll ¶
func (*Service) ReloadUserNonceFromDB ¶
func (*Service) RequestForwarder ¶
func (*Service) RequestWithClaims ¶
func (*Service) SRVRequest ¶
func (*Service) SaveConfiguration ¶
func (*Service) UpdateUserNonce ¶
func (*Service) ValidateServiceJWT ¶
func (u *Service) ValidateServiceJWT(r *http.Request) *SJWTClaims
func (*Service) ValidateUserJWT ¶
func (u *Service) ValidateUserJWT(r *http.Request) *UJWTClaims
type ServiceConfiguration ¶
type ServiceConfiguration struct { Ims imsConfiguration Secrets []serviceConfigurationJWT Database serviceConfigurationDatabase RedisDB serviceConfigurationRedisDB Gateways []serviceConfigurationGateway AuthThirdParty []serviceConfigurationLoginThirdParty PathAuth serviceConfigurationAuth PathRegister serviceConfigurationRegister PathNonce serviceConfigurationNonce PathAdmin serviceConfigurationAdmin Services []serviceConfigurationService }
func (*ServiceConfiguration) AddService ¶
func (u *ServiceConfiguration) AddService(name string, host string, port int, url string)
func (*ServiceConfiguration) Load ¶
func (u *ServiceConfiguration) Load(dbconfig string) bool
func (*ServiceConfiguration) RemoveService ¶
func (u *ServiceConfiguration) RemoveService(name string)
type ServicesStatus ¶
type UJWTClaims ¶
Click to show internal directories.
Click to hide internal directories.