Documentation
¶
Index ¶
- func Clear(repo *cache.RepoCache, namespace string) error
- func IsErrNoValidId(err error) bool
- func Resolve[CacheT cache.CacheEntity](repo *cache.RepoCache, typename string, namespace string, ...) (CacheT, []string, error)
- func Select(repo *cache.RepoCache, namespace string, id entity.Id) error
- type ErrNoValidId
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrNoValidId ¶
func Resolve ¶
func Resolve[CacheT cache.CacheEntity](repo *cache.RepoCache, typename string, namespace string, resolver Resolver[CacheT], args []string) (CacheT, []string, error)
Resolve first try to resolve an entity using the first argument of the command line. If it fails, it falls back to the select mechanism.
Returns:
- the entity if any
- the new list of command line arguments with the entity prefix removed if it has been used
- an error if the process failed
Types ¶
type ErrNoValidId ¶
type ErrNoValidId struct {
// contains filtered or unexported fields
}
func NewErrNoValidId ¶
func NewErrNoValidId(typename string) *ErrNoValidId
func (ErrNoValidId) Error ¶
func (e ErrNoValidId) Error() string
Click to show internal directories.
Click to hide internal directories.