Documentation
¶
Index ¶
- type AuthRequest
- type CredentialsInfo
- type LicenseError
- type LicenseRequest
- type MachineInfo
- type PlatformAPI
- type PlatformClient
- func (c *PlatformClient) CheckAuthRequestConfirmed(ctx context.Context, id, exchangeToken string) (bool, error)
- func (c *PlatformClient) CreateAuthRequest(ctx context.Context) (*AuthRequest, error)
- func (c *PlatformClient) ExchangeAuthRequest(ctx context.Context, id, exchangeToken string) (string, error)
- func (c *PlatformClient) GetLicense(ctx context.Context, licReq *LicenseRequest) error
- func (c *PlatformClient) GetLicenseToken(ctx context.Context, bearerToken string) (string, error)
- type ProductInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRequest ¶
type CredentialsInfo ¶
type CredentialsInfo struct {
Token string `json:"token"`
}
type LicenseError ¶ added in v0.5.0
LicenseError is returned when license validation fails. Message is user-friendly; Detail contains the raw server response for debugging.
func (*LicenseError) Error ¶ added in v0.5.0
func (e *LicenseError) Error() string
type LicenseRequest ¶
type LicenseRequest struct {
Product ProductInfo `json:"product"`
Credentials CredentialsInfo `json:"credentials"`
Machine MachineInfo `json:"machine"`
}
type MachineInfo ¶
type PlatformAPI ¶
type PlatformAPI interface {
CreateAuthRequest(ctx context.Context) (*AuthRequest, error)
CheckAuthRequestConfirmed(ctx context.Context, id, exchangeToken string) (bool, error)
ExchangeAuthRequest(ctx context.Context, id, exchangeToken string) (string, error)
GetLicenseToken(ctx context.Context, bearerToken string) (string, error)
GetLicense(ctx context.Context, req *LicenseRequest) error
}
type PlatformClient ¶
type PlatformClient struct {
// contains filtered or unexported fields
}
func NewPlatformClient ¶
func NewPlatformClient(apiEndpoint string, logger log.Logger) *PlatformClient
func (*PlatformClient) CheckAuthRequestConfirmed ¶
func (*PlatformClient) CreateAuthRequest ¶
func (c *PlatformClient) CreateAuthRequest(ctx context.Context) (*AuthRequest, error)
func (*PlatformClient) ExchangeAuthRequest ¶
func (*PlatformClient) GetLicense ¶
func (c *PlatformClient) GetLicense(ctx context.Context, licReq *LicenseRequest) error
func (*PlatformClient) GetLicenseToken ¶
type ProductInfo ¶
Click to show internal directories.
Click to hide internal directories.