agent

package
v0.0.0-...-afe02dd Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

func NewAgent

func NewAgent(config *Config) (*Agent, error)

func (*Agent) Run

func (a *Agent) Run(ctx context.Context) error

type Config

type Config struct {
	Attestation map[string]ConfigAttestation `json:"attestation" yaml:"attestation"`
}

func (*Config) DefaultAttestationConfig

func (c *Config) DefaultAttestationConfig() (string, *ConfigAttestation)

type ConfigAttestation

type ConfigAttestation struct {
	ExpiresAfter time.Duration  `json:"expires_after" yaml:"expires_after"`
	Template     ConfigTemplate `json:"template" yaml:"template"`

	PrivateKeys map[string]ConfigPrivateKey `json:"private_keys" yaml:"private_keys"`
}

func (*ConfigAttestation) DefaultPrivateKey

func (c *ConfigAttestation) DefaultPrivateKey() (string, *ConfigPrivateKey)

type ConfigPrivateKey

type ConfigPrivateKey struct {
	NotAfter time.Time `json:"not_after" yaml:"not_after"`

	File struct {
		Path string `json:"path" yaml:"path"`

		Format   string `json:"format" yaml:"format"`
		Encoding string `json:"encoding" yaml:"encoding"`
	} `json:"file" yaml:"file"`

	KMS string `json:"aws_kms" yaml:"aws_kms"`
}

func (*ConfigPrivateKey) Load

type ConfigTemplate

type ConfigTemplate struct {
	JSON string `json:"base" yaml:"base"`

	Issuer string `json:"issuer" yaml:"issuer"`
	Scopes string `json:"scopes" yaml:"scopes"`
}

type SignerWithContext

type SignerWithContext interface {
	SignWithContext(context.Context, io.Reader, []byte, crypto.SignerOpts) ([]byte, error)
}

Jump to

Keyboard shortcuts

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