dynamic

package
v11.1.4-modfix Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyRetriever

type KeyRetriever struct {
	// contains filtered or unexported fields
}

func ProvideService

func ProvideService(cfg *setting.Cfg, kv plugins.KeyStore) *KeyRetriever

func (*KeyRetriever) GetPublicKey

func (kr *KeyRetriever) GetPublicKey(ctx context.Context, keyID string) (string, error)

GetPublicKey loads public keys from:

  • The hard-coded value if the feature flag is not enabled.
  • A cached value from kv storage if it has been already retrieved. This cache is populated from the grafana.com API.

func (*KeyRetriever) IsDisabled

func (kr *KeyRetriever) IsDisabled() bool

IsDisabled disables dynamic retrieval of public keys from the API server.

func (*KeyRetriever) Run

func (kr *KeyRetriever) Run(ctx context.Context) error

type ManifestKeys

type ManifestKeys struct {
	KeyID     string `json:"keyId"`
	PublicKey string `json:"public"`
	Since     int64  `json:"since"`
}

ManifestKeys is the database representation of public keys used to verify plugin manifests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL