Documentation
¶
Overview ¶
Package licensingtest signs licenses with ephemeral keys for tests. Keys exist only in memory for the duration of a test process.
Index ¶
- func Claims(features ...licensing.Feature) map[string]any
- func EnterpriseService(features ...licensing.Feature) *licensing.Service
- func Header(keyID string) map[string]any
- func JWKS(issuers ...*Issuer) []byte
- func KeyListClaims(version int64, signers ...*Issuer) map[string]any
- func KeyListHeader(keyID string) map[string]any
- func KeySet(issuers ...*Issuer) *licensing.KeySet
- type Issuer
- func (i *Issuer) KeyList(version int64, signers ...*Issuer) []byte
- func (i *Issuer) License(features ...licensing.Feature) []byte
- func (i *Issuer) RevocationList(version int64, ids ...uuid.UUID) []byte
- func (i *Issuer) Sign(claims map[string]any) []byte
- func (i *Issuer) SignWithHeader(header map[string]any, claims map[string]any) []byte
- type StaticSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnterpriseService ¶
EnterpriseService returns a loaded license service with an active license that grants the features.
func KeyListClaims ¶
KeyListClaims returns valid key list claims that trust the signers.
func KeyListHeader ¶
Types ¶
type Issuer ¶
type Issuer struct {
KeyID string
// contains filtered or unexported fields
}
func (*Issuer) RevocationList ¶
RevocationList signs, as a root key, a revocation list that names the ids.
type StaticSource ¶
type StaticSource struct {
Raw []byte
}
StaticSource is a read-only license source for tests.
func (StaticSource) Kind ¶
func (s StaticSource) Kind() licensing.SourceKind
Click to show internal directories.
Click to hide internal directories.