lockfile

package
v0.0.0-...-b7fbb08 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package lockfile is used to manage the lockfile of managed versions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveFile

func SaveFile(filename string, l *Locks) error

func SaveWriter

func SaveWriter(write io.Writer, l *Locks) error

Types

type Lock

type Lock struct {
	Name    string `json:"name"`
	Key     string `json:"key"`
	Version string `json:"version"`
}

Lock stores known versions from a scan or source

type Locks

type Locks struct {
	Filename string
	Lock     map[string]map[string]*Lock // Lock[Name][Key] = *Lock
	// contains filtered or unexported fields
}

func LoadFile

func LoadFile(filename string) (*Locks, error)

func LoadReader

func LoadReader(rdr io.Reader) (*Locks, error)

func New

func New() *Locks

func (*Locks) Get

func (l *Locks) Get(name, key string) (*Lock, error)

func (*Locks) Save

func (l *Locks) Save() error

func (*Locks) Set

func (l *Locks) Set(name, key, version string) error

Jump to

Keyboard shortcuts

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