github.com/devseccon/trivy@v0.47.1-0.20231123133102-bd902a0bd996/pkg/fanal/vm/vm.go (about)

     1  package vm
     2  
     3  import (
     4  	"golang.org/x/xerrors"
     5  )
     6  
     7  var (
     8  	ErrInvalidSignature = xerrors.New("invalid signature error")
     9  	ErrUnsupportedType  = xerrors.New("unsupported type error")
    10  )
    11  
    12  type Cache[K comparable, V any] interface {
    13  	// Add stores data in the cache
    14  	Add(key K, value V) (evicted bool)
    15  
    16  	// Get returns key's value from the cache
    17  	Get(key K) (value V, ok bool)
    18  }