Documentation ¶
Index ¶
- type Service
- func (s *Service) GetAllIDsByToken(tokenIDentity []string) (ids []string)
- func (s *Service) GetAllTokenIDs() []string
- func (s *Service) GetClientOrigins(clientSecret string) ([]string, bool)
- func (s *Service) GetServerOrigins(serverSecret string) ([]string, bool)
- func (s *Service) GetToken(tokenFilter string) *Token
- func (s *Service) GetTokenID(tokenFilter string) string
- type Token
- type TokensHolder
- type TokensPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { sync.RWMutex //will call after every reloading DestinationsForceReload func() // contains filtered or unexported fields }
func NewService ¶
func (*Service) GetAllIDsByToken ¶
GetAllIDsByToken return token ids by token identity(client_secret/server_secret/token id)
func (*Service) GetAllTokenIDs ¶
GetAllTokenIDs return all token ids
func (*Service) GetClientOrigins ¶
GetClientOrigins return origins by client_secret
func (*Service) GetServerOrigins ¶
GetServerOrigins return origins by server_secret
func (*Service) GetTokenID ¶
GetTokenID return token id by client_secret/server_secret/token id return "" if token wasn't found
type Token ¶
type Token struct { ID string `mapstructure:"id" json:"id,omitempty"` ClientSecret string `mapstructure:"client_secret" json:"client_secret,omitempty"` ServerSecret string `mapstructure:"server_secret" json:"server_secret,omitempty"` Origins []string `mapstructure:"origins" json:"origins,omitempty"` BatchPeriodMin int `mapstructure:"batch_period_min" json:"batch_period_min,omitempty"` }
type TokensHolder ¶
type TokensHolder struct {
// contains filtered or unexported fields
}
func (*TokensHolder) IsEmpty ¶
func (th *TokensHolder) IsEmpty() bool
type TokensPayload ¶
type TokensPayload struct {
Tokens []Token `json:"tokens,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.