Documentation ¶
Overview ¶
Package uptane contains the logic needed to perform the Uptane verification checks against stored TUF metadata and the associated config files.
Index ¶
- type CDNClient
- type Client
- func (c *Client) DirectorRoot(version uint64) ([]byte, error)
- func (c *Client) State() (State, error)
- func (c *Client) StoredOrgUUID() (string, error)
- func (c *Client) TUFVersionState() (TUFVersions, error)
- func (c *Client) TargetFile(path string) ([]byte, error)
- func (c *Client) Targets() (data.TargetFiles, error)
- func (c *Client) TargetsCustom() ([]byte, error)
- func (c *Client) TargetsMeta() ([]byte, error)
- type ClientOption
- type CoreAgentClient
- type MetaState
- type OrgUUIDProvider
- type RequestDoer
- type State
- type TUFVersions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CDNClient ¶
type CDNClient struct { *Client // contains filtered or unexported fields }
CDNClient is an uptane client that fetches the latest configs from the server over HTTP(s)
func NewCDNClient ¶
func NewCDNClient(cacheDB *bbolt.DB, site, apiKey string, options ...ClientOption) (c *CDNClient, err error)
NewCDNClient creates a new uptane client that will fetch the latest configs from the server over HTTP(s)
type Client ¶
Client is an uptane client
func (*Client) DirectorRoot ¶
DirectorRoot returns a director root
func (*Client) StoredOrgUUID ¶
StoredOrgUUID returns the org UUID given by the backend
func (*Client) TUFVersionState ¶
func (c *Client) TUFVersionState() (TUFVersions, error)
TUFVersionState TODO <remote-config>
func (*Client) TargetFile ¶
TargetFile returns the content of a target if the repository is in a verified state
func (*Client) Targets ¶
func (c *Client) Targets() (data.TargetFiles, error)
Targets returns the current targets of this uptane client
func (*Client) TargetsCustom ¶
TargetsCustom returns the current targets custom of this uptane client
func (*Client) TargetsMeta ¶
TargetsMeta returns the current raw targets.json meta of this uptane client
type ClientOption ¶
type ClientOption func(c *Client)
ClientOption describes a function in charge of changing the uptane client
func WithConfigRootOverride ¶
func WithConfigRootOverride(site string, configRootOverride string) ClientOption
WithConfigRootOverride overrides config root
func WithDirectorRootOverride ¶
func WithDirectorRootOverride(site string, directorRootOverride string) ClientOption
WithDirectorRootOverride overrides director root
type CoreAgentClient ¶
type CoreAgentClient struct { *Client // contains filtered or unexported fields }
CoreAgentClient is an uptane client that fetches the latest configs from the Core Agent
func NewCoreAgentClient ¶
func NewCoreAgentClient(cacheDB *bbolt.DB, orgUUIDProvider OrgUUIDProvider, options ...ClientOption) (c *CoreAgentClient, err error)
NewCoreAgentClient creates a new uptane client
func (*CoreAgentClient) Update ¶
func (c *CoreAgentClient) Update(response *pbgo.LatestConfigsResponse) error
Update updates the uptane client and rollbacks in case of error
type OrgUUIDProvider ¶
OrgUUIDProvider is a provider of the agent org UUID
type RequestDoer ¶
RequestDoer is an interface that abstracts the http.Client.Do method
type State ¶
type State struct { ConfigState map[string]MetaState DirectorState map[string]MetaState TargetFilenames map[string]string }
State represents the state of an uptane client
func (*State) ConfigRootVersion ¶
ConfigRootVersion returns the version of the config root.json file
func (*State) ConfigSnapshotVersion ¶
ConfigSnapshotVersion returns the version of the config snapshot.json file
func (*State) DirectorRootVersion ¶
DirectorRootVersion returns the version of the director root.json file
func (*State) DirectorTargetsVersion ¶
DirectorTargetsVersion returns the version of the director targets.json file