Versions in this module Expand all Collapse all v1 v1.5.2 Apr 22, 2026 Changes in this version + const GlobalpingAuthURL + const GlobalpingDashboardURL + var ErrTypeExchangeFailed = "exchange_failed" + var ErrTypeIntrospectionFailed = "introspection_failed" + var ErrTypeInvalidGrant = "invalid_grant" + var ErrTypeNotAuthorized = "not_authorized" + var ErrTypeRefreshFailed = "refresh_failed" + var ErrTypeRevokeFailed = "revoke_failed" + var StatusUnauthorizedWithTokenRefreshed = 1000 + type AuthorizeError struct + Code int + Description string + ErrorType string + func (e *AuthorizeError) Error() string + type AuthorizeResponse struct + AuthorizeURL string + CallbackURL string + type Client interface + Authorize func(ctx context.Context, callback func(error)) (*AuthorizeResponse, error) + AwaitMeasurement func(ctx context.Context, id string) (*globalping.Measurement, error) + Close func() + CreateMeasurement func(ctx context.Context, measurement *globalping.MeasurementCreate) (*globalping.MeasurementCreateResponse, error) + GetMeasurement func(ctx context.Context, id string) (*globalping.Measurement, error) + GetMeasurementRaw func(ctx context.Context, id string) ([]byte, error) + Limits func(ctx context.Context) (*globalping.LimitsResponse, error) + Logout func(ctx context.Context) error + RevokeToken func(ctx context.Context, token string) error + TokenIntrospection func(ctx context.Context, token string) (*IntrospectionResponse, error) + func NewClient(config Config) Client + type Config struct + AuthClientID string + AuthClientSecret string + AuthToken *storage.Token + AuthURL string + DashboardURL string + Globalping globalping.Client + HTTPClient *http.Client + Printer *view.Printer + Storage *storage.LocalStorage + UserAgent string + Utils utils.Utils + type IntrospectionResponse struct + Active bool + Aud string + ClientID string + Exp int64 + Iat int64 + Iss string + Jti string + Nbf int64 + Scope string + Sub string + TokenType string + Username string