Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
API is the main struct for the Kervan API
func NewCustomAPI ¶
NewAPIWithEndpoint creates a new KervanAPI struct with a custom endpoint
func (*API) CheckLicence ¶
func (t *API) CheckLicence(payload *CheckLicencePayload) (*CheckLicenceResponse, error)
func (*API) GetVersion ¶
func (t *API) GetVersion() (*GetVersionResponse, error)
type CheckLicencePayload ¶
type CheckLicencePayload struct {
Token string `json:"token"`
}
type CheckLicenceResponse ¶
type CheckLicenceResponse struct {
Token string `json:"token"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type GetVersionResponse ¶
type LicenceCheckJWT ¶
type LicenceCheckResponseJWT ¶
type LicenceCheckResponseJWT struct { IsValid bool `json:"is_valid"` PlanCode string `json:"plan_code"` jwt.RegisteredClaims }
func ParseLicenceCheckResponseJWT ¶
func ParseLicenceCheckResponseJWT(tokenString, secret string) (claims *LicenceCheckResponseJWT, err error)
Click to show internal directories.
Click to hide internal directories.