metadata

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound     = errors.New("vm metadata not found")
	ErrStaleVersion = errors.New("vm metadata version is stale")
)

Functions

This section is empty.

Types

type Record

type Record struct {
	Id uint64

	Mint        string
	Authority   string
	Vm          string
	VmBump      uint8
	Omnibus     string
	OmnibusBump uint8
	DaysLocked  uint8

	State   State
	Version uint64

	CreatedAt time.Time
}

func (*Record) Clone

func (r *Record) Clone() Record

func (*Record) CopyTo

func (r *Record) CopyTo(dst *Record)

func (*Record) Validate

func (r *Record) Validate() error

type State added in v0.35.0

type State uint8
const (
	StateUnknown State = iota
	StateAvailable
)

type Store

type Store interface {
	// Save creates or updates a VM metadata record in the store.
	// On insert, Version is set to 1. On update, Version is incremented.
	// ErrStaleVersion is returned when the provided version doesn't match.
	Save(ctx context.Context, record *Record) error

	// GetByMint returns the VM metadata record for the given mint
	GetByMint(ctx context.Context, mint string) (*Record, error)

	// GetAllVms returns all VM public keys
	GetAllVms(ctx context.Context) ([]string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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