db

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*bolt.DB
	// contains filtered or unexported fields
}

Client represents an active db object

func New

func New(cfg model.Db) (*Client, error)

New creates new db instance

func (*Client) Close

func (c *Client) Close() error

Close closes db connection

func (*Client) First

func (c *Client) First(image registry.Image) (bool, error)

First checks if a Docker image has ever been analyzed

func (*Client) GetManifest

func (c *Client) GetManifest(image registry.Image) (registry.Manifest, error)

GetManifest returns Docker image manifest

func (*Client) Migrate

func (c *Client) Migrate() error

Migrate runs database migration

func (*Client) PutManifest

func (c *Client) PutManifest(image registry.Image, manifest registry.Manifest) error

PutManifest add Docker image manifest in db

func (*Client) ReadMetadata

func (c *Client) ReadMetadata() error

ReadMetadata returns db metadata

func (*Client) WriteMetadata

func (c *Client) WriteMetadata(metadata Metadata) error

WriteMetadata writes db metadata

type Metadata

type Metadata struct {
	Version int
}

Metadata represents db metadata informations

Jump to

Keyboard shortcuts

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