metadata

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Name string `storm:"id"`

	EntryIds []*ops.Id
}

func (*Channel) IdMap

func (c *Channel) IdMap() map[string][]*ops.Id

func (*Channel) Prune

func (c *Channel) Prune(count int)

type Channels

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

func (*Channels) Add

func (c *Channels) Add(id string, channel string) error

func (*Channels) Entries

func (c *Channels) Entries() ([]*Channel, error)

func (*Channels) Get

func (c *Channels) Get(name string) (*Channel, error)

func (*Channels) HasChannel

func (c *Channels) HasChannel(id string) bool

func (*Channels) List

func (c *Channels) List() ([]string, error)

func (*Channels) Remove

func (c *Channels) Remove(id string, channel string) error

func (*Channels) Update

func (c *Channels) Update(channel *Channel) error

type Entry

type Entry struct {
	Id string `storm:"id"`

	*ops.Header `storm:"inline"`
}

type Metadata

type Metadata struct {
	Path  string
	Prune int

	Packages   *Packages
	Channels   *Channels
	Signatures *Signatures
	// contains filtered or unexported fields
}

func New

func New(path string, readOnly bool, prune int) *Metadata

func (*Metadata) Close

func (m *Metadata) Close()

func (*Metadata) Empty

func (m *Metadata) Empty() error

func (*Metadata) Exists

func (m *Metadata) Exists() bool

func (*Metadata) ToSigningJson

func (m *Metadata) ToSigningJson() ([]byte, error)

type Packages

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

func (*Packages) Count

func (p *Packages) Count(channel string) int

func (*Packages) Del

func (p *Packages) Del(id string) error

func (*Packages) DelR

func (p *Packages) DelR(id string) (*Entry, error)

func (*Packages) Entries

func (p *Packages) Entries(channel string) ([]*Entry, error)

func (*Packages) Get

func (p *Packages) Get(name string) ([]*Entry, error)

func (*Packages) NameMap

func (p *Packages) NameMap() map[string][]*Entry

func (*Packages) Prune

func (p *Packages) Prune() ([]*Entry, error)

func (*Packages) Put

func (p *Packages) Put(pkg *ops.Header) (*Entry, error)

func (*Packages) PutAll

func (p *Packages) PutAll(pkgs []*ops.Header, channels []string) (saved, pruned []*Entry, err error)

func (*Packages) Reject

func (p *Packages) Reject(entry *Entry) bool

type Signature

type Signature struct {
	Id string `storm:"id"`

	*action.Signature `storm:"inline"`
}

type Signatures

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

func (*Signatures) Entries

func (s *Signatures) Entries() ([]*Signature, error)

func (*Signatures) Get

func (s *Signatures) Get(fingerprint string) (*Signature, error)

func (*Signatures) Put

func (s *Signatures) Put(sig *action.Signature) error

Jump to

Keyboard shortcuts

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