Documentation
¶
Index ¶
- func VerifyUser(username, password, clientCode string, client *http.Client) (string, error)
- type Client
- type HttpClient
- type IdentityToken
- type JwtToken
- type JwtTokenResponse
- type PartnerClient
- type PartnerTokenProvider
- type Provider
- type Records
- type SessionInfo
- type SessionKeyInfo
- type SessionKeyInfoResponse
- type SessionKeyUser
- type SessionKeyUserResponse
- type VerifyUserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
func (*Client) GetIdentityToken ¶
func (cli *Client) GetIdentityToken(ctx context.Context) (*IdentityToken, error)
GetIdentityToken ...
func (*Client) GetJWTToken ¶
GetJWTToken executes the getJWTToken query (https://learn-api.erply.com/requests/getjwttoken).
func (*Client) VerifyIdentityToken ¶
VerifyIdentityToken ...
type IdentityToken ¶
type IdentityToken struct {
Jwt string `json:"identityToken"`
}
type JwtTokenResponse ¶
type PartnerClient ¶
func NewPartnerClient ¶
func NewPartnerClient(client *common.Client) *PartnerClient
func (*PartnerClient) GetJWTToken ¶
func (cli *PartnerClient) GetJWTToken(ctx context.Context) (*JwtToken, error)
only for partnerClient
type PartnerTokenProvider ¶
interface only for partner tokens
type SessionInfo ¶
type SessionInfo struct {
SessionKey string `json:"sessionKey"`
}
type SessionKeyInfo ¶ added in v1.7.1
type SessionKeyInfo struct {
CreationUnixTime string `json:"creationUnixTime"`
ExpireUnixTime string `json:"expireUnixTime"`
}
func GetSessionKeyInfo ¶ added in v1.7.1
func GetSessionKeyInfo(sessionKey string, clientCode string, client HttpClient) (*SessionKeyInfo, error)
GetSessionKeyInfo returns session key expiration info
type SessionKeyInfoResponse ¶ added in v1.7.1
type SessionKeyInfoResponse struct {
Status common2.Status `json:"status"`
Records []SessionKeyInfo `json:"records"`
}
type SessionKeyUser ¶
type SessionKeyUser struct {
UserID string `json:"userID"`
UserName string `json:"userName"`
EmployeeName string `json:"employeeName"`
EmployeeID string `json:"employeeID"`
GroupID string `json:"groupID"`
GroupName string `json:"groupName"`
IPAddress string `json:"ipAddress"`
SessionKey string `json:"sessionKey"`
SessionLength int `json:"sessionLength"`
LoginUrl string `json:"loginUrl"`
BerlinPOSVersion string `json:"berlinPOSVersion"`
BerlinPOSAssetsURL string `json:"berlinPOSAssetsURL"`
EpsiURL string `json:"epsiURL"`
IdentityToken string `json:"identityToken"`
Token string `json:"token"`
}
func GetSessionKeyUser ¶
func GetSessionKeyUser(sessionKey string, clientCode string, client HttpClient) (*SessionKeyUser, error)
GetSessionKeyUser returns user information for the used session key
type SessionKeyUserResponse ¶
type SessionKeyUserResponse struct {
Records []SessionKeyUser `json:"records"`
}
type VerifyUserResponse ¶
type VerifyUserResponse struct {
Records []Records `json:"records"`
}
Click to show internal directories.
Click to hide internal directories.